Topic: Working on an extension for invoicing and I have questions...

First, I'm not understanding why the NULL, 0, 0 entries exist in the GL for each invoice:

| counter | type | type_no | tran_date  | account | memo_ | amount | person_type_id | person_id |
+---------+------+---------+------------+---------+-------+--------+----------------+-----------+
|     171 |   10 |      28 | 2019-08-19 | 4010(sales)     |     -5 |           NULL | NULL      |
|     172 |   10 |      28 | 2019-08-19 | 1200(AR)|       |      5 |              2 | 6         |
|     173 |   10 |      28 | 2019-08-19 |         |       |      0 |           NULL | NULL      | <-- this entry
|     174 |   10 |      29 | 2019-08-19 | 4010    |       |     -1 |           NULL | NULL      |
|     175 |   10 |      29 | 2019-08-19 | 4010    |       |     -1 |           NULL | NULL      |
|     176 |   10 |      29 | 2019-08-19 | 1200    |       |      2 |              2 | 6         |
|     177 |   10 |      29 | 2019-08-19 |         |       |      0 |           NULL | NULL      | <-- and this entry
|     178 |   12 |      12 | 2019-08-19 | 1065(Petty Cash)|     50 |           NULL | NULL      |
|     179 |   12 |      12 | 2019-08-19 | 1200    |       |    -50 |              2 | 7         |
|     180 |   12 |      13 | 2019-08-19 | 1060(Checking)  |   1500 |           NULL | NULL      |
|     181 |   12 |      13 | 2019-08-19 | 1200    |       |  -1500 |              2 | 5         |

And my second question is if it will cause any problems if I don't enter tax transactions where there is no tax collected and stock moves where stock levels are not applicable?

I can make these NULL entries, but it just seems like I'm polluting the database with rows that cannot affect any report or function, because their net effect is to add zero.

Re: Working on an extension for invoicing and I have questions...

My guess: you discovered a bug.  It happens if you have a tax exempt item on an invoice.   The fact that the account is blank is a clear giveaway.  While it does not cause any operational problem, the extra entries bloat the database.  I would report this on mantis.

Re: Working on an extension for invoicing and I have questions...

Thank you, Braath Waate.

Re: Working on an extension for invoicing and I have questions...

@joe: any fix needed here or for 2.5?

Re: Working on an extension for invoicing and I have questions...

This is set to be fixed in 2.5.

/Joe