Bugzilla – Attachment 74427 Details for
Bug 18736
Problems in order calculations (rounding errors)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18736: (follow-up) Undo changes to GetLateOrders
Bug-18736-follow-up-Undo-changes-to-GetLateOrders.patch (text/plain), 1.56 KB, created by
Nick Clemens (kidclamp)
on 2018-04-18 11:39:53 UTC
(
hide
)
Description:
Bug 18736: (follow-up) Undo changes to GetLateOrders
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-04-18 11:39:53 UTC
Size:
1.56 KB
patch
obsolete
>From d4b0a455238ff7bd67e0c04be3e3f3aab9db5151 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Apr 2018 11:38:24 +0000 >Subject: [PATCH] Bug 18736: (follow-up) Undo changes to GetLateOrders > >GetLateOrders calculates subtotal based on rrp which is a 2 decimal >precision field. If we need more precision here it should be fixed on a >separate bug >--- > C4/Acquisition.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 056c26a..af8d3a7 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2198,7 +2198,7 @@ sub GetLateOrders { > if ($dbdriver eq "mysql") { > $select .= " > aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, >- (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * " . _get_rounding_sql("aqorders.rrp") . " AS subtotal, >+ (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, > DATEDIFF(CAST(now() AS date),closedate) AS latesince > "; > print STDERR "C4/Acquisition.pm 9\n"; >@@ -2211,7 +2211,7 @@ sub GetLateOrders { > # FIXME: account for IFNULL as above > $select .= " > aqorders.quantity AS quantity, >- aqorders.quantity * "._get_rounding_sql("aqorders.rrp")." AS subtotal, >+ aqorders.quantity * aqorders.rrp AS subtotal, > (CAST(now() AS date) - closedate) AS latesince > "; > print STDERR "C4/Acquisition.pm 10\n"; >-- >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 18736
:
64061
|
64065
|
70187
|
70188
|
70189
|
70768
|
71062
|
71063
|
71627
|
71628
|
71629
|
71630
|
71631
|
71632
|
74335
|
74336
|
74337
|
74338
|
74339
|
74340
|
74341
|
74342
|
74370
|
74371
|
74374
|
74397
|
74398
|
74422
|
74427
|
74438
|
76979
|
76980
|
76981
|
76982
|
76983
|
76984
|
76985
|
76986
|
76987
|
76988
|
76989
|
76990
|
76991
|
77614
|
77615
|
77616
|
77617
|
77618
|
78101
|
78120
|
78981
|
78982
|
78983
|
78984
|
78985
|
78986
|
78987
|
78988
|
79087
|
79088
|
79089
|
79090
|
79091
|
79092
|
79093
|
79094
|
79098
|
79099
|
79100
|
79101
|
79102
|
79103
|
79104
|
79105
|
79187
|
79223
|
79562
|
79563
|
82967
|
82968
|
82969
|
82970
|
82971
|
82972
|
82973
|
82974
|
82975
|
82976
|
82977
|
83212
|
83213
|
83214
|
83973
|
83974
|
83975
|
83976
|
83977
|
83978
|
83979
|
83980
|
83981
|
83982
|
83983
|
83984
|
83985
|
86646
|
86647
|
86648
|
86649
|
86650
|
86651
|
86652
|
86653
|
86654
|
86655
|
86656
|
86657
|
86658