@@ 242-246 (lines=5) @@ | ||
239 | $invoiceconf = $this->db->get('invoice_conf'); |
|
240 | $invoice_conf = (array)$invoiceconf->first_row(); |
|
241 | $last_invoiceid = $this->common->get_invoice_date('invoiceid', '', $AccountData['reseller_id']); |
|
242 | if ($last_invoiceid && $last_invoiceid > 0) { |
|
243 | $last_invoiceid = ($last_invoiceid + 1); |
|
244 | } else { |
|
245 | $last_invoiceid = $invoice_conf['invoice_start_from']; |
|
246 | } |
|
247 | $last_invoiceid = str_pad($last_invoiceid, (strlen($last_invoiceid) + 4), '0', STR_PAD_LEFT); |
|
248 | $invoice_prefix = $invoice_conf['invoice_prefix']; |
|
249 | $due_date = gmdate("Y-m-d H:i:s", strtotime(gmdate("Y-m-d H:i:s")." +".$invoice_conf['interval']." days")); |
@@ 1744-1748 (lines=5) @@ | ||
1741 | $invoiceconf = $this->CI->db->get('invoice_conf'); |
|
1742 | $invoice_conf = (array)$invoiceconf->first_row(); |
|
1743 | $last_invoiceid = $this->get_invoice_date('invoiceid', '', $account_arr['reseller_id']); |
|
1744 | if ($last_invoiceid && $last_invoiceid > 0) { |
|
1745 | $last_invoiceid = ($last_invoiceid + 1); |
|
1746 | } else { |
|
1747 | $last_invoiceid = $invoice_conf['invoice_start_from']; |
|
1748 | } |
|
1749 | $last_invoiceid = str_pad($last_invoiceid, (strlen($last_invoiceid) + 4), '0', STR_PAD_LEFT); |
|
1750 | $invoice_prefix = $invoice_conf['invoice_prefix']; |
|
1751 | $due_date = gmdate("Y-m-d H:i:s", strtotime(gmdate("Y-m-d H:i:s")." +".$invoice_conf['interval']." days")); |