typo
This commit is contained in:
@ -171,7 +171,7 @@ abstract class Report
|
||||
$sum += is_array($total) ? array_sum($total) : $total;
|
||||
}
|
||||
|
||||
$total = $this->has_money ? money($sum, setting('default.currency'), true)->format() : $sum;
|
||||
$total = $this->has_money ? money($sum, default_currency(), true)->format() : $sum;
|
||||
} else {
|
||||
$total = trans('general.na');
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class CreateBankingDocumentTransaction extends Job implements ShouldCreate
|
||||
$currency_code = !empty($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code;
|
||||
|
||||
$this->request['company_id'] = $this->model->company_id;
|
||||
$this->request['currency_code'] = isset($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code;
|
||||
$this->request['currency_code'] = $currency_code;
|
||||
$this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->toDateTimeString();
|
||||
$this->request['currency_rate'] = config('money.' . $currency_code . '.rate');
|
||||
$this->request['account_id'] = isset($this->request['account_id']) ? $this->request['account_id'] : setting('default.account');
|
||||
|
@ -66,7 +66,7 @@ class UpdateBankingDocumentTransaction extends Job implements ShouldUpdate
|
||||
$currency_code = ! empty($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code;
|
||||
|
||||
$this->request['company_id'] = $this->model->company_id;
|
||||
$this->request['currency_code'] = isset($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code;
|
||||
$this->request['currency_code'] = $currency_code;
|
||||
$this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->toDateTimeString();
|
||||
$this->request['currency_rate'] = config('money.' . $currency_code . '.rate');
|
||||
$this->request['account_id'] = isset($this->request['account_id']) ? $this->request['account_id'] : setting('default.account');
|
||||
|
@ -28,7 +28,7 @@ class CreateDocumentItem extends Job implements HasOwner, HasSource, ShouldCreat
|
||||
|
||||
public function handle(): DocumentItem
|
||||
{
|
||||
$item_id = !empty($this->request['item_id']) ? $this->request['item_id'] : 0;
|
||||
$item_id = ! empty($this->request['item_id']) ? $this->request['item_id'] : 0;
|
||||
$precision = config('money.' . $this->document->currency_code . '.precision');
|
||||
|
||||
$item_amount = (double) $this->request['price'] * (double) $this->request['quantity'];
|
||||
@ -36,7 +36,7 @@ class CreateDocumentItem extends Job implements HasOwner, HasSource, ShouldCreat
|
||||
$item_discounted_amount = $item_amount;
|
||||
|
||||
// Apply line discount to amount
|
||||
if (!empty($this->request['discount'])) {
|
||||
if (! empty($this->request['discount'])) {
|
||||
if ($this->request['discount_type'] === 'percentage') {
|
||||
$item_discounted_amount -= ($item_amount * ($this->request['discount'] / 100));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user