mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 20:27:07 +09:00
1 parent
c405c2092d
commit
3189a486d0
1 file changed
-8
@@ -932,14 +932,6 @@ class Service implements InjectionAwareInterface
|
||||
$invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem');
|
||||
$invoiceItemService->generateFromOrder($proforma, $order, \Model_InvoiceItem::TASK_RENEW, $price);
|
||||
|
||||
// search for orders with the same group_id and add them to invoice
|
||||
$orders = $this->di['db']->find('ClientOrder', 'group_id = ? AND status = ?', [$order->group_id, \Model_ClientOrder::STATUS_ACTIVE]);
|
||||
foreach ($orders as $order) {
|
||||
$invoiceItemService->generateFromOrder($proforma, $order, \Model_InvoiceItem::TASK_RENEW, $order->price);
|
||||
// also update order with unpaid invoice id so it will not be generated again
|
||||
$order->unpaid_invoice_id = $proforma->id;
|
||||
}
|
||||
|
||||
// invoice due date
|
||||
if ($due_days > 0) {
|
||||
$proforma->due_at = date('Y-m-d H:i:s', strtotime('+' . $due_days . ' days'));
|
||||
|
||||
Reference in new issue
Block a user