Bugzilla – Attachment 77130 Details for
Bug 19166
Add the ability to add adjustments to an invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19166: (follow-up) Add ADJ_REASON auhtorised value category and minor fixes
Bug-19166-follow-up-Add-ADJREASON-auhtorised-value.patch (text/plain), 5.15 KB, created by
Martin Renvoize (ashimema)
on 2018-07-19 13:50:06 UTC
(
hide
)
Description:
Bug 19166: (follow-up) Add ADJ_REASON auhtorised value category and minor fixes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-07-19 13:50:06 UTC
Size:
5.15 KB
patch
obsolete
>From 43a15112057febbf1347a5ce5079fc3798c6d628 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 30 Mar 2018 13:35:12 +0000 >Subject: [PATCH] Bug 19166: (follow-up) Add ADJ_REASON auhtorised value > category and minor fixes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds the ADJ_REASON authorised value category tot he atomic >update, and fixes code to display a hint of no reasons are defined > >other minor updates to remove warns in logs > >To test: >Apply patches >Run updates >Check authorised value categories to see ADJ_REASON exists >Add an adjustment, not you have no reaosn drop down >Note there is a hint if you hover >Add a value to ADJ_REASON >add another adjustment, note you can now add reasons (or not) > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > acqui/invoice.pl | 7 ++++--- > installer/data/mysql/atomicupdate/bug_19166.perl | 1 + > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 6 +++--- > 3 files changed, 8 insertions(+), 6 deletions(-) > >diff --git a/acqui/invoice.pl b/acqui/invoice.pl >index 66c3582f2e..4fe4b224d8 100755 >--- a/acqui/invoice.pl >+++ b/acqui/invoice.pl >@@ -157,6 +157,7 @@ my @orders_loop = (); > my $orders = $details->{'orders'}; > my @foot_loop; > my %foot; >+my $shipmentcost = $details->{shipmentcost} || 0; > my $total_quantity = 0; > my $total_tax_excluded = 0; > my $total_tax_included = 0; >@@ -211,15 +212,15 @@ $template->param( > shipmentdate => $details->{'shipmentdate'}, > billingdate => $details->{'billingdate'}, > invoiceclosedate => $details->{'closedate'}, >- shipmentcost => $details->{'shipmentcost'}, >+ shipmentcost => $shipmentcost, > orders_loop => \@orders_loop, > foot_loop => \@foot_loop, > total_quantity => $total_quantity, > total_tax_excluded => $total_tax_excluded, > total_tax_included => $total_tax_included, > total_tax_value => $total_tax_value, >- total_tax_excluded_shipment => $total_tax_excluded + $details->{shipmentcost}, >- total_tax_included_shipment => $total_tax_included + $details->{shipmentcost}, >+ total_tax_excluded_shipment => $total_tax_excluded + $shipmentcost, >+ total_tax_included_shipment => $total_tax_included + $shipmentcost, > invoiceincgst => $bookseller->invoiceincgst, > currency => Koha::Acquisition::Currencies->get_active, > budgets_loop => \@budgets_loop, >diff --git a/installer/data/mysql/atomicupdate/bug_19166.perl b/installer/data/mysql/atomicupdate/bug_19166.perl >index 5539daa25a..76a901cc39 100644 >--- a/installer/data/mysql/atomicupdate/bug_19166.perl >+++ b/installer/data/mysql/atomicupdate/bug_19166.perl >@@ -15,6 +15,7 @@ if( CheckVersion( $DBversion ) ) { > CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE > ) > " ); >+ $dbh->do("INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('ADJ_REASON')"); > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 19166 - Add the ability to add adjustments to an invoice)\n"; > } >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 d872b4170a..7295eb185e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -106,7 +106,7 @@ > <td><input type="text" name="adjustment" id="adjustment_[% adjustment.adjustment_id %]" value="[% adjustment.adjustment | $Price %]" /></td> > <td> > [% reasons = AuthorisedValues.Get("ADJ_REASON") %] >- [% IF reasons %] >+ [% IF reasons.0 %] > <select id="reason_[% adjustment.adjustment_id %]" name="reason"> > <option value="">No reason</option> > [% FOREACH reason IN reasons %] >@@ -159,7 +159,7 @@ > <td><input type="text" name="adjustment" id="adjustment_new]" /></td> > <td> > [% reasons = AuthorisedValues.Get("ADJ_REASON") %] >- [% IF reasons %] >+ [% IF reasons.0 %] > <select id="reason_[% adjustment.adjustment_id %]" name="reason"> > <option value="">No reason</option> > [% FOREACH reason IN reasons %] >@@ -286,7 +286,7 @@ > </table> > [% ELSE %] > <div class="dialog message"><p>No orders yet</p> >- [% IF adjustments.count > 0 || shipmentcost > 0 %] >+ [% IF adjustments && adjustments.count > 0 || shipmentcost && shipmentcost > 0 %] > <p>Adjustments plus shipping:[% total_adj + shipmentcost | $Price %]</p> > [% END %] > </div> >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19166
:
66475
|
66476
|
67599
|
67600
|
67601
|
67602
|
67890
|
70413
|
70414
|
70415
|
70416
|
72702
|
72703
|
72704
|
72705
|
72744
|
72978
|
73481
|
73482
|
73483
|
73484
|
73485
|
73486
|
73487
|
74742
|
74743
|
74744
|
74745
|
74746
|
74747
|
74748
|
74843
|
74893
|
74894
|
74895
|
74896
|
74897
|
74898
|
74899
|
74900
|
75014
|
75043
|
76994
|
76995
|
76996
|
76997
|
76998
|
76999
|
77000
|
77001
|
77002
|
77003
|
77004
|
77104
|
77105
|
77106
|
77107
|
77108
|
77109
|
77110
|
77111
|
77112
|
77113
|
77114
|
77115
|
77116
|
77117
|
77118
|
77119
|
77120
|
77121
|
77122
|
77123
|
77124
|
77125
|
77126
|
77127
|
77128
|
77129
| 77130 |
77131
|
77132
|
77133
|
77134
|
77329