Invoice customization bug fixing

This commit is contained in:
Batuhan Baş 2018-10-18 12:29:36 +03:00
parent 3a97008a6e
commit 31d406e506
2 changed files with 7 additions and 11 deletions

View File

@ -15,25 +15,21 @@ class InvoiceText
*/ */
public function compose(View $view) public function compose(View $view)
{ {
$text_override = [ $text_override = [];
'items' => trans_choice('general.items', 2),
'quantity' => trans('invoices.quantity'),
'price' => trans('invoices.price'),
];
$text_items = setting('general.invoice_item'); $text_items = setting('general.invoice_item', trans_choice('general.items', 2));
if ($text_items == 'custom') { if ($text_items == 'custom') {
$text_items = setting('general.invoice_item_input'); $text_items = setting('general.invoice_item_input');
} }
$text_quantity = setting('general.invoice_quantity'); $text_quantity = setting('general.invoice_quantity', trans('invoices.quantity'));
if ($text_quantity == 'custom') { if ($text_quantity == 'custom') {
$text_quantity = setting('general.invoice_quantity_input'); $text_quantity = setting('general.invoice_quantity_input');
} }
$text_price = setting('general.invoice_price'); $text_price = setting('general.invoice_price', trans('invoices.price'));
if ($text_price == 'custom') { if ($text_price == 'custom') {
$text_price = setting('general.invoice_price_input'); $text_price = setting('general.invoice_price_input');

View File

@ -35,14 +35,14 @@ return [
'logo' => 'Logo', 'logo' => 'Logo',
'custom' => 'Custom', 'custom' => 'Custom',
'item_name' => 'Item Name', 'item_name' => 'Item Name',
'item' => 'Item (Default)', 'item' => 'Items',
'product' => 'Product', 'product' => 'Product',
'service' => 'Service', 'service' => 'Service',
'price_name' => 'Price Name', 'price_name' => 'Price Name',
'price' => 'Price (Default)', 'price' => 'Price',
'rate' => 'Rate', 'rate' => 'Rate',
'quantity_name' => 'Quantity Name', 'quantity_name' => 'Quantity Name',
'quantity' => 'Quantity (Default)', 'quantity' => 'Quantity',
], ],
'default' => [ 'default' => [
'tab' => 'Defaults', 'tab' => 'Defaults',