With the addition of cash registers in bug 23321 it would be helpful to have a workflow to ease the 'cashup' process. (i.e. matching up cash register contents at the end of the day with the sum of the transactions having taken place.)
Created attachment 92941 [details] [review] Bug 23355: Add cash_register_actions table
Created attachment 92942 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes
Created attachment 92943 [details] [review] Bug 23355: Add CASHUP actions
Created attachment 92944 [details] [review] Bug 23355: Add accountline deletion test
Created attachment 92945 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key
Created attachment 92946 [details] [review] Bug 23355: Split tests for Line vs Lines
Created attachment 92947 [details] [review] Bug 23355: Tests for Account::Lines summation methods
Created attachment 92948 [details] [review] Bug 23355: Add summation methods to Koha::Account::Lines This patch adds a number of summation methods to Koha::Account::Lines giving quick access to overall total, total credits and total debits.
Created attachment 92949 [details] [review] Bug 23355: Add relations to Koha::Account::Line This patch adds two new relationships to the Koha::Account::Line object. * credit_offsets - returns all credit type Koha::Account::Offsets related to this Koha::Account::Line. * debit_offsets - returns all debit type Koha::Account::Offsets related to this Koha::Account::Line.
Created attachment 92950 [details] [review] Bug 23355: Add register details page
Created attachment 92951 [details] [review] Bug 23355: Add cashup permissions
Created attachment 92952 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction.
Created attachment 92953 [details] [review] Bug 23555: Use rowGroup plugin
Created attachment 97031 [details] [review] Bug 23355: Add cash_register_actions table
Created attachment 97032 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes
Created attachment 97033 [details] [review] Bug 23355: Add CASHUP actions
Created attachment 97034 [details] [review] Bug 23355: Add accountline deletion test
Created attachment 97035 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key
Created attachment 97036 [details] [review] Bug 23355: Split tests for Line vs Lines
Created attachment 97037 [details] [review] Bug 23355: Add register details page
Created attachment 97038 [details] [review] Bug 23355: Add cashup permissions
Created attachment 97039 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction.
Created attachment 97040 [details] [review] Bug 23555: Use rowGroup plugin
Created attachment 97041 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues
Created attachment 97043 [details] [review] Bug 23355: Add cash_register_actions table Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97044 [details] [review] Bug 23355: Add cash_register_actions table Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97045 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97046 [details] [review] Bug 23355: Add CASHUP actions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97047 [details] [review] Bug 23355: Add accountline deletion test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97048 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97049 [details] [review] Bug 23355: Split tests for Line vs Lines Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97050 [details] [review] Bug 23355: Add register details page Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97051 [details] [review] Bug 23355: Add cashup permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97052 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97053 [details] [review] Bug 23555: Use rowGroup plugin https://bugs.koha-community.org/show_bug.cgi?id=23355 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97054 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97077 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97078 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97079 [details] [review] Bug 23355: Add CASHUP actions This patch adds a methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97080 [details] [review] Bug 23355: Add accountline deletion test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97081 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97082 [details] [review] Bug 23355: Split tests for Line vs Lines Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97083 [details] [review] Bug 23355: Add register details page Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97084 [details] [review] Bug 23355: Add cashup permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97085 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97086 [details] [review] Bug 23555: Use rowGroup plugin Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97087 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97088 [details] [review] Bug 23355: Use rowGroup plugin Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97089 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased
Created attachment 97706 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97707 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97708 [details] [review] Bug 23355: Add CASHUP actions This patch adds a methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97709 [details] [review] Bug 23355: Add accountline deletion test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97710 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97711 [details] [review] Bug 23355: Split tests for Line vs Lines Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97712 [details] [review] Bug 23355: Add register details page Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97713 [details] [review] Bug 23355: Add cashup permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97714 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97715 [details] [review] Bug 23355: Use rowGroup plugin Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97716 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased for dependancy order change.
Created attachment 97784 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97785 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97786 [details] [review] Bug 23355: Add CASHUP actions This patch adds a methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97787 [details] [review] Bug 23355: Add accountline deletion test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97788 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97789 [details] [review] Bug 23355: Split tests for Line vs Lines Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97790 [details] [review] Bug 23355: Add register details page Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97791 [details] [review] Bug 23355: Add cashup permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97792 [details] [review] Bug 23355: Add branch details page This patch adds a new 'branch details' page to the POS system which displays a summary of the cash register transactions for a branch since each register was last cashed up. It also allows for cashing up individual registers or cashing up all registers at a given branch in one transaction. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97793 [details] [review] Bug 23355: Use rowGroup plugin Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97794 [details] [review] Bug 23355: Remove superflous use of AuthoriseValues Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97816 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97817 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97818 [details] [review] Bug 23355: Add CASHUP actions This patch adds methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97819 [details] [review] Bug 23355: Add accountline deletion test This patch adds a test to ensure database relations do not cascade deletions when a cash register is deleted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97820 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97821 [details] [review] Bug 23355: Split tests for Line vs Lines This patch simply splits the existing tests for accountlines into two test files, one for the singular object and one for the set. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97822 [details] [review] Bug 23355: Add register details page This patch adds a new page which can be accessed via the menu to the left of the point of sale page. This new page displays a list of transactions since the last 'cashup' action, a summary of transaction amounts and a button to allow the recording of a new 'cashup action. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 97823 [details] [review] Bug 23355: Add cashup permissions Add new 'cashup' sub-permissions to the 'cash_management' permission to allow fine grained control over whome may 'cashup' a cash register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98026 [details] [review] Bug 24082: Add `anonymous_refund` permission to `cash_management` This patch adds the new `anonymous_refund` permission to the `cash_management` flag and binds it to the visability of the register details page.
Created attachment 98027 [details] [review] Bug 24082: Add refund action to relevant lines
Created attachment 98028 [details] [review] Bug 24082: Add access to historical transactions
Created attachment 98835 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98836 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98837 [details] [review] Bug 23355: Add CASHUP actions This patch adds methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98838 [details] [review] Bug 23355: Add accountline deletion test This patch adds a test to ensure database relations do not cascade deletions when a cash register is deleted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98839 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98840 [details] [review] Bug 23355: Split tests for Line vs Lines This patch simply splits the existing tests for accountlines into two test files, one for the singular object and one for the set. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98841 [details] [review] Bug 23355: Add register details page This patch adds a new page which can be accessed via the menu to the left of the point of sale page. This new page displays a list of transactions since the last 'cashup' action, a summary of transaction amounts and a button to allow the recording of a new 'cashup action. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 98842 [details] [review] Bug 23355: Add cashup permissions Add new 'cashup' sub-permissions to the 'cash_management' permission to allow fine grained control over whome may 'cashup' a cash register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 100009 [details] [review] Bug 23355: Add cash_register_actions table This patch adds the new cash_register_actions database table to allow for storing of cash register actions which are not already stored as accountlines. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100010 [details] [review] Bug 23355: [DO NOT PUSH] DBIC Classes Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100011 [details] [review] Bug 23355: Add CASHUP actions This patch adds methods relating to cashup procedures to the cash register object to ease adding and querying for cashup actions related to the register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100012 [details] [review] Bug 23355: Add accountline deletion test This patch adds a test to ensure database relations do not cascade deletions when a cash register is deleted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100013 [details] [review] Bug 23355: Link cash_register_actions to cash_registers by foreign key Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100014 [details] [review] Bug 23355: Split tests for Line vs Lines This patch simply splits the existing tests for accountlines into two test files, one for the singular object and one for the set. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100015 [details] [review] Bug 23355: Add register details page This patch adds a new page which can be accessed via the menu to the left of the point of sale page. This new page displays a list of transactions since the last 'cashup' action, a summary of transaction amounts and a button to allow the recording of a new 'cashup action. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100016 [details] [review] Bug 23355: Add cashup permissions Add new 'cashup' sub-permissions to the 'cash_management' permission to allow fine grained control over whome may 'cashup' a cash register. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100017 [details] [review] Bug 23355: License fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100018 [details] [review] Bug 23355: (QA follow-up) Add missing TT filters Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100019 [details] [review] Bug 23355: (QA follow-up) Missing koha_object(s)_class definitions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100020 [details] [review] Bug 23355: Rename staff_id for manager_id This patch makes the parameter naming more consistent and also fixes the tests (there was a missmatch on the parameter naming, and tests count was incorrect). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 100021 [details] [review] Bug 23355: (QA follow-up) Add a modal confirm to the cashup action This patch adds a simple modal to confirm the cashup action adding a safely measure to it.
Created attachment 100030 [details] [review] Bug 23355: (QA follow-up) Add a modal confirm to the cashup action This patch adds a simple modal to confirm the cashup action adding a safely measure to it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nice work everyone! Pushed to master for 20.05
This added an untranslatable "Print receipt" button.
(In reply to Tomás Cohen Arazi from comment #98) > Created attachment 100014 [details] [review] [review] > Bug 23355: Split tests for Line vs Lines > > This patch simply splits the existing tests for accountlines into two > test files, one for the singular object and one for the set. Did we really decided that? I do not see the point to multiplicate the number of test files.
Created attachment 100090 [details] [review] Bug 23355: Make "Print receipt" translatable
(In reply to Jonathan Druart from comment #109) > (In reply to Tomás Cohen Arazi from comment #98) > > Created attachment 100014 [details] [review] [review] [review] > > Bug 23355: Split tests for Line vs Lines > > > > This patch simply splits the existing tests for accountlines into two > > test files, one for the singular object and one for the set. > > Did we really decided that? I do not see the point to multiplicate the > number of test files. Personally.. I find it much clearer to have a test file per class.. we made the decision to not go the DBIx::Class by splitting our result classes in two.. one for plural one for singular.. we should do the exact same thing in the tests otherwise it gets difficult to find where a function is tested. Also, from a debugging and code reading perspective, I find it hard to find a test in a really really really long single test file.. it's much easier to find the relevant test in a shorted file ;)
I am sure you can use '/' in your editor, and git grep when you are in a shell. H ard to find is not a valid answer :D Let's have this discussion later, somewhere else, but please do not consider that everybody agreed on it.
(In reply to Jonathan Druart from comment #109) > (In reply to Tomás Cohen Arazi from comment #98) > > Created attachment 100014 [details] [review] [review] [review] > > Bug 23355: Split tests for Line vs Lines > > > > This patch simply splits the existing tests for accountlines into two > > test files, one for the singular object and one for the set. > > Did we really decided that? I do not see the point to multiplicate the > number of test files. When I saw how big the tests file got due to previous additions and having plural vs. singular classes tests all mixed I thought of filing a bug to split this myself. I was really happy when I saw Martin did it! LOL As you say, worth discussing somewhere else.
Created attachment 101685 [details] [review] Bug 23355: (RM follow-up) Make DB update idempotent Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(In reply to Martin Renvoize from comment #115) > Created attachment 101685 [details] [review] [review] > Bug 23355: (RM follow-up) Make DB update idempotent > > Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> We use if ( !TableExists() )
ack.. I attached the followup to entirely the wrong bug.. and got the followup wrong too!
New feature not backported to 19.11.x