From 1175da83c95985d3227641ceade1482b14d4dbf4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 17 Aug 2016 13:43:01 +0000 Subject: [PATCH] Bug 15164 - Allow editing of the invoice number after initial saving MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When you notice a typo in your invoice number after finishing with the receiving process, the only way to correct it right now is in the database - or by undoing all the steps and starting over. It would be nice if the invoice number could be edited. Test Plan: 1) Apply this patch 2) Browse to acqui/invoice.pl for an invoice 3) Note the new "Invoice number" field contains the existing invoice 4) Alter the invoice number 5) Save the invoice 6) Note the invoice number has been updated 7) Edit the invoice again 8) Attempt to save the invoice with an empty invoice number field 9) Note that you cannot save the invoice without having an invoice number Followed test plan, works as expected. Signed-off-by: Marc VĂ©ron --- acqui/invoice.pl | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/acqui/invoice.pl b/acqui/invoice.pl index 08e3ee8..eaf3769 100755 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -80,8 +80,10 @@ elsif ( $op && $op eq 'reopen' ) { elsif ( $op && $op eq 'mod' ) { my $shipmentcost = $input->param('shipmentcost'); my $shipment_budget_id = $input->param('shipment_budget_id'); + my $invoicenumber = $input->param('invoicenumber'); ModInvoice( invoiceid => $invoiceid, + invoicenumber => $invoicenumber, shipmentdate => output_pref( { str => scalar $input->param('shipmentdate'), dateformat => 'iso', dateonly => 1 } ), billingdate => output_pref( { str => scalar $input->param('billingdate'), dateformat => 'iso', dateonly => 1 } ), shipmentcost => $shipmentcost, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 8f8a317..39068b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -73,9 +73,15 @@

Invoice: [% invoicenumber %]

Vendor: [% suppliername %]

-
+
    +
  1. + + + Required +
  2. +
  3. -- 2.1.4