Revision 97908d77
Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
$form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"});
|
||
$form->{"lastcost_$i"} = $form->format_amount(\%myconfig, $form->{"lastcost_$i"});
|
||
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0);
|
||
}
|
||
|
||
display_form();
|
bin/mozilla/io.pl | ||
---|---|---|
}
|
||
|
||
my $amount =
|
||
$form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) *
|
||
$form->{"sellprice_$i"} * (1 - $form->{"discount_$i"}) *
|
||
$form->{"qty_$i"};
|
||
map { $form->{"${_}_base"} += $amount }
|
||
(split / /, $form->{"taxaccounts_$i"});
|
||
... | ... | |
$form->{"${_}_$i"} =
|
||
$form->format_amount(\%myconfig, $form->{"${_}_$i"}, $decimalplaces)
|
||
} qw(sellprice listprice lastcost qty) if $form->{item} ne 'assembly';
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0) if $form->{item} ne 'assembly';
|
||
|
||
delete $form->{nextsub};
|
||
|
bin/mozilla/ir.pl | ||
---|---|---|
|
||
my $rows = scalar @{ $form->{item_list} };
|
||
|
||
$form->{"discount_$i"} = $form->parse_amount(\%myconfig, $form->{"discount_$i"}) / 100.0;
|
||
$form->{"discount_$i"} ||= $form->{vendor_discount};
|
||
|
||
if ($rows) {
|
||
$form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
|
||
if( !$form->{"qty_$i"} ) {
|
||
... | ... | |
# override sellprice if there is one entered
|
||
my $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
|
||
|
||
# ergaenzung fuer bug 736 Lieferanten-Rabatt auch in Einkaufsrechnungen vorbelegen jb
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{vendor_discount} * 100 );
|
||
map { $form->{item_list}[$i]{$_} =~ s/\"/"/g } qw(partnumber description unit);
|
||
map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] };
|
||
|
||
... | ... | |
$form->{"sellprice_$i"} /= $exchangerate;
|
||
}
|
||
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"} / 100);
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"});
|
||
$form->{creditremaining} -= $amount;
|
||
$form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
|
||
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0);
|
||
}
|
||
|
||
&display_form;
|
bin/mozilla/is.pl | ||
---|---|---|
|
||
my $rows = scalar @{ $form->{item_list} };
|
||
|
||
# Falls kein Kundenrabatt vorhanden ist, den aktuellen Rabatt nicht mit 0% überschreiben,
|
||
# da hier der Anwender schon manual einen Wert eingetragen haben könnte (analog zu qty) Bugfix: 1412
|
||
if ($form->{customer_discount}){
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
|
||
}
|
||
$form->{"discount_$i"} = $form->parse_amount(\%myconfig, $form->{"discount_$i"}) / 100.0;
|
||
$form->{"discount_$i"} ||= $form->{customer_discount};
|
||
|
||
if ($rows) {
|
||
$form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
|
||
... | ... | |
|
||
$form->{"listprice_$i"} /= $exchangerate;
|
||
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"} / 100);
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"});
|
||
map { $form->{"${_}_base"} = 0 } split / /, $form->{taxaccounts};
|
||
map { $form->{"${_}_base"} += $amount } split / /, $form->{"taxaccounts_$i"};
|
||
map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) } split / /, $form->{"taxaccounts_$i"} if !$form->{taxincluded};
|
||
... | ... | |
|
||
map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, $decimalplaces) } qw(sellprice lastcost);
|
||
|
||
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
|
||
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0);
|
||
}
|
||
|
||
&display_form;
|
bin/mozilla/oe.pl | ||
---|---|---|
|
||
my $rows = scalar @{ $form->{item_list} };
|
||
|
||
# hier ist das problem fuer bug 817 $form->{discount} wird nicht durchgeschliffen
|
||
# ferner fallunterscheidung fuer verkauf oder einkauf s.a. bug 736 jb 04.05.2009
|
||
# select discount as vendor_discount from vendor ||
|
||
# select discount as customer_discount from customer
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"$form->{vc}_discount"} * 100);
|
||
$form->{"discount_$i"} = $form->parse_amount(\%myconfig, $form->{"discount_$i"}) / 100.0;
|
||
$form->{"discount_$i"} ||= $form->{"$form->{vc}_discount"};
|
||
|
||
$form->{"lastcost_$i"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$i"});
|
||
|
||
... | ... | |
$form->{"sellprice_$i"} /= $exchangerate; # if there is an exchange rate adjust sellprice
|
||
}
|
||
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"} / 100);
|
||
my $amount = $form->{"sellprice_$i"} * $form->{"qty_$i"} * (1 - $form->{"discount_$i"});
|
||
map { $form->{"${_}_base"} = 0 } split / /, $form->{taxaccounts};
|
||
map { $form->{"${_}_base"} += $amount } split / /, $form->{"taxaccounts_$i"};
|
||
map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) } split / /, $form->{taxaccounts} if !$form->{taxincluded};
|
||
... | ... | |
$form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
|
||
$form->{"lastcost_$i"} = $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, $decimalplaces);
|
||
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
|
||
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0);
|
||
}
|
||
|
||
display_form();
|
Auch abrufbar als: Unified diff
parse/format-Fehler bei Rabatten behoben
Schon in der Maske eingegebene Rabatte wurden nicht geparsed,
Kunden-/Lieferanten und -Typ-Rabatte wurden teilweise ohne Berücksichtigung
schon eingegebener Rabatte gesetzt. Und beim Auswahl eines Artikels über die
Auswahlmaske, wurden Rabatte falsch formatiert.
behebt #50 (redmine) (unter anderem)