Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8461199d

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID 8461199db302962cc7b3e7134e1a69795d93bea4
  • Vorgänger fd3dd151
  • Nachfolger da99c7bc

Kosmetik

Unterschiede anzeigen:

SL/OE.pm
1161 1161
      push @{ $form->{TEMPLATE_ARRAYS}->{description} },       $form->{"description_$i"};
1162 1162
      push @{ $form->{TEMPLATE_ARRAYS}->{longdescription} },   $form->{"longdescription_$i"};
1163 1163
      push @{ $form->{TEMPLATE_ARRAYS}->{qty} },               $form->format_amount($myconfig, $form->{"qty_$i"});
1164
      push @{ $form->{TEMPLATE_ARRAYS}->{qty_nofmt} },           $form->{"qty_$i"};
1164
      push @{ $form->{TEMPLATE_ARRAYS}->{qty_nofmt} },         $form->{"qty_$i"};
1165 1165
      push @{ $form->{TEMPLATE_ARRAYS}->{ship} },              $form->format_amount($myconfig, $form->{"ship_$i"});
1166
      push @{ $form->{TEMPLATE_ARRAYS}->{ship_nofmt} },          $form->{"ship_$i"};
1166
      push @{ $form->{TEMPLATE_ARRAYS}->{ship_nofmt} },        $form->{"ship_$i"};
1167 1167
      push @{ $form->{TEMPLATE_ARRAYS}->{unit} },              $form->{"unit_$i"};
1168 1168
      push @{ $form->{TEMPLATE_ARRAYS}->{bin} },               $form->{"bin_$i"};
1169 1169
      push @{ $form->{TEMPLATE_ARRAYS}->{partnotes} },         $form->{"partnotes_$i"};
1170 1170
      push @{ $form->{TEMPLATE_ARRAYS}->{serialnumber} },      $form->{"serialnumber_$i"};
1171 1171
      push @{ $form->{TEMPLATE_ARRAYS}->{reqdate} },           $form->{"reqdate_$i"};
1172 1172
      push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} },         $form->{"sellprice_$i"};
1173
      push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_nofmt} },     $form->parse_amount($myconfig, $form->{"sellprice_$i"});
1173
      push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_nofmt} },   $form->parse_amount($myconfig, $form->{"sellprice_$i"});
1174 1174
      push @{ $form->{TEMPLATE_ARRAYS}->{listprice} },         $form->{"listprice_$i"};
1175 1175
      push @{ $form->{TEMPLATE_ARRAYS}->{price_factor} },      $price_factor->{formatted_factor};
1176 1176
      push @{ $form->{TEMPLATE_ARRAYS}->{price_factor_name} }, $price_factor->{description};
......
1188 1188
      my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2);
1189 1189
      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2);
1190 1190

  
1191
      push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : '';
1192
      push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ?  $form->{"netprice_$i"} : '';
1191
      push @{ $form->{TEMPLATE_ARRAYS}->{netprice} },       ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : '';
1192
      push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : '';
1193 1193

  
1194 1194
      $linetotal = ($linetotal != 0) ? $linetotal : '';
1195 1195

  
1196
      push @{ $form->{TEMPLATE_ARRAYS}->{discount} },  ($discount  != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : '';
1197
      push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} },  ($discount  != 0) ?  $discount * -1 : '';
1198
      push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"};
1196
      push @{ $form->{TEMPLATE_ARRAYS}->{discount} },       ($discount != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : '';
1197
      push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : '';
1198
      push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} },     $form->{"discount_$i"};
1199 1199

  
1200 1200
      $form->{ordtotal}         += $linetotal;
1201 1201
      $form->{nodiscount_total} += $nodiscount_linetotal;
......
1207 1207
      }
1208 1208

  
1209 1209
      if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) {
1210
        push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} },   $form->format_amount($myconfig, $discount_subtotal,   2);
1211
        push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_nofmt} },    $discount_subtotal;
1212
        push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, $form->format_amount($myconfig, $nodiscount_subtotal, 2);
1213
        push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_nofmt} },  $nodiscount_subtotal;
1210
        push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} },         $form->format_amount($myconfig, $discount_subtotal,   2);
1211
        push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_nofmt} },   $discount_subtotal;
1212
        push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} },       $form->format_amount($myconfig, $nodiscount_subtotal, 2);
1213
        push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_nofmt} }, $nodiscount_subtotal;
1214 1214

  
1215 1215
        $discount_subtotal   = 0;
1216 1216
        $nodiscount_subtotal = 0;
......
1225 1225
        $nodiscount += $linetotal;
1226 1226
      }
1227 1227

  
1228
      push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} }, $form->format_amount($myconfig, $linetotal, 2);
1229
      push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_nofmt} },  $linetotal_exact;
1230
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
1231
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} },  $nodiscount_linetotal;
1232
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
1233
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
1228
      push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} },                  $form->format_amount($myconfig, $linetotal, 2);
1229
      push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_nofmt} },            $linetotal_exact;
1230
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} },       $form->format_amount($myconfig, $nodiscount_linetotal, 2);
1231
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} }, $nodiscount_linetotal;
1232
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $projectnumbers{$form->{"project_id_$i"}});
1233
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $projectdescriptions{$form->{"project_id_$i"}});
1234 1234

  
1235 1235
      my ($taxamount, $taxbase);
1236 1236
      my $taxrate = 0;
......
1301 1301
    $tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
1302 1302

  
1303 1303
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase} },        $form->format_amount($myconfig, $taxbase{$item}, 2));
1304
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_nofmt} },    $taxbase{$item});
1304
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_nofmt} },  $taxbase{$item});
1305 1305
    push(@{ $form->{TEMPLATE_ARRAYS}->{tax} },            $form->format_amount($myconfig, $taxamount,      2));
1306
    push(@{ $form->{TEMPLATE_ARRAYS}->{tax_nofmt} },        $taxamount);
1306
    push(@{ $form->{TEMPLATE_ARRAYS}->{tax_nofmt} },      $taxamount);
1307 1307
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate} },        $form->format_amount($myconfig, $form->{"${item}_rate"} * 100));
1308
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_nofmt} },    $form->{"${item}_rate"} * 100);
1308
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_nofmt} },  $form->{"${item}_rate"} * 100);
1309 1309
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $form->{"${item}_description"} . q{ } . 100 * $form->{"${item}_rate"} . q{%});
1310 1310
    push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} },      $form->{"${item}_taxnumber"});
1311 1311
  }
......
1316 1316
  $form->{yesdiscount}         = $form->format_amount($myconfig, $form->{nodiscount_total} - $nodiscount, 2);
1317 1317

  
1318 1318
  if($form->{taxincluded}) {
1319
    $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal} - $tax, 2);
1319
    $form->{subtotal}       = $form->format_amount($myconfig, $form->{ordtotal} - $tax, 2);
1320 1320
    $form->{subtotal_nofmt} = $form->{ordtotal} - $tax;
1321 1321
  } else {
1322
    $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2);
1322
    $form->{subtotal}       = $form->format_amount($myconfig, $form->{ordtotal}, 2);
1323 1323
    $form->{subtotal_nofmt} = $form->{ordtotal};
1324 1324
  }
1325 1325

  

Auch abrufbar als: Unified diff