Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 79c048aa

Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt

  • ID 79c048aa6a9699c5a994d7e21f4fd3ec8fa29693
  • Vorgänger 7f6cc129
  • Nachfolger fe6275f8

Gewicht in Druckvorlagen verfügbar machen

Nachdem das Gewicht auf allen Masken (Auftrag, Lieferschein, Rechnung)
angezeigt wird, steht es nun auch in den Druckvorlagen zur Verfügung.

Unterschiede anzeigen:

SL/DB/Helper/FlattenToForm.pm
59 59

  
60 60
    $form->{"id_${idx}"}         = $item->parts_id;
61 61
    $form->{"partnumber_${idx}"} = $item->part->partnumber;
62
    $form->{"weight_${idx}"}     = $item->part->weight;
62 63
    _copy($item,          $form, '',        "_${idx}", 0,               qw(description project_id ship serialnumber pricegroup_id ordnumber cusordnumber unit
63 64
                                                                           subtotal longdescription price_factor_id marge_price_factor approved_sellprice reqdate transdate));
64 65
    _copy($item,          $form, '',        "_${idx}", $format_amounts, qw(qty sellprice marge_total marge_percent lastcost));
SL/DO.pm
813 813
    qw(runningnumber number description longdescription qty unit
814 814
       partnotes serialnumber reqdate projectnumber projectdescription
815 815
       si_runningnumber si_number si_description
816
       si_warehouse si_bin si_chargenumber si_bestbefore si_qty si_unit);
816
       si_warehouse si_bin si_chargenumber si_bestbefore si_qty si_unit weight lineweight);
817 817

  
818 818
  map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays);
819 819

  
......
822 822
  $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS');
823 823
  my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
824 824

  
825
  my $totalweight = 0;
825 826
  my $sameitem = "";
826 827
  foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
827 828
    $i = $item->[0];
......
857 858
    push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} },
858 859
      $projectdescriptions{$form->{"project_id_$i"}};
859 860

  
861
    my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
862
    $totalweight += $lineweight;
863
    push @{ $form->{TEMPLATE_ARRAYS}->{weight} },            $form->format_amount($myconfig, $form->{"weight_$i"}, 3);
864
    push @{ $form->{TEMPLATE_ARRAYS}->{weight_nofmt} },      $form->{"weight_$i"};
865
    push @{ $form->{TEMPLATE_ARRAYS}->{lineweight} },        $form->format_amount($myconfig, $lineweight, 3);
866
    push @{ $form->{TEMPLATE_ARRAYS}->{lineweight_nofmt} },  $lineweight;
867

  
860 868
    if ($form->{"assembly_$i"}) {
861 869
      $sameitem = "";
862 870

  
......
910 918
        for @{ $ic_cvar_configs };
911 919
  }
912 920

  
921
  $form->{totalweight}       = $form->format_amount($myconfig, $totalweight, 3);
922
  $form->{totalweight_nofmt} = $totalweight;
923

  
913 924
  $h_pg->finish();
914 925
  $h_bin_wh->finish();
915 926

  
SL/IS.pm
154 154
       partnotes serialnumber reqdate sellprice listprice netprice
155 155
       discount p_discount discount_sub nodiscount_sub
156 156
       linetotal  nodiscount_linetotal tax_rate projectnumber projectdescription
157
       price_factor price_factor_name partsgroup);
157
       price_factor price_factor_name partsgroup weight lineweight);
158 158

  
159 159
  push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
160 160

  
......
164 164

  
165 165
  map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays, @tax_arrays, @payment_arrays);
166 166

  
167
  my $totalweight = 0;
167 168
  foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
168 169
    $i = $item->[0];
169 170

  
......
280 281
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $projectnumbers{$form->{"project_id_$i"}});
281 282
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $projectdescriptions{$form->{"project_id_$i"}});
282 283

  
284
      my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
285
      $totalweight += $lineweight;
286
      push @{ $form->{TEMPLATE_ARRAYS}->{weight} },            $form->format_amount($myconfig, $form->{"weight_$i"}, 3);
287
      push @{ $form->{TEMPLATE_ARRAYS}->{weight_nofmt} },      $form->{"weight_$i"};
288
      push @{ $form->{TEMPLATE_ARRAYS}->{lineweight} },        $form->format_amount($myconfig, $lineweight, 3);
289
      push @{ $form->{TEMPLATE_ARRAYS}->{lineweight_nofmt} },  $lineweight;
290

  
283 291
      @taxaccounts = split(/ /, $form->{"taxaccounts_$i"});
284 292
      $taxrate     = 0;
285 293
      $taxdiff     = 0;
......
366 374
    }
367 375
  }
368 376

  
377
  $form->{totalweight}       = $form->format_amount($myconfig, $totalweight, 3);
378
  $form->{totalweight_nofmt} = $totalweight;
379

  
369 380
  foreach my $item (sort keys %taxaccounts) {
370 381
    $tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
371 382

  
SL/OE.pm
1120 1120
       partnotes serialnumber reqdate sellprice listprice netprice
1121 1121
       discount p_discount discount_sub nodiscount_sub
1122 1122
       linetotal  nodiscount_linetotal tax_rate projectnumber projectdescription
1123
       price_factor price_factor_name partsgroup);
1123
       price_factor price_factor_name partsgroup weight lineweight);
1124 1124

  
1125 1125
  push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
1126 1126

  
......
1128 1128

  
1129 1129
  map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays, @tax_arrays);
1130 1130

  
1131
  my $totalweight = 0;
1131 1132
  my $sameitem = "";
1132 1133
  foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
1133 1134
    $i = $item->[0];
......
1242 1243
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $projectnumbers{$form->{"project_id_$i"}});
1243 1244
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $projectdescriptions{$form->{"project_id_$i"}});
1244 1245

  
1246
      my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
1247
      $totalweight += $lineweight;
1248
      push @{ $form->{TEMPLATE_ARRAYS}->{weight} },            $form->format_amount($myconfig, $form->{"weight_$i"}, 3);
1249
      push @{ $form->{TEMPLATE_ARRAYS}->{weight_nofmt} },      $form->{"weight_$i"};
1250
      push @{ $form->{TEMPLATE_ARRAYS}->{lineweight} },        $form->format_amount($myconfig, $lineweight, 3);
1251
      push @{ $form->{TEMPLATE_ARRAYS}->{lineweight_nofmt} },  $lineweight;
1252

  
1245 1253
      my ($taxamount, $taxbase);
1246 1254
      my $taxrate = 0;
1247 1255

  
......
1308 1316
    }
1309 1317
  }
1310 1318

  
1319
  $form->{totalweight}       = $form->format_amount($myconfig, $totalweight, 3);
1320
  $form->{totalweight_nofmt} = $totalweight;
1321

  
1311 1322
  my $tax = 0;
1312 1323
  foreach $item (sort keys %taxaccounts) {
1313 1324
    $tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);

Auch abrufbar als: Unified diff