removed invoice/bill status tables
This commit is contained in:
@ -144,7 +144,7 @@ class CreateDocumentTransaction extends Job
|
||||
|
||||
throw new \Exception($message);
|
||||
} else {
|
||||
$this->setStatusCode($amount_check, $total_amount_check);
|
||||
$this->model->status = ($amount_check == $total_amount_check) ? 'paid' : 'partial';
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -189,17 +189,6 @@ class CreateDocumentTransaction extends Job
|
||||
return $paid;
|
||||
}
|
||||
|
||||
protected function setStatusCode($amount_check, $total_amount_check)
|
||||
{
|
||||
$column = ($this->model instanceof Invoice) ? 'invoice_status_code' : 'bill_status_code';
|
||||
|
||||
if ($amount_check == $total_amount_check) {
|
||||
$this->model->$column = 'paid';
|
||||
} else {
|
||||
$this->model->$column = 'partial';
|
||||
}
|
||||
}
|
||||
|
||||
protected function createHistory($transaction)
|
||||
{
|
||||
$history_desc = money((double) $transaction->amount, (string) $transaction->currency_code, true)->format() . ' ' . trans_choice('general.payments', 1);
|
||||
|
Reference in New Issue
Block a user