1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
This commit is contained in:
David Bomba 2019-10-02 18:50:54 +10:00
parent 1248407101
commit ba8638d965
4 changed files with 12 additions and 13 deletions

View File

@ -50,7 +50,7 @@ class ClientSettings extends BaseSettings
'military_time' => 'bool',
'start_of_week' => 'int',
'financial_year_start' => 'int',
'payment_terms' => 'int',
'payment_terms' => 'string',
'language_id' => 'string',
'precision' => 'int',
'default_task_rate' => 'float',

View File

@ -30,7 +30,7 @@ class CompanySettings extends BaseSettings
public $show_currency_symbol = true;
public $show_currency_code = false;
public $payment_terms_id = 1;
public $payment_terms = 1;
public $custom_label1 = '';
public $custom_label2 = '';
@ -169,7 +169,7 @@ class CompanySettings extends BaseSettings
'precision' => 'int',
'show_currency_symbol' => 'bool',
'show_currency_code' => 'bool',
'payment_terms_id' => 'string',
'payment_terms' => 'int',
'custom_label1' => 'string',
'custom_label2' => 'string',
'custom_label3' => 'string',
@ -257,7 +257,7 @@ class CompanySettings extends BaseSettings
$data->timezone_id = (string)config('ninja.i18n.timezone_id');
$data->language_id = (string)config('ninja.i18n.language_id');
$data->payment_terms = (string)config('ninja.i18n.payment_terms');
$data->payment_terms = (int)config('ninja.i18n.payment_terms');
$data->datetime_format_id = (string)config('ninja.i18n.datetime_format_id');
$data->military_time = (bool )config('ninja.i18n.military_time');
$data->date_format_id = (string)config('ninja.i18n.date_format_id');

View File

@ -98,11 +98,11 @@ class InvoiceTransformer extends EntityTransformer
'public_notes' => $invoice->public_notes ?: '',
'private_notes' => $invoice->private_notes ?: '',
'is_deleted' => (bool) $invoice->is_deleted,
'invoice_type_id' => (int) $invoice->invoice_type_id ?: '',
'invoice_type_id' => (string) $invoice->invoice_type_id ?: '',
'tax_name1' => $invoice->tax_name1 ? $invoice->tax_name1 : '',
'tax_rate1' => (float) $invoice->tax_rate1 ?: '',
'tax_rate1' => (float) $invoice->tax_rate1,
'tax_name2' => $invoice->tax_name2 ? $invoice->tax_name2 : '',
'tax_rate2' => (float) $invoice->tax_rate2 ?: '',
'tax_rate2' => (float) $invoice->tax_rate2,
'is_amount_discount' => (bool) ($invoice->is_amount_discount ?: false),
'invoice_footer' => $invoice->invoice_footer ?: '',
'partial' => (float) ($invoice->partial ?: 0.0),

View File

@ -56,21 +56,20 @@ class PaymentTransformer extends EntityTransformer
return [
'id' => $this->encodePrimaryKey($payment->id),
'amount' => (float) $payment->amount,
/*
'transaction_reference' => $payment->transaction_reference ?: '',
'payment_date' => $payment->payment_date ?: '',
'updated_at' => $this->getTimestamp($payment->updated_at),
'archived_at' => $this->getTimestamp($payment->deleted_at),
'is_deleted' => (bool) $payment->is_deleted,
'payment_type_id' => (int) ($payment->payment_type_id ?: 0),
'invoice_id' => (int) ($this->invoice ? $this->invoice->public_id : $payment->invoice->public_id),
'invoice_number' => $this->invoice ? $this->invoice->invoice_number : $payment->invoice->invoice_number,
'payment_type_id' => (string) $payment->payment_type_id ?: '',
'invitation_id' => (string) $payment->invitation_id ?: '',
/*
'private_notes' => $payment->private_notes ?: '',
'exchange_rate' => (float) $payment->exchange_rate,
'exchange_currency_id' => (int) $payment->exchange_currency_id,
'refunded' => (float) $payment->refunded,
'payment_status_id' => (int) $payment->payment_status_id,
*/
'payment_status_id' => (string) $payment->payment_status_id,
*/
];
}
}