Thanks for clarifying this.
The only way I could try to achieve this was by creating an additional column by the name of “payment_dd_number” in the ip_payments table.
Next, I created a field “DD Number” by adding it to the /application/modules/payments/views/modal_add_payment.php
This gave me the ability to store the dd numbers for the Payments made.
Then I modified the /application/modules/invoices/models/mdl_invoices.php
Just after this line ip_clients., I added ip_payments.,
and just after this line
public function default_join()
$this->db->join(‘ip_clients’, ‘ip_clients.client_id = ip_invoices.client_id’);
$this->db->join(‘ip_payments’, ‘ip_payments.invoice_id = ip_invoices.invoice_id’); // Mod
Then in the application/views/invoice_templates/pdf/InvoicePlane - paid.php
Added InvoicePlane - paid.php
Voila, the dd_number starting showing up on the Paid invoice pdf’s.
But, this lead to two different issues
In the Dashboard > Invoices > View Invoices
Only the paid invoices are showing up even when the default view is to show all, and no draft or invoices with other statuses show up.
Secondly when I try to create a New Invoice I get a 404 Page cannot be found error.
I am not well versed with php. If given some pointers to do this correctly I would be able to achieve this without any issues.