- $invs[] = create_recurrent_invoices($row['debtor_no'], $row['branch_code'], $myrow['order_no'], $myrow['id']);
- }
+ $invs[] = create_recurrent_invoices($myrow['debtor_no'], $myrow['group_no'], $myrow['order_no'], $myrow['id'],
+ $date, $from, $to);
+ }
+ if (count($invs) > 0)
+ {
+ $min = min($invs);
+ $max = max($invs);
+ }
+ else
+ $min = $max = 0;
+ display_notification(sprintf(_("%s recurrent invoice(s) created, # %s - # %s."), count($invs), $min, $max));
+ if (count($invs) > 0)
+ {
+ $ar = array('PARAM_0' => $min."-".ST_SALESINVOICE, 'PARAM_1' => $max."-".ST_SALESINVOICE, 'PARAM_2' => "",
+ 'PARAM_3' => 0, 'PARAM_4' => 0, 'PARAM_5' => "", 'PARAM_6' => user_def_print_orientation());
+ display_note(print_link(sprintf(_("&Print Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
+ $ar['PARAM_3'] = 1; // email
+ display_note(print_link(sprintf(_("&Email Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
+ }