1 (edited by seahawk 09/28/2015 10:26:23 am)

Topic: Displaying Discount amount on invoice

Hi

Sometimes I want to show a service cost on the client invoice and give them a 100% discount, but I need the discount% to display as well as the amount of zero(0) on the invoice.

Have searched the forum but cannot find something

regards

Wynand

Re: Displaying Discount amount on invoice

Invoice a "0" cost service with it's name indicating "Usual cost $..." ?

Re: Displaying Discount amount on invoice

Hi

I use a service item for Example ABC; total = 1 ; Price = 30; Discount = 10%; Result = 0

On the invoice only ABC is printed and the rest is blank. Nothing is shown in that line on the invoice. I need the line to show the above information.

regards

Wynand

Re: Displaying Discount amount on invoice

Use the full original value of the ABC Service Item in the invoice with the cost you would normally charge but use 100% as discount.

Post's attachments

FreeDiscServices.png 12.3 kb, 1 downloads since 2015-09-28 

You don't have the permssions to download the attachments of this post.

Re: Displaying Discount amount on invoice

I do that, but when you print the invoice (Pdf) file, on the report, it does not display the amount nor the discount

Wynand

6 (edited by apmuthu 09/28/2015 04:23:52 pm)

Re: Displaying Discount amount on invoice

Check the transactions (#_debtor_trans) table to see if it shows up there.

rep107.php (Print Invoice) does not show the rate and discounts
rep112.php (Print Receipts) shows the vales as 0 for left to allocate.
ViewGL Transactions shows the values contra-ed as being amounts before tax!
The View Sales Invoice page shows the amount after tax!

Post's attachments

Inv20_Demo.zip 24 kb, 7 downloads since 2015-09-28 

You don't have the permssions to download the attachments of this post.

Re: Displaying Discount amount on invoice

apmuthu wrote:

rep107.php (Print Invoice) does not show the rate and discounts

Thanks

Agree, but what should I change in the rep107 to show the item cost and the 100% discount on the invoice with 0 toal for the line item?

Wynand

8 (edited by apmuthu 09/28/2015 05:05:08 pm)

Re: Displaying Discount amount on invoice

Unfortunately, the values are stored in the tables in a disjoint manner. The full values of amount and tax are stored in #_debtor_trans_details. The "net of discount" values are stored in #_debtor_trans - the last line in the Print Invoice takes it's value for INVOICE TOTAL from here.

You will need a completely different SQL linking the tables appropriately to get what you want. Otherwise, it will need to find a place in the Comments field manually entered which is what I assume you are doing now.!

Post's attachments

TableValues.zip 21.4 kb, 5 downloads since 2015-09-28 

You don't have the permssions to download the attachments of this post.

Re: Displaying Discount amount on invoice

Thanks for the effort.

Seems there is no easy way around this.

Wynand

10 (edited by carmelr 09/29/2015 08:42:34 am)

Re: Displaying Discount amount on invoice

The way I do it is to enter the discount on another line and enter a negative amount.

See examples here:
http://cleversolutions.eu/img/Invoice-discount.png
http://cleversolutions.eu/img/Invoice-d … -print.png

11 (edited by apmuthu 09/29/2015 09:20:06 am)

Re: Displaying Discount amount on invoice

@carmelr: Superb! Thanks.

Wiki-ed it.

Re: Displaying Discount amount on invoice

Thanks. Have done something similar but have setup a service item linked to the discount given account  in the ledger.

I though there might a a tick mark or display zeros or something that might be easier, but you idea works great as well.

Regards

Wynand

Re: Displaying Discount amount on invoice

In the config file there is also an option on line 74:

/* Do not print zero lines amount of 0.00 in Sales Documents if service item. 1 = do not */
    $no_zero_lines_amount = 1;

Wynand

14 (edited by apmuthu 10/24/2016 01:01:00 pm)

Re: Displaying Discount amount on invoice

@seahawk: The global variable $no_zero_lines_amount is used to display the zero amount line in reports 107, 109, 110, 111:

                if ($Net != 0.0 || !is_service($myrow2['mb_flag']) || !isset($no_zero_lines_amount) || $no_zero_lines_amount == 0)
                {
..
..