Revision 82574e78
Von Jan Büren vor mehr als 15 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
1572 | 1572 |
# get customer |
1573 | 1573 |
$query = |
1574 | 1574 |
qq|SELECT |
1575 |
c.id AS customer_id, c.name AS customer, c.discount, c.creditlimit, c.terms, |
|
1575 |
c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit, c.terms,
|
|
1576 | 1576 |
c.email, c.cc, c.bcc, c.language_id, c.payment_id, |
1577 | 1577 |
c.street, c.zipcode, c.city, c.country, |
1578 | 1578 |
c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id, |
bin/mozilla/is.pl | ||
---|---|---|
1202 | 1202 |
$cgi->hidden("-name" => "callback", "-value" => $form->{callback}) |
1203 | 1203 |
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) |
1204 | 1204 |
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]) |
1205 |
. $cgi->hidden('-name' => 'customer_discount', '-value' => [$form->{customer_discount}]) |
|
1205 | 1206 |
. qq| |
1206 | 1207 |
</form> |
1207 | 1208 |
|
... | ... | |
1267 | 1268 |
|
1268 | 1269 |
$rows = scalar @{ $form->{item_list} }; |
1269 | 1270 |
|
1270 |
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{discount} * 100); |
|
1271 |
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
|
|
1271 | 1272 |
|
1272 | 1273 |
if ($rows) { |
1273 | 1274 |
$form->{"qty_$i"} = ($form->{"qty_$i"} * 1) ? $form->{"qty_$i"} : 1; |
bin/mozilla/oe.pl | ||
---|---|---|
41 | 41 |
use SL::PE; |
42 | 42 |
use SL::ReportGenerator; |
43 | 43 |
use List::Util qw(max reduce sum); |
44 |
use Data::Dumper; |
|
44 | 45 |
|
45 | 46 |
require "bin/mozilla/io.pl"; |
46 | 47 |
require "bin/mozilla/arap.pl"; |
... | ... | |
465 | 466 |
|
466 | 467 |
check_oe_access(); |
467 | 468 |
|
469 |
# $main::lxdebug->message(0, Dumper($form)); |
|
470 |
|
|
468 | 471 |
set_headings($form->{"id"} ? "edit" : "add"); |
469 | 472 |
|
470 | 473 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call; |
... | ... | |
491 | 494 |
&& ($form->{"partsgroup_$i"} eq "")) { |
492 | 495 |
|
493 | 496 |
$form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid}); |
494 |
&check_form; |
|
495 | 497 |
|
498 |
&check_form; |
|
496 | 499 |
} else { |
497 | 500 |
|
498 | 501 |
if ($form->{type} =~ /^sales/) { |
... | ... | |
502 | 505 |
} |
503 | 506 |
|
504 | 507 |
my $rows = scalar @{ $form->{item_list} }; |
505 |
|
|
506 |
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{discount} * 100); |
|
508 |
# hier ist das problem fuer bug 817 $form->{discount} wird nicht durchgeschliffen |
|
509 |
$form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
|
|
507 | 510 |
|
508 | 511 |
if ($rows) { |
509 | 512 |
$form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); |
templates/webpages/oe/form_footer_de.html | ||
---|---|---|
158 | 158 |
|
159 | 159 |
<input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]"> |
160 | 160 |
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]"> |
161 |
<input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]"> |
|
161 | 162 |
<input type="hidden" name="callback" value="[% callback %]"> |
162 | 163 |
|
163 | 164 |
</form> |
templates/webpages/oe/form_footer_master.html | ||
---|---|---|
158 | 158 |
|
159 | 159 |
<input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]"> |
160 | 160 |
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]"> |
161 |
<input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]"> |
|
161 | 162 |
<input type="hidden" name="callback" value="[% callback %]"> |
162 | 163 |
|
163 | 164 |
</form> |
Auch abrufbar als: Unified diff
Korrektur fuer Bug 817 Rabatte die beim Kunden hinterlegt sind, werden jetzt bei jeder neuen Position automatisch gesetzt in der Angebots/Auftrags-Maske sowie in der Rechnungsmaske (so war dies sicherlich irgendwann mal fruehr SQL-Ledger vor dem fork ...;-)). - Beim Kundenwechsel wird der vorher gesetzte Rabatt nicht ueberschrieben. Ferner heisst die Variable jetzt customer_discount, da discount ueberall und fuer alles verwendet wurde