Hi there,
I’m running the recent version of invoiceplane and have some recurring invoices.
Some of them have always discounts (for example 10%).
But newly created invoices are without discounts. Is there a setting to include discounts on recurring invoices ?
I would like to automatically send my invoices, but that’s not possible because of that…
Thanks
Peter
1 Like
Hey Peter,
Welcome, man!
First thought is to look at the original invoice where the recurring invoices get created from.
Maybe the discount “went wrong” there, which made the other recurring invoices not give discount.
Hi Underdog,
couldn’t see anything special in the original invoice expect I did not chose product units (hours/amount). Just made a test-invoice with that set…let’s see what happens tomorrow… would be great if that’s working (manually editing recurring invoices just to set a discount is boring
)
but other from that - invoiceplane is just a great project, been using for a long time, started with myclientbase, then switched to fusioninvoice and then migrated to invoiceplane. And invoiceplane never let me down.
thanks
Peter
just checked after the cronjob was run. still no discount on the recurring invoice 
original (recurring) invoice:
recurring invoice:
(sorry for the typo with discount in german…)
i think this might be a bug ?
or maybe we should be able to choose individually which invoices are sent automatically (those without discounts) and all other are just saved as drafts ?
regards
Peter
Hi @LordGuinness,
It’s time to do some debugging.
Open /application/modules/invoices/models/Mdl_invoices.php
Find:
$this->mdl_items->save(null, $db_array);
Add
if (IP_DEBUG) {
log_message('debug', 'Recurring Invoice db_array' . json_encode($db_array, JSON_PRETTY_PRINT)
}
Basically in every step of the recurring invoice you can put in the log what is going on.
If you set IP_DEBUG
to true
it will log all your steps.
Key controller is application/modules/invoices/controllers/Recurring.php
, that model is used when the original invoice is copied to the new invoice.
I suspect that either the discount percentage doesn’t get copied or doesn’t get recalculated.
Hi @UnderDog,
I’ve just tried to use an amount as discount, but it also did not work.
Will enable debugging and let you know what’s happening.
Is this just an issue on my side or can you reproduce this issue ?
cheers
Peter
1 Like
I asked someone to reproduce it, but he couldn’t.
He made awesome screenshots and everything.
I haven’t concluded yet what kind of problem it is. I know that you’re experiencing that problem, which just sucks.
Let’s just see what the debugging says 
I love seeing lots of jsons in the logs 
Hi @UnderDog,
I’m soooo stupid… I’ve extracted the archive and did not recognize it’s stored in an “ip” folder… now I’ve replaced all the files in the correct directory and voila:
Recurring invoices with discount are working !
Sorry for all the noise and thank you very much for your support.
InvoicePlane is great !
Cheers
Peter
1 Like
It’s perfectly Allright man, don’t worry about it.
Glad it worked out 