From e87cf98c2e9220f8a2fdcee39d60054a3ef6836e 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=utf8 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- 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 08e3ee8a2f..eaf376918a 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 5b8ee465b3..815980e186 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.39.2