Set date on credit generated from an invoice reversal
This commit is contained in:
parent
ad0b2b8ec3
commit
75d012af06
2 changed files with 4 additions and 2 deletions
|
|
@ -71,7 +71,8 @@ class HandleReversal extends AbstractService
|
|||
$credit = CreditFactory::create($this->invoice->company_id, $this->invoice->user_id);
|
||||
$credit->client_id = $this->invoice->client_id;
|
||||
$credit->invoice_id = $this->invoice->id;
|
||||
|
||||
$credit->date = now();
|
||||
|
||||
$item = InvoiceItemFactory::create();
|
||||
$item->quantity = 1;
|
||||
$item->cost = (float) $total_paid;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ class SubscriptionService
|
|||
$recurring_invoice->next_send_date = now();
|
||||
$recurring_invoice = $recurring_invoice_repo->save([], $recurring_invoice);
|
||||
$recurring_invoice->next_send_date = $recurring_invoice->nextSendDate();
|
||||
|
||||
$recurring_invoice->auto_bill = $this->subscription->auto_bill;
|
||||
|
||||
/* Start the recurring service */
|
||||
$recurring_invoice->service()
|
||||
->start()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue