------------------------------------------------------------------------
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 20 Jun 2008 10:16:13 +0000 (10:16 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 20 Jun 2008 10:16:13 +0000 (10:16 +0000)
r7136 | mbunkus | 2008-06-20 11:16:19 +0200 (Fri, 20 Jun 2008) | 1 line

Lieferscheine: Ein Button eingefügt, mit dem man Lieferscheine als geschlossen markieren kann, ohne sie in Rechnungen umwandeln zu müssen.
------------------------------------------------------------------------

bin/mozilla/do.pl
locale/de/all
locale/de/do
locale/de/login
locale/de/oe
locale/de/todo
templates/webpages/do/form_footer_de.html
templates/webpages/do/form_footer_master.html

index 370411d..228b8e6 100644 (file)
@@ -1216,6 +1216,19 @@ sub transfer_out {
   $lxdebug->leave_sub();
 }
 
+sub mark_closed {
+  $lxdebug->enter_sub();
+
+  DO->close_orders('ids' => [ $form->{id} ]);
+
+  $form->{closed} = 1;
+
+  update();
+
+  $lxdebug->leave_sub();
+}
+
+
 sub yes {
   call_sub($form->{yes_nextsub});
 }
index feb4f00..a721624 100644 (file)
@@ -857,6 +857,7 @@ aktualisieren wollen?',
   'March'                       => 'März',
   'Margins'                     => 'Seitenr&auml;nder',
   'Mark as paid?'               => 'Als bezahlt markieren?',
+  'Mark closed'                 => 'Schließen',
   'Marked as paid'              => 'Als bezahlt markiert',
   'Marked entries printed!'     => 'Markierte Einträge wurden gedruckt!',
   'Master Data'                 => 'Stammdaten',
index 953a00b..3e05f0a 100644 (file)
@@ -337,6 +337,7 @@ $self->{subs} = {
   'invoicetotal'                => 'invoicetotal',
   'item_selected'               => 'item_selected',
   'mark_as_paid_common'         => 'mark_as_paid_common',
+  'mark_closed'                 => 'mark_closed',
   'name_selected'               => 'name_selected',
   'new_item'                    => 'new_item',
   'new_license'                 => 'new_license',
@@ -396,6 +397,7 @@ $self->{subs} = {
   'löschen'                     => 'delete',
   'email'                       => 'e_mail',
   'rechnung'                    => 'invoice',
+  'schließen'                   => 'mark_closed',
   'neue_ware'                   => 'new_part',
   'nein'                        => 'no',
   'drucken'                     => 'print',
index 303863b..4b4fcd2 100644 (file)
@@ -441,6 +441,7 @@ $self->{subs} = {
   'login_screen'                => 'login_screen',
   'logout'                      => 'logout',
   'mark_as_paid_common'         => 'mark_as_paid_common',
+  'mark_closed'                 => 'mark_closed',
   'name_selected'               => 'name_selected',
   'new_item'                    => 'new_item',
   'new_license'                 => 'new_license',
@@ -517,6 +518,7 @@ $self->{subs} = {
   'abschlie&szlig;en'           => 'finish',
   'rechnung'                    => 'invoice',
   'anmeldung'                   => 'login',
+  'schließen'                   => 'mark_closed',
   'neue_ware'                   => 'new_part',
   'nein'                        => 'no',
   'auftrag'                     => 'order',
index 3de86da..da8a298 100644 (file)
@@ -399,6 +399,7 @@ $self->{subs} = {
   'invoicetotal'                => 'invoicetotal',
   'item_selected'               => 'item_selected',
   'mark_as_paid_common'         => 'mark_as_paid_common',
+  'mark_closed'                 => 'mark_closed',
   'name_selected'               => 'name_selected',
   'new_item'                    => 'new_item',
   'new_license'                 => 'new_license',
@@ -465,6 +466,7 @@ $self->{subs} = {
   'lieferschein'                => 'delivery_order',
   'email'                       => 'e_mail',
   'rechnung'                    => 'invoice',
+  'schließen'                   => 'mark_closed',
   'neue_ware'                   => 'new_part',
   'nein'                        => 'no',
   'auftrag'                     => 'order',
index 8d285dc..04e38ce 100644 (file)
@@ -430,6 +430,7 @@ $self->{subs} = {
   'invoicetotal'                => 'invoicetotal',
   'item_selected'               => 'item_selected',
   'mark_as_paid_common'         => 'mark_as_paid_common',
+  'mark_closed'                 => 'mark_closed',
   'name_selected'               => 'name_selected',
   'new_item'                    => 'new_item',
   'new_license'                 => 'new_license',
@@ -504,6 +505,7 @@ $self->{subs} = {
   'email'                       => 'e_mail',
   'abschlie&szlig;en'           => 'finish',
   'rechnung'                    => 'invoice',
+  'schließen'                   => 'mark_closed',
   'neue_ware'                   => 'new_part',
   'nein'                        => 'no',
   'auftrag'                     => 'order',
index 850c8f6..79dce97 100644 (file)
@@ -72,6 +72,9 @@
    [%- END %]
    [%- END %]
    [%- IF id %]
+   [%- UNLESS closed %]
+   <input class="submit" type="submit" name="action" value="Schließen">
+   [%- END %]
    <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="Historie">
    [%- END %]
   </p>
index cde704c..af19a82 100644 (file)
@@ -72,6 +72,9 @@
    [%- END %]
    [%- END %]
    [%- IF id %]
+   [%- UNLESS closed %]
+   <input class="submit" type="submit" name="action" value="<translate>Mark closed</translate>">
+   [%- END %]
    <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="<translate>history</translate>">
    [%- END %]
   </p>