Revision eebe8e90
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
273 | 273 |
$form->{rowcount} = $i; |
274 | 274 |
|
275 | 275 |
} |
276 |
|
|
277 |
# get pricegroups for parts |
|
278 |
IS->get_pricegroups_for_parts(\%myconfig, \%$form); |
|
279 |
|
|
280 |
# Problem: set_pricegroup resets the sellprice of old invoices to the price |
|
281 |
# currently defined in the pricegroup, which is a problem if the price has |
|
282 |
# changed, as the old invoice gets the new price |
|
283 |
# set_pricegroup must never be called, when an old invoice is initially loaded |
|
284 |
|
|
285 |
# set_pricegroup($_) for 1 .. $form->{rowcount}; |
|
286 | 276 |
} |
287 | 277 |
$main::lxdebug->leave_sub(); |
288 | 278 |
} |
... | ... | |
614 | 604 |
map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, $decimalplaces) } qw(sellprice lastcost); |
615 | 605 |
|
616 | 606 |
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); |
617 |
|
|
618 |
# get pricegroups for parts |
|
619 |
IS->get_pricegroups_for_parts(\%myconfig, \%$form); |
|
620 |
|
|
621 |
# build up html code for prices_$i |
|
622 |
&set_pricegroup($i); |
|
623 | 607 |
} |
624 | 608 |
|
625 | 609 |
&display_form; |
... | ... | |
837 | 821 |
$form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy'); |
838 | 822 |
$form->{exchangerate} = $form->{forex} if $form->{forex}; |
839 | 823 |
|
840 |
# remember pricegroups for "use as new" |
|
841 |
IS->get_pricegroups_for_parts(\%myconfig, \%$form); |
|
842 |
set_pricegroup($_) for 1 .. $form->{rowcount}; |
|
843 |
|
|
844 | 824 |
&display_form; |
845 | 825 |
|
846 | 826 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
PriceSource: Erste Version
- Preisgruppen und Stammdaten sind implementiert
- Persistenz in allen Belegen funktioniert
- Rudimentäre Visualisierung funktioniert
- Klassen sind alle da
- Doku fehlt
- Verkauf/Einkaufweiche fehlt
- best_price ungetestet
- Preisgruppen hängen noch nicht von Verkäufer ab
- dependancy system fehlt
- verhalten bei fehlerhaften sources
- pricegroup -> active_source migration