Revision db96df6a
Von Bernd Bleßmann vor 6 Monaten hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
46 | 46 |
use SL::IS; |
47 | 47 |
use SL::Helper::Flash qw(flash_later); |
48 | 48 |
use SL::Helper::UserPreferences::DisplayPreferences; |
49 |
use SL::Helper::ShippedQty; |
|
49 | 50 |
use SL::MoreCommon qw(ary_diff restore_form save_form); |
50 | 51 |
use SL::Presenter::ItemsList; |
51 | 52 |
use SL::ReportGenerator; |
... | ... | |
272 | 273 |
my @do_ids; |
273 | 274 |
my @failed; |
274 | 275 |
foreach my $order (@orders) { |
276 |
# Only consider not delivered quantities. |
|
277 |
SL::Helper::ShippedQty->new->calculate($order)->write_to(\@{$order->items}); |
|
278 |
|
|
279 |
my @items_with_not_delivered_qty = |
|
280 |
grep {$_->qty > 0} |
|
281 |
map {$_->qty($_->qty - $_->shipped_qty); $_} |
|
282 |
@{$order->items_sorted}; |
|
283 |
|
|
275 | 284 |
my $delivery_order; |
276 | 285 |
try { |
277 |
$delivery_order = $order->convert_to_delivery_order(); |
|
286 |
die t8('no undelivered items') if !@items_with_not_delivered_qty; |
|
287 |
$delivery_order = $order->convert_to_delivery_order(items => \@items_with_not_delivered_qty); |
|
278 | 288 |
} catch { |
279 | 289 |
push @failed, {ordnumber => $order->ordnumber, error => $_}; |
280 | 290 |
}; |
locale/de/all | ||
---|---|---|
5143 | 5143 |
'no shipping address' => 'keine Lieferadresse', |
5144 | 5144 |
'no skonto_chart configured for taxkey #1 : #2 : #3' => 'Kein Skontokonto für Steuerschlüssel #1 : #2 : #3', |
5145 | 5145 |
'no tax_id in acc_trans' => 'Keine tax_id in acc_trans', |
5146 |
'no undelivered items' => 'keine ungelieferten Positionen', |
|
5146 | 5147 |
'not a valid DTVF file, expected field header start with \'Umsatz; (..) ;Konto;Gegenkonto\'' => 'Keine gültige DTVF-Datei, die erwartete Kopfzeile startet mit \'Umsatz; (..) ;Konto;Gegenkonto\'', |
5147 | 5148 |
'not a valid DTVF file, expected first field in A1 \'DTVF\'' => 'Keine gültige DTVF-Datei, der erwarte Feldwert in A1 ist \'DTVF\'', |
5148 | 5149 |
'not configured' => 'nicht konfiguriert', |
locale/en/all | ||
---|---|---|
5141 | 5141 |
'no shipping address' => '', |
5142 | 5142 |
'no skonto_chart configured for taxkey #1 : #2 : #3' => '', |
5143 | 5143 |
'no tax_id in acc_trans' => '', |
5144 |
'no undelivered items' => '', |
|
5144 | 5145 |
'not a valid DTVF file, expected field header start with \'Umsatz; (..) ;Konto;Gegenkonto\'' => '', |
5145 | 5146 |
'not a valid DTVF file, expected first field in A1 \'DTVF\'' => '', |
5146 | 5147 |
'not configured' => '', |
Auch abrufbar als: Unified diff
Auftragsbericht: Umwandeln in LS: nur nicht gelieferte Mengen berücksichtigen