Importing Invoices with Discounts

Hello everyone!

I was using a piece of software similar to InvoicePlane that is being discontinued (grumble grumble) so I’m migrating my business here! I am able to successfully import my clients, invoices, invoice items and payments, however, a large portion of my invoices have a percentage discount that’s not being imported and therefore making it seem like my clients still owe me money!

I see in phpMyAdmin that there are fields for “invoice_discount_amount” and “invoice_discount_percent”, is it possible to just add these fields to the invoice.csv file before importing, or if not, would it be possible to modify the import script to include these fields?

Thanks in advance for the help, and thank you for this fantastic product!

Last Update: 2018-05-16

Yeah the import needs a complete overhaul anyway. There are several fields missing.

Well that was a simple enough band-aid, I added an invoice_discount_percent column to invoices.csv and the following line to Mdl_import.php and it worked perfectly!

‘invoices.csv’ => array(
‘user_email’,
‘client_name’,
‘invoice_date_created’,
‘invoice_date_due’,
’invoice_discount_percent’,
‘invoice_number’,
‘invoice_terms’
),

1 Like

Hey

Yeah we didn’t say it was hard but just it need a new fresh look to include all fields (or maybe do a dynamic mapping but that’s something else :smiley:)

Anyway if you update IP to the next version your changes will be lost so be careful with that :wink:

Regards,
Maxime

Roger that, thank you for the warning! I keep a directory tree with any core files I’ve modified for the rest of my website so I’ll make sure to save this one in there as well :+1: