mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Additional logging for auto bill
This commit is contained in:
parent
d562630957
commit
491d5e9f89
@ -50,6 +50,8 @@ class AutoBill
|
||||
MultiDB::setDb($this->db);
|
||||
|
||||
try{
|
||||
|
||||
nlog("autobill {$this->invoice->id}");
|
||||
|
||||
$this->invoice->service()->autoBill()->save();
|
||||
|
||||
|
@ -25,6 +25,8 @@ class AutoBillCron
|
||||
|
||||
public $tries = 1;
|
||||
|
||||
private $counter = 1;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
@ -120,14 +122,17 @@ class AutoBillCron
|
||||
nlog($auto_bill_invoices->count(). " full invoices to auto bill db = {$db}");
|
||||
|
||||
$auto_bill_invoices->cursor()->each(function ($invoice) use($db){
|
||||
|
||||
nlog($this->counter);
|
||||
AutoBill::dispatch($invoice, $db);
|
||||
$this->counter++;
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
nlog("fine");
|
||||
nlog("Auto Bill - fine");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,10 +309,6 @@ class BaseRepository
|
||||
|
||||
/* Perform model specific tasks */
|
||||
if ($model instanceof Invoice) {
|
||||
|
||||
nlog("Finished amount = " . $state['finished_amount']);
|
||||
nlog("Starting amount = " . $state['starting_amount']);
|
||||
nlog("Diff = " . ($state['finished_amount'] - $state['starting_amount']));
|
||||
|
||||
if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT)) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user