Bug 5544: Notes from template are not used in recurring invoices. Fixed.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 13 Dec 2021 11:24:21 +0000 (12:24 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 13 Dec 2021 11:24:21 +0000 (12:24 +0100)
sales/create_recurrent_invoices.php

index ea71fd3a903d421d8f51a7739ae6e1c3555afa09..b14b30569dc10ec1716fd60999cbcf713d5ec7d7 100644 (file)
@@ -46,6 +46,8 @@ function create_recurrent_invoices($customer_id, $branch_id, $order_no, $tmpl_no
 
        $doc->reference = $Refs->get_next($doc->trans_type, null, array('customer' => $customer_id, 'branch' => $branch_id,
                'date' => $date));
+       if (!empty($doc->Comments))
+               $memo .= "\n" . $doc->Comments;
        $doc->Comments = $memo;
 
        foreach ($doc->line_items as $line_no=>$item) {