Bugzilla – Attachment 73486 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) Shipment cost is always added to 'spent'
Bug-19166-follow-up-Shipment-cost-is-always-added-.patch (text/plain), 1.93 KB, created by
Nick Clemens (kidclamp)
on 2018-03-30 13:42:10 UTC
(
hide
)
Description:
Bug 19166: (follow-up) Shipment cost is always added to 'spent'
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-03-30 13:42:10 UTC
Size:
1.93 KB
patch
obsolete
>From ab9a5b1213348e35f4ee838c99f93079ae7f923f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 15 Mar 2018 16:21:42 +0000 >Subject: [PATCH] Bug 19166: (follow-up) Shipment cost is always added to > 'spent' > >Two koha professionals agreed, also it is current behvaiour so this >patch removes a change >--- > C4/Budgets.pm | 14 ++------------ > t/db_dependent/Budgets.t | 2 +- > 2 files changed, 3 insertions(+), 13 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 0905576..817761a 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -338,7 +338,7 @@ sub GetBudgetSpent { > datecancellationprinted IS NULL > |); > $sth->execute($budget_id); >- my $sum = $sth->fetchrow_array; >+ my $sum = 0 + $sth->fetchrow_array; > > $sth = $dbh->prepare(qq| > SELECT SUM(shipmentcost) AS sum >@@ -369,17 +369,7 @@ sub GetBudgetOrdered { > datecancellationprinted IS NULL > |); > $sth->execute($budget_id); >- my $sum = $sth->fetchrow_array; >- >- $sth = $dbh->prepare(qq| >- SELECT SUM(shipmentcost) AS sum >- FROM aqinvoices >- WHERE shipmentcost_budgetid = ? >- AND closedate IS NULL >- |); >- $sth->execute($budget_id); >- my ($shipmentcost_sum) = $sth->fetchrow_array; >- $sum += $shipmentcost_sum; >+ my $sum = 0 + $sth->fetchrow_array; > > my $adjustments = Koha::InvoiceAdjustments->search({budget_id => $budget_id, encumber_open => 1, closedate => undef},{ join => 'invoiceid' }); > while ( my $adj = $adjustments->next ){ >diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t >index 7395ed3..69fa845 100755 >--- a/t/db_dependent/Budgets.t >+++ b/t/db_dependent/Budgets.t >@@ -472,7 +472,7 @@ ModReceiveOrder({ > } ); > > is ( GetBudgetSpent( $fund ), 6, "total shipping cost is 6"); >-is ( GetBudgetOrdered( $fund ), '26', "total ordered price is 20"); >+is ( GetBudgetOrdered( $fund ), '20', "total ordered price is 20"); > > > # CloneBudgetPeriod >-- >2.1.4
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