Revision d6fed9b5
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
1253 | 1253 |
$price_src->price(0) if !$price_source->best_price; |
1254 | 1254 |
} |
1255 | 1255 |
|
1256 |
my $discount_src; |
|
1257 |
$discount_src = $price_source->best_discount |
|
1258 |
? $price_source->best_discount |
|
1259 |
: $price_source->discount_from_source(""); |
|
1260 |
$discount_src->discount(0) if !$price_source->best_discount; |
|
1256 | 1261 |
|
1257 | 1262 |
$item->sellprice($price_src->price); |
1258 | 1263 |
$item->active_price_source($price_src); |
1264 |
$item->discount($discount_src->discount); |
|
1265 |
$item->active_discount_source($discount_src); |
|
1266 |
|
|
1267 |
my $price_editable = $self->order->is_sales ? $::auth->assert('sales_edit_prices', 1) : $::auth->assert('purchase_edit_prices', 1); |
|
1259 | 1268 |
|
1260 | 1269 |
$self->js |
1261 |
->run('kivi.Order.update_sellprice', $item_id, $item->sellprice_as_number) |
|
1270 |
->run('kivi.Order.set_price_and_source_text', $item_id, $price_src ->source, $price_src ->source_description, $item->sellprice_as_number, $price_editable) |
|
1271 |
->run('kivi.Order.set_discount_and_source_text', $item_id, $discount_src->source, $discount_src->source_description, $item->discount_as_percent, $price_editable) |
|
1262 | 1272 |
->html('.row_entry:has(#item_' . $item_id . ') [name = "partnumber"] a', $item->part->partnumber) |
1263 | 1273 |
->val ('.row_entry:has(#item_' . $item_id . ') [name = "order.orderitems[].description"]', $item->description) |
1264 | 1274 |
->val ('.row_entry:has(#item_' . $item_id . ') [name = "order.orderitems[].longdescription"]', $item->longdescription); |
Auch abrufbar als: Unified diff
Auftrags-Controller: Preisquellen bei Erneuern von Positionen aus Stammdaten …
… nicht nur berücksichtigen, sondern auch anzeigen.
Und Rabatt-Quellen ebefalls berücksichtigen und anzeigen.