Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Summary: Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 13323
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 17:15 UTC by Blou
Modified: 2022-01-28 14:44 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option) (20.54 KB, patch)
2014-06-17 13:27 UTC, simith.doliveira
Details | Diff | Splinter Review
Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option) (20.52 KB, patch)
2014-08-20 18:34 UTC, simith.doliveira
Details | Diff | Splinter Review
Bug 11062: rename shipmentcost with shipping (16.41 KB, patch)
2015-02-18 15:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11062: Fill shipping tax excluded (12.55 KB, patch)
2015-02-18 15:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11062: Update DB entry (3.23 KB, patch)
2015-02-18 15:46 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Blou 2013-10-16 17:15:24 UTC
Here in Canada, invoices items should be included in the following order:

Price
Shipment
Taxes
Subtotal
Total

At least, as an option.  Right now, our library gets the wrong Total since shipping is added to the subtotal, not including the taxes.

I looked for preferences, but the code seemed very clear in acqui/invoice.pl:

my $total_gsti_shipment = $total_est_gsti + $details->{shipmentcost};

Unless a nice solution already exists, I think this ordering should be customizable.  

Comments and input (on what else should be affected) are very welcomed.
Comment 1 simith.doliveira 2014-06-17 13:27:40 UTC Comment hidden (obsolete)
Comment 2 Paola Rossi 2014-08-14 15:27:01 UTC
I've tried to apply the patch against master 3.17.00.013

Applying: Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Bookseller.t
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging acqui/supplier.pl
Auto-merging acqui/parcels.pl
Auto-merging acqui/invoice.pl
CONFLICT (content): Merge conflict in acqui/invoice.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)

So I pass the patch to "Patch doesn't apply" status.
Comment 3 simith.doliveira 2014-08-20 18:34:29 UTC Comment hidden (obsolete)
Comment 4 Paola Rossi 2014-08-28 15:51:47 UTC
Today I've tried to apply the patch against master 3.17.00.016

There has been a conflict:
Applying: Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Bookseller.t
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging acqui/updatesupplier.pl
Auto-merging acqui/supplier.pl
CONFLICT (content): Merge conflict in acqui/supplier.pl
Auto-merging C4/Bookseller.pm
CONFLICT (content): Merge conflict in C4/Bookseller.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 11062 - Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)

So I pass the patch to "Patch doesn't apply" status.
Comment 5 Francois Charbonnier 2014-09-09 14:26:25 UTC
Most part of this feature is going to be implemented by the Jonathan Druart's GST refactoring work.

See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12825

We will wait his development to be upstreamed before working again on this one.
Comment 6 Jonathan Druart 2015-02-18 15:45:53 UTC
Created attachment 35994 [details] [review]
Bug 11062: rename shipmentcost with shipping

For more consistency, the shipmentcost variables and labels will be
renamed with shipping.
Comment 7 Jonathan Druart 2015-02-18 15:45:57 UTC
Created attachment 35995 [details] [review]
Bug 11062: Fill shipping tax excluded

This patch adds the ability to enter the shipping tax excluded.

Note that the total will continue to be calculated using the shipping
tax included.
Comment 8 Jonathan Druart 2015-02-18 15:46:00 UTC
Created attachment 35996 [details] [review]
Bug 11062: Update DB entry

3 new DB field:
aqbooksellers.invoiceincgst
aqbooksellers.shipping_tax_rate
aqinvoices.shipping_tax_rate

1 DB field renamed
aqinvoices.shipmentcost => aqinvoices.shipping
Comment 9 Jonathan Druart 2015-02-18 15:47:04 UTC
Patches to apply on top of kohac/ft/bug_13323 (cf bug 13323 for more information).
Comment 10 Katrin Fischer 2020-01-05 10:57:45 UTC
Could this be revived now that bug 13323 has been closed?