How can I add a column to Closing Shift?

When closing a shift and then printing the report from it to send to accounting, it would be greatly helpful to have an extra column in the first table (POS Transactions).

Currently the table lists the POS Transactions from the closed shift with the following columns:

Sales Invoice # - Date - Customer Name - Amount

When verifying the balances by either the closing cashier or the accounting person responsible for verifying the information, it would be very helpful if the POS Transactions table included a column between Customer and Amount possibly called Mode of Payment.

With this additional column it would make tracking down any offending transactions much easier if we knew the mode of payment for each transaction.

Currently if only the Credit Card sales were not balancing properly, then the person tasked with finding the problem and making the corrections would have to open every transaction of the day to eventually find the one where a mistake might have been made.

If the transaction list included the Mode of Payment column then the person responsible for making the corrections would only have to go through the Credit Card sales and could skip the checks, cash sales, and store credit sales. When a cashier typically does 200 transactions in a shift, it would be much easier to fix problems if they didn’t have to open all 200 transactions to find the error.

What I know so far…

The table in the POS Closing Shift page is called [pos_transactions] and it is evidently existing somewhere in the system. I am not sure if it is a pre-made table or if it is generated on demand.

Can anyone tell me where to find it and how to possibly add the column?

When I tried to use the “Customize” function from POS Closing Shift it only shows the table name and that it is mandatory. When you open that line it does not have any information about the construction of the table. It only shows the table name.

Any guidance here would be greatly appreciated.


Child Tables are a separate DocType themselves. Along with label, field type, name, mandatory, there is also another column called Options. In that column, you will find the corresponding DocType of the child table. You can customize that DocType to add new fields to the table.

Hi @bkm,

I don’t have the same Apps as you. But perhaps this will help.

→ When you Customize, the screen always begins with the -parent- DocType.

I don’t have 'POS Closing Shift' (parent) and 'POS Transactions' (child).
But I do have Sales Order (parent) and Sales Order Item (child)

  1. Open the Sales Order document.
  2. Click Customize.
  3. Initially, you’re looking at ‘Sales Order’:

  1. However, you can type any DocType in here. Parent, child. Even a DocType that is completely unrelated to the screen you were looking at previously.

  1. So in your specific case, type “POS Transactions” or whatever the exact name is. That should pull up its specific DocType and DocFields. Then just edit to your liking.

Again @brian_pond your instructions and insights were on target.

I was able to track down the actual child table for the pos transactions to be one called “Sales Invoice Reference”

It normally looks something like this:

Using your advice I was able to track this table down and even edit it. Just not quite the way I wanted.

I was able to add a column just before the “Amount” column to show the taxes for each of the listed transactions. The customized table now looks like this:

While I was able to figure out how to finally locate child tables and customize them, I have not been able to find a source for the column I wish to add (Mode of Payment).

If anyone can tell me where to find the Mode of Payment used in Sales Invoice so I can add it to the table, I would be very grateful for the pointer.


BKM :nerd_face:

Mode of Payment is a tricky thing. I think it works differently when using POS, versus not.

As far as I know, a Sales Invoice’s 'Mode of Payment' values are part of its Payment Schedule:

So the structure is something like this:

Sales Invoice (parent)
             |____ Sales Invoice Item  (child)
             |____ Sales Invoice Item  (child)
             |____ Sales Invoice Item  (child)

             |____ Payment Schedule (child)
             |____ Payment Schedule (child)

So let’s say your payment terms are a traditional Net 30. Then you’d have 1 row in “Payment Schedule”. With 1 value for “Mode of Payment”

But if you had a split payment (50% now, 50% after 30 days), then you’d have 2 rows in “Payment Schedule.” And thus also 2 values for “Mode of Payment”.

So this gets pretty tricky for you:

  1. You’re jumping from a Child table (Sales Invoice Reference), up to a Parent table (Sales Invoice).
  2. From there, there could be 1-or-more Payment Schedule child table rows. Each with (maybe) a value for Mode of Payment.
  3. Somehow you’d have to fetch 1 of those (first Mode found?) and bring it down into your “Sales Invoice Reference”. Which is going to require some Python code, and maybe JS too.


But again, POS may work differently, and offer some easier access to Mode of Payments.

(for one of my v12 customers, we gave up on this complexity, and added our own custom code to the system. Customers and Suppliers now have Default Mode of Payment. And when you write a Payment Entry, those defaults are automatically fetched for you.)


“Maybe” that explains a lot of my frustration with trying to find the mode of payment.

I will probably have to chat with @youssef about how he manages to create the sales invoices so that the closing shift functions sees them correctly, because I believe the shift functions were intended to work with that strange POS Invoice type and not really Sales Invoices. He managed to get it working. Maybe then I can find a better path to locate the information I need.

Thanks for the explanation.