removed invoice/bill status tables

This commit is contained in:
denisdulici
2020-01-11 16:57:32 +03:00
parent b5519004a0
commit 08eb8e75fc
69 changed files with 250 additions and 470 deletions

View File

@ -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);