From f51b2f1ad0639c60604f682af4325caf6e6f25c6 Mon Sep 17 00:00:00 2001 From: Niclas Zimmermann Date: Thu, 13 Sep 2012 16:39:08 +0200 Subject: [PATCH] Erweiterung Lieferplan MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Im Lieferplan wird jetzt noch zusätzlich zu der Gesamtliefermenge und der schon gelieferten Menge auch noch die Differenz (also die Menge, die noch nicht geliefert wurde) angezeigt. --- SL/Controller/DeliveryPlan.pm | 52 ++++++++++++++++++----------------- locale/de/all | 1 + 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 5ce462b40..5937c5b7f 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -26,19 +26,20 @@ __PACKAGE__->make_paginated( ); __PACKAGE__->make_sorted( - MODEL => 'OrderItem', - ONLY => [ qw(list) ], - - DEFAULT_BY => 'reqdate', - DEFAULT_DIR => 1, - - reqdate => t8('Reqdate'), - description => t8('Description'), - partnumber => t8('Part Number'), - qty => t8('Qty'), - shipped_qty => t8('shipped'), - ordnumber => t8('Order'), - customer => t8('Customer'), + MODEL => 'OrderItem', + ONLY => [ qw(list) ], + + DEFAULT_BY => 'reqdate', + DEFAULT_DIR => 1, + + reqdate => t8('Reqdate'), + description => t8('Description'), + partnumber => t8('Part Number'), + qty => t8('Qty'), + shipped_qty => t8('shipped'), + not_shipped_qty => t8('not shipped'), + ordnumber => t8('Order'), + customer => t8('Customer'), ); sub action_list { @@ -131,21 +132,22 @@ sub prepare_report { my $report = SL::ReportGenerator->new(\%::myconfig, $::form); $self->{report} = $report; - my @columns = qw(reqdate customer ordnumber partnumber description qty shipped_qty); + my @columns = qw(reqdate customer ordnumber partnumber description qty shipped_qty not_shipped_qty); my @sortable = qw(reqdate customer ordnumber partnumber description ); my %column_defs = ( - reqdate => { sub => sub { $_[0]->reqdate_as_date || $_[0]->order->reqdate_as_date } }, - description => { sub => sub { $_[0]->description }, - obj_link => sub { $self->link_to($_[0]->part) } }, - partnumber => { sub => sub { $_[0]->part->partnumber }, - obj_link => sub { $self->link_to($_[0]->part) } }, - qty => { sub => sub { $_[0]->qty_as_number . ' ' . $_[0]->unit } }, - shipped_qty => { sub => sub { $::form->format_amount(\%::myconfig, $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } }, - ordnumber => { sub => sub { $_[0]->order->ordnumber }, - obj_link => sub { $self->link_to($_[0]->order) } }, - customer => { sub => sub { $_[0]->order->customer->name }, - obj_link => sub { $self->link_to($_[0]->order->customer) } }, + reqdate => { sub => sub { $_[0]->reqdate_as_date || $_[0]->order->reqdate_as_date } }, + description => { sub => sub { $_[0]->description }, + obj_link => sub { $self->link_to($_[0]->part) } }, + partnumber => { sub => sub { $_[0]->part->partnumber }, + obj_link => sub { $self->link_to($_[0]->part) } }, + qty => { sub => sub { $_[0]->qty_as_number . ' ' . $_[0]->unit } }, + shipped_qty => { sub => sub { $::form->format_amount(\%::myconfig, $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } }, + not_shipped_qty => { sub => sub { $::form->format_amount(\%::myconfig, $_[0]->qty - $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } }, + ordnumber => { sub => sub { $_[0]->order->ordnumber }, + obj_link => sub { $self->link_to($_[0]->order) } }, + customer => { sub => sub { $_[0]->order->customer->name }, + obj_link => sub { $self->link_to($_[0]->order->customer) } }, ); map { $column_defs{$_}->{text} = $::locale->text( $self->get_sort_spec->{$_}->{title} ) } keys %column_defs; diff --git a/locale/de/all b/locale/de/all index 5740fd074..9fbd29bbb 100644 --- a/locale/de/all +++ b/locale/de/all @@ -2336,6 +2336,7 @@ $self->{texts} = { 'not logged in' => 'nicht eingeloggt', 'not running' => 'läuft nicht', 'not set' => 'nicht gesetzt', + 'not shipped' => 'nicht geliefert', 'not transferred in yet' => 'noch nicht eingelagert', 'not transferred out yet' => 'noch nicht ausgelagert', 'not yet executed' => 'Noch nicht ausgeführt', -- 2.20.1