Merge branch 'master' into datagrid-lang-issue

This commit is contained in:
devansh bawari 2021-06-25 19:53:14 +05:30
commit 53c681b931
28 changed files with 628 additions and 334 deletions

View File

@ -13,11 +13,14 @@ class OrderInvoicesDataGrid extends DataGrid
public function prepareQueryBuilder() public function prepareQueryBuilder()
{ {
$dbPrefix = DB::getTablePrefix();
$queryBuilder = DB::table('invoices') $queryBuilder = DB::table('invoices')
->leftJoin('orders as ors', 'invoices.order_id', '=', 'ors.id') ->leftJoin('orders as ors', 'invoices.order_id', '=', 'ors.id')
->select('invoices.id as id', 'ors.increment_id as order_id', 'invoices.state as state', 'invoices.base_grand_total as base_grand_total', 'invoices.created_at as created_at'); ->select('invoices.id as id', 'ors.increment_id as order_id', 'invoices.state as state', 'invoices.base_grand_total as base_grand_total', 'invoices.created_at as created_at')
->selectRaw("CASE WHEN {$dbPrefix}invoices.increment_id IS NOT NULL THEN {$dbPrefix}invoices.increment_id ELSE {$dbPrefix}invoices.id END AS increment_id");
$this->addFilter('id', 'invoices.id'); $this->addFilter('increment_id', 'invoices.increment_id');
$this->addFilter('order_id', 'ors.increment_id'); $this->addFilter('order_id', 'ors.increment_id');
$this->addFilter('base_grand_total', 'invoices.base_grand_total'); $this->addFilter('base_grand_total', 'invoices.base_grand_total');
$this->addFilter('created_at', 'invoices.created_at'); $this->addFilter('created_at', 'invoices.created_at');
@ -28,9 +31,9 @@ class OrderInvoicesDataGrid extends DataGrid
public function addColumns() public function addColumns()
{ {
$this->addColumn([ $this->addColumn([
'index' => 'id', 'index' => 'increment_id',
'label' => trans('admin::app.datagrid.invoice-id'), 'label' => trans('admin::app.datagrid.id'),
'type' => 'number', 'type' => 'string',
'searchable' => false, 'searchable' => false,
'sortable' => true, 'sortable' => true,
'filterable' => true, 'filterable' => true,

View File

@ -70,11 +70,11 @@ class ConfigurationForm extends FormRequest
]); ]);
} }
if (request()->has('sales.orderSettings.invoice_slip_design.logo') if (request()->has('sales.invoice_setttings.invoice_slip_design.logo')
&& ! request()->input('sales.orderSettings.invoice_slip_design.logo.delete') && ! request()->input('sales.invoice_setttings.invoice_slip_design.logo.delete')
) { ) {
$this->rules = array_merge($this->rules, [ $this->rules = array_merge($this->rules, [
'sales.orderSettings.invoice_slip_design.logo' => 'required|mimes:bmp,jpeg,jpg,png,webp|max:5000', 'sales.invoice_setttings.invoice_slip_design.logo' => 'required|mimes:bmp,jpeg,jpg,png,webp|max:5000',
]); ]);
} }
@ -102,7 +102,7 @@ class ConfigurationForm extends FormRequest
return [ return [
'general.design.admin_logo.logo_image' => 'Logo Image', 'general.design.admin_logo.logo_image' => 'Logo Image',
'general.design.admin_logo.favicon' => 'Favicon Image', 'general.design.admin_logo.favicon' => 'Favicon Image',
'sales.orderSettings.invoice_slip_design.logo' => 'Invoice Logo' 'sales.invoice_setttings.invoice_slip_design.logo' => 'Invoice Logo'
]; ];
} }
} }

View File

@ -1442,6 +1442,12 @@ return [
'order-number-length' => 'طول رقم الطلب', 'order-number-length' => 'طول رقم الطلب',
'order-number-suffix' => 'لاحقة رقم الطلب', 'order-number-suffix' => 'لاحقة رقم الطلب',
'order-number-generator-class' => 'مولد رقم الطلب', 'order-number-generator-class' => 'مولد رقم الطلب',
'invoice-settings' => 'إعدادات الفاتورة',
'invoice-number' => 'إعدادات رقم الفاتورة',
'invoice-number-prefix' => 'بادئة رقم الفاتورة',
'invoice-number-length' => 'طول رقم الفاتورة',
'invoice-number-suffix' => 'لاحقة رقم الفاتورة',
'invoice-number-generator-class' => 'مولد رقم الفاتورة',
'minimum-order' => 'الحد الأدنى من إعدادات الطلب', 'minimum-order' => 'الحد الأدنى من إعدادات الطلب',
'minimum-order-amount' => 'الحد الأدنى للطلب', 'minimum-order-amount' => 'الحد الأدنى للطلب',
'default' => 'إفتراضي', 'default' => 'إفتراضي',

View File

@ -1376,114 +1376,120 @@ return [
], ],
'system' => 'system' =>
[ [
'catalog' => 'Katalog', 'catalog' => 'Katalog',
'homepage' => 'Homepage configuration', 'homepage' => 'Homepage configuration',
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage', 'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage', 'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
'allow-out-of-stock-items' => 'Allow out of stock items', 'allow-out-of-stock-items' => 'Allow out of stock items',
'products' => 'Produkte', 'products' => 'Produkte',
'guest-checkout' => 'Gastbestellungen', 'guest-checkout' => 'Gastbestellungen',
'allow-guest-checkout' => 'Gastbestellungen erlauben', 'allow-guest-checkout' => 'Gastbestellungen erlauben',
'allow-guest-checkout-hint' => 'Hinweis: Wenn diese Option aktiviert ist, kann sie für jedes Produkt einzeln konfiguriert werden.', 'allow-guest-checkout-hint' => 'Hinweis: Wenn diese Option aktiviert ist, kann sie für jedes Produkt einzeln konfiguriert werden.',
'review' => 'Überprüfen', 'review' => 'Überprüfen',
'allow-guest-review' => 'Gastbewertungen erlauben', 'allow-guest-review' => 'Gastbewertungen erlauben',
'inventory' => 'Inventar', 'inventory' => 'Inventar',
'stock-options' => 'Inventaroptionen', 'stock-options' => 'Inventaroptionen',
'allow-backorders' => 'Nachbestellungen zulassen', 'allow-backorders' => 'Nachbestellungen zulassen',
'customer' => 'Kunden', 'customer' => 'Kunden',
'settings' => 'Einstellungen', 'settings' => 'Einstellungen',
'address' => 'Adresse', 'address' => 'Adresse',
'street-lines' => 'Adresszeilen (Standard: 1)', 'street-lines' => 'Adresszeilen (Standard: 1)',
'sales' => 'Vertrieb', 'sales' => 'Vertrieb',
'shipping-methods' => 'Versand-Methoden', 'shipping-methods' => 'Versand-Methoden',
'free-shipping' => 'Kostenloser Versand', 'free-shipping' => 'Kostenloser Versand',
'flate-rate-shipping' => 'Pauschale Versandkosten', 'flate-rate-shipping' => 'Pauschale Versandkosten',
'shipping' => 'Versand', 'shipping' => 'Versand',
'origin' => 'Herkunft', 'origin' => 'Herkunft',
'country' => 'Land', 'country' => 'Land',
'state' => 'Bundesland', 'state' => 'Bundesland',
'zip' => 'Postleitzahl', 'zip' => 'Postleitzahl',
'city' => 'Stadt', 'city' => 'Stadt',
'street-address' => 'Anschrift', 'street-address' => 'Anschrift',
'title' => 'Titel', 'title' => 'Titel',
'description' => 'Beschreibung', 'description' => 'Beschreibung',
'rate' => 'Rate', 'rate' => 'Rate',
'status' => 'Status', 'status' => 'Status',
'calculate-tax' => 'Steuern berechnen', 'calculate-tax' => 'Steuern berechnen',
'type' => 'Typ', 'type' => 'Typ',
'payment-methods' => 'Zahlungsmethoden', 'payment-methods' => 'Zahlungsmethoden',
'cash-on-delivery' => 'Nachnahme', 'cash-on-delivery' => 'Nachnahme',
'money-transfer' => 'Überweisung', 'money-transfer' => 'Überweisung',
'paypal-standard' => 'Paypal-Standard', 'paypal-standard' => 'Paypal-Standard',
'business-account' => 'Paypal-Geschäftskonto', 'business-account' => 'Paypal-Geschäftskonto',
'newsletter' => 'Newsletter-Abonnement', 'newsletter' => 'Newsletter-Abonnement',
'newsletter-subscription' => 'Newsletter-Abonnement erlauben', 'newsletter-subscription' => 'Newsletter-Abonnement erlauben',
'email' => 'E-Mail-Prüfung', 'email' => 'E-Mail-Prüfung',
'email-verification' => 'E-Mail-Prüfung erlauben', 'email-verification' => 'E-Mail-Prüfung erlauben',
'sort_order' => 'Sortierreihenfolge', 'sort_order' => 'Sortierreihenfolge',
'general' => 'Allgemein', 'general' => 'Allgemein',
'footer' => 'Fußzeile', 'footer' => 'Fußzeile',
'content' => 'Inhalt', 'content' => 'Inhalt',
'footer-content' => 'Fußzeile Text', 'footer-content' => 'Fußzeile Text',
'footer-toggle' => 'Fußzeile aktiv', 'footer-toggle' => 'Fußzeile aktiv',
'locale-options' => 'Einheit-Optionen', 'locale-options' => 'Einheit-Optionen',
'weight-unit' => 'Gewichtseinheit', 'weight-unit' => 'Gewichtseinheit',
'email-settings' => 'E-Mail Einstellungen', 'email-settings' => 'E-Mail Einstellungen',
'email-sender-name' => 'E-Mail-Adresse des Absenders', 'email-sender-name' => 'E-Mail-Adresse des Absenders',
'email-sender-name-tip' => 'This name will be displayed in the customers inbox', 'email-sender-name-tip' => 'This name will be displayed in the customers inbox',
'shop-email-from' => 'E-Mail-Adresse des Shops (bei Bestellungen, etc.)', 'shop-email-from' => 'E-Mail-Adresse des Shops (bei Bestellungen, etc.)',
'shop-email-from-tip' => 'The email address of this channel to send emails to your customers', 'shop-email-from-tip' => 'The email address of this channel to send emails to your customers',
'admin-name' => 'Name des Admins', 'admin-name' => 'Name des Admins',
'admin-name-tip' => 'This name will be displayed in all admin emails', 'admin-name-tip' => 'This name will be displayed in all admin emails',
'admin-email' => 'E-Mail-Adresse des Admins', 'admin-email' => 'E-Mail-Adresse des Admins',
'admin-email-tip' => 'The email address of the admin for this channel to receive emails', 'admin-email-tip' => 'The email address of the admin for this channel to receive emails',
'admin-page-limit' => 'Elemente pro Seite (Admin)', 'admin-page-limit' => 'Elemente pro Seite (Admin)',
'design' => 'Design', 'design' => 'Design',
'admin-logo' => 'Admin-Logo', 'admin-logo' => 'Admin-Logo',
'logo-image' => 'Logo-Bild', 'logo-image' => 'Logo-Bild',
'credit-max' => 'Kunden Kredit Max', 'credit-max' => 'Kunden Kredit Max',
'credit-max-value' => 'Kredit Max-Wert', 'credit-max-value' => 'Kredit Max-Wert',
'use-credit-max' => 'Verwendung von Kredit-Max', 'use-credit-max' => 'Verwendung von Kredit-Max',
'order-settings' => 'Bestelleinstellungen', 'order-settings' => 'Bestelleinstellungen',
'orderNumber' => 'Auftragsnummer Einstellungen', 'orderNumber' => 'Auftragsnummer Einstellungen',
'order-number-prefix' => 'Auftragsnummer Präfix', 'order-number-prefix' => 'Auftragsnummer Präfix',
'order-number-length' => 'Auftragsnummer Länge', 'order-number-length' => 'Auftragsnummer Länge',
'order-number-suffix' => 'Auftragsnummer Suffix', 'order-number-suffix' => 'Auftragsnummer Suffix',
'order-number-generator-class' => 'Bestell nummern generator', 'order-number-generator-class' => 'Bestell nummern generator',
'minimum-order' => 'Einstellungen für die Mindestbestellmenge', 'invoice-settings' => 'Rechnungseinstellungen',
'minimum-order-amount' => 'Mindestbestellmenge', 'invoice-number' => 'Rechnungsnummerneinstellungen',
'default' => 'Standard', 'invoice-number-prefix' => 'Rechnungsnummer-Präfix',
'sandbox' => 'Sandbox', 'invoice-number-length' => 'Länge der Rechnungsnummer',
'all-channels' => 'Alle', 'invoice-number-suffix' => 'Rechnungsnummer-Suffix',
'all-locales' => 'Alle', 'invoice-number-generator-class' => 'Rechnungsnummerngenerator',
'invoice-slip-design' => 'Rechnungsdesign', 'minimum-order' => 'Einstellungen für die Mindestbestellmenge',
'logo' => 'Logo', 'minimum-order-amount' => 'Mindestbestellmenge',
'store-name' => 'Geschäftsname', 'default' => 'Standard',
'vat-number' => 'Umsatzsteuer-Identifikationsnummer', 'sandbox' => 'Sandbox',
'contact-number' => 'Kontakt Nummer', 'all-channels' => 'Alle',
'bank-details' => 'Bankdaten', 'all-locales' => 'Alle',
'mailing-address' => 'Send Check to', 'invoice-slip-design' => 'Rechnungsdesign',
'instructions' => 'Instructions', 'logo' => 'Logo',
'custom-scripts' => 'Custom Scripts', 'store-name' => 'Geschäftsname',
'custom-css' => 'Custom CSS', 'vat-number' => 'Umsatzsteuer-Identifikationsnummer',
'custom-javascript' => 'Custom Javascript', 'contact-number' => 'Kontakt Nummer',
'paypal-smart-button' => 'PayPal', 'bank-details' => 'Bankdaten',
'client-id' => 'Client Id', 'mailing-address' => 'Send Check to',
'client-id-info' => 'Use "sb" for testing.', 'instructions' => 'Instructions',
'client-secret' => 'Client Secret', 'custom-scripts' => 'Custom Scripts',
'client-secret-info' => 'Add your secret key here', 'custom-css' => 'Custom CSS',
'accepted-currencies' => 'Accepted currencies', 'custom-javascript' => 'Custom Javascript',
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...', 'paypal-smart-button' => 'PayPal',
'buy-now-button-display' => 'Allow customers to directly buy products', 'client-id' => 'Client Id',
'width' => 'Width', 'client-id-info' => 'Use "sb" for testing.',
'height' => 'Height', 'client-secret' => 'Client Secret',
'cache-small-image' => 'Small Image', 'client-secret-info' => 'Add your secret key here',
'cache-medium-image' => 'Medium Image', 'accepted-currencies' => 'Accepted currencies',
'cache-large-image' => 'Large Image', 'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
'generate-invoice' => 'Automatically generate the invoice after placing an order', 'buy-now-button-display' => 'Allow customers to directly buy products',
'set-invoice-status' => 'Set the invoice status after creating the invoice to', 'width' => 'Width',
'set-order-status' => 'Set the order status after creating the invoice to', 'height' => 'Height',
'generate-invoice-applicable' => 'Applicable if automatic generate invoice is enabled' 'cache-small-image' => 'Small Image',
'cache-medium-image' => 'Medium Image',
'cache-large-image' => 'Large Image',
'generate-invoice' => 'Automatically generate the invoice after placing an order',
'set-invoice-status' => 'Set the invoice status after creating the invoice to',
'set-order-status' => 'Set the order status after creating the invoice to',
'generate-invoice-applicable' => 'Applicable if automatic generate invoice is enabled',
], ],
], ],
]; ];

View File

@ -1384,132 +1384,138 @@ return [
], ],
'system' => [ 'system' => [
'catalog' => 'Catalog', 'catalog' => 'Catalog',
'homepage' => 'Homepage configuration', 'homepage' => 'Homepage configuration',
'allow-out-of-stock-items' => 'Allow out of stock items', 'allow-out-of-stock-items' => 'Allow out of stock items',
'products' => 'Products', 'products' => 'Products',
'guest-checkout' => 'Guest Checkout', 'guest-checkout' => 'Guest Checkout',
'allow-guest-checkout' => 'Allow Guest Checkout', 'allow-guest-checkout' => 'Allow Guest Checkout',
'allow-guest-checkout-hint' => 'Hint: If turned on, this option can be configured for each product specifically.', 'allow-guest-checkout-hint' => 'Hint: If turned on, this option can be configured for each product specifically.',
'attribute' => 'Attribute', 'attribute' => 'Attribute',
'image-upload-size' => 'Allowed Image Upload Size (in Kb)', 'image-upload-size' => 'Allowed Image Upload Size (in Kb)',
'file-upload-size' => 'Allowed File Upload Size (in Kb)', 'file-upload-size' => 'Allowed File Upload Size (in Kb)',
'review' => 'Review', 'review' => 'Review',
'allow-guest-review' => 'Allow Guest Review', 'allow-guest-review' => 'Allow Guest Review',
'inventory' => 'Inventory', 'inventory' => 'Inventory',
'stock-options' => 'Stock Options', 'stock-options' => 'Stock Options',
'allow-backorders' => 'Allow Backorders', 'allow-backorders' => 'Allow Backorders',
'customer' => 'Customer', 'customer' => 'Customer',
'settings' => 'Settings', 'settings' => 'Settings',
'address' => 'Address', 'address' => 'Address',
'street-lines' => 'Lines in a Street Address', 'street-lines' => 'Lines in a Street Address',
'sales' => 'Sales', 'sales' => 'Sales',
'shipping-methods' => 'Shipping Methods', 'shipping-methods' => 'Shipping Methods',
'free-shipping' => 'Free Shipping', 'free-shipping' => 'Free Shipping',
'flate-rate-shipping' => 'Flat Rate Shipping', 'flate-rate-shipping' => 'Flat Rate Shipping',
'shipping' => 'Shipping', 'shipping' => 'Shipping',
'origin' => 'Origin', 'origin' => 'Origin',
'country' => 'Country', 'country' => 'Country',
'state' => 'State', 'state' => 'State',
'zip' => 'Zip', 'zip' => 'Zip',
'city' => 'City', 'city' => 'City',
'street-address' => 'Street Address', 'street-address' => 'Street Address',
'title' => 'Title', 'title' => 'Title',
'description' => 'Description', 'description' => 'Description',
'rate' => 'Rate', 'rate' => 'Rate',
'status' => 'Status', 'status' => 'Status',
'calculate-tax' => 'Calculate Tax', 'calculate-tax' => 'Calculate Tax',
'type' => 'Type', 'type' => 'Type',
'payment-methods' => 'Payment Methods', 'payment-methods' => 'Payment Methods',
'cash-on-delivery' => 'Cash On Delivery', 'cash-on-delivery' => 'Cash On Delivery',
'money-transfer' => 'Money Transfer', 'money-transfer' => 'Money Transfer',
'paypal-standard' => 'PayPal Standard', 'paypal-standard' => 'PayPal Standard',
'business-account' => 'Business Account', 'business-account' => 'Business Account',
'newsletter' => 'Newsletter Subscription', 'newsletter' => 'Newsletter Subscription',
'newsletter-subscription' => 'Allow Newsletter Subscription', 'newsletter-subscription' => 'Allow Newsletter Subscription',
'email' => 'Email Verification', 'email' => 'Email Verification',
'email-verification' => 'Allow Email Verification', 'email-verification' => 'Allow Email Verification',
'sort_order' => 'Sort Order', 'sort_order' => 'Sort Order',
'general' => 'General', 'general' => 'General',
'footer' => 'Footer', 'footer' => 'Footer',
'content' => 'Content', 'content' => 'Content',
'footer-content' => 'Footer Text', 'footer-content' => 'Footer Text',
'footer-toggle' => 'Toggle footer', 'footer-toggle' => 'Toggle footer',
'locale-options' => 'Unit Options', 'locale-options' => 'Unit Options',
'weight-unit' => 'Weight Unit', 'weight-unit' => 'Weight Unit',
'email-settings' => 'Email Settings', 'email-settings' => 'Email Settings',
'email-sender-name' => 'Email Sender Name', 'email-sender-name' => 'Email Sender Name',
'email-sender-name-tip' => 'This name will be displayed in the customers inbox', 'email-sender-name-tip' => 'This name will be displayed in the customers inbox',
'shop-email-from' => 'Shop Email Address', 'shop-email-from' => 'Shop Email Address',
'shop-email-from-tip' => 'The email address of this channel to send emails to your customers', 'shop-email-from-tip' => 'The email address of this channel to send emails to your customers',
'admin-name' => 'Admin Name', 'admin-name' => 'Admin Name',
'admin-name-tip' => 'This name will be displayed in all admin emails', 'admin-name-tip' => 'This name will be displayed in all admin emails',
'admin-email' => 'Admin Email', 'admin-email' => 'Admin Email',
'admin-email-tip' => 'The email address of the admin for this channel to receive emails', 'admin-email-tip' => 'The email address of the admin for this channel to receive emails',
'admin-page-limit' => 'Default Items Per Page (Admin)', 'admin-page-limit' => 'Default Items Per Page (Admin)',
'design' => 'Design', 'design' => 'Design',
'admin-logo' => 'Admin Logo', 'admin-logo' => 'Admin Logo',
'logo-image' => 'Logo Image', 'logo-image' => 'Logo Image',
'credit-max' => 'Customer Credit Max', 'credit-max' => 'Customer Credit Max',
'credit-max-value' => 'Credit Max Value', 'credit-max-value' => 'Credit Max Value',
'use-credit-max' => 'Use Credit Max', 'use-credit-max' => 'Use Credit Max',
'order-settings' => 'Order Settings', 'order-settings' => 'Order Settings',
'orderNumber' => 'Order Number Settings', 'orderNumber' => 'Order Number Settings',
'order-number-prefix' => 'Order Number Prefix', 'order-number-prefix' => 'Order Number Prefix',
'order-number-length' => 'Order Number Length', 'order-number-length' => 'Order Number Length',
'order-number-suffix' => 'Order Number Suffix', 'order-number-suffix' => 'Order Number Suffix',
'minimum-order' => 'Minimum Order Settings', 'order-number-generator-class' => 'Order Number Generator',
'minimum-order-amount' => 'Minimum Order Amount', 'invoice-settings' => 'Invoice Settings',
'default' => 'Default', 'invoice-number' => 'Invoice Number Settings',
'sandbox' => 'Sandbox', 'invoice-number-prefix' => 'Invoice Number Prefix',
'all-channels' => 'All Channels', 'invoice-number-length' => 'Invoice Number Length',
'all-locales' => 'All Locales', 'invoice-number-suffix' => 'Invoice Number Suffix',
'all-customer-groups' => 'All Customer groups', 'invoice-number-generator-class' => 'Invoice Number Generator',
'invoice-slip-design' => 'Invoice Slip Design', 'minimum-order' => 'Minimum Order Settings',
'logo' => 'Logo', 'minimum-order-amount' => 'Minimum Order Amount',
'storefront' => 'Storefront', 'default' => 'Default',
'default-list-mode' => 'Default List Mode', 'sandbox' => 'Sandbox',
'grid' => 'Grid', 'all-channels' => 'All Channels',
'list' => 'List', 'all-locales' => 'All Locales',
'products-per-page' => 'Products Per Page', 'all-customer-groups' => 'All Customer groups',
'sort-by' => 'Sort By', 'invoice-slip-design' => 'Invoice Slip Design',
'from-z-a' => 'From Z-A', 'logo' => 'Logo',
'from-a-z' => 'From A-Z', 'storefront' => 'Storefront',
'newest-first' => 'Newest First', 'default-list-mode' => 'Default List Mode',
'oldest-first' => 'Oldest First', 'grid' => 'Grid',
'cheapest-first' => 'Cheapest First', 'list' => 'List',
'expensive-first' => 'Expensive First', 'products-per-page' => 'Products Per Page',
'comma-seperated' => 'Comma Seperated', 'sort-by' => 'Sort By',
'favicon' => 'Favicon', 'from-z-a' => 'From Z-A',
'seo' => 'SEO', 'from-a-z' => 'From A-Z',
'rich-snippets' => 'Rich Snippets', 'newest-first' => 'Newest First',
'enable' => 'Enable', 'oldest-first' => 'Oldest First',
'show-weight' => 'Show Weight', 'cheapest-first' => 'Cheapest First',
'show-categories' => 'Show Categories', 'expensive-first' => 'Expensive First',
'show-images' => 'Show Images', 'comma-seperated' => 'Comma Seperated',
'show-reviews' => 'Show Reviews', 'favicon' => 'Favicon',
'show-ratings' => 'Show Ratings', 'seo' => 'SEO',
'show-offers' => 'Show Offers', 'rich-snippets' => 'Rich Snippets',
'show-sku' => 'Show SKU', 'enable' => 'Enable',
'categories' => 'Categories', 'show-weight' => 'Show Weight',
'store-name' => 'Store Name', 'show-categories' => 'Show Categories',
'vat-number' => 'Vat Number', 'show-images' => 'Show Images',
'contact-number' => 'Contact Number', 'show-reviews' => 'Show Reviews',
'bank-details' => 'Bank Details', 'show-ratings' => 'Show Ratings',
'mailing-address' => 'Send Check to', 'show-offers' => 'Show Offers',
'instructions' => 'Instructions', 'show-sku' => 'Show SKU',
'custom-scripts' => 'Custom Scripts', 'categories' => 'Categories',
'custom-css' => 'Custom CSS', 'store-name' => 'Store Name',
'custom-javascript' => 'Custom Javascript', 'vat-number' => 'Vat Number',
'paypal-smart-button' => 'PayPal', 'contact-number' => 'Contact Number',
'client-id' => 'Client Id', 'bank-details' => 'Bank Details',
'client-id-info' => 'Use "sb" for testing.', 'mailing-address' => 'Send Check to',
'client-secret' => 'Client Secret', 'instructions' => 'Instructions',
'client-secret-info' => 'Add your secret key here', 'custom-scripts' => 'Custom Scripts',
'accepted-currencies' => 'Accepted currencies', 'custom-css' => 'Custom CSS',
'custom-javascript' => 'Custom Javascript',
'paypal-smart-button' => 'PayPal',
'client-id' => 'Client Id',
'client-id-info' => 'Use "sb" for testing.',
'client-secret' => 'Client Secret',
'client-secret-info' => 'Add your secret key here',
'accepted-currencies' => 'Accepted currencies',
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...', 'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
'buy-now-button-display' => 'Allow customers to directly buy products', 'buy-now-button-display' => 'Allow customers to directly buy products',
'order-number-generator-class' => 'Order Number Generator',
'show-search-input-field' => 'Show Search Input Field', 'show-search-input-field' => 'Show Search Input Field',
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage', 'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage', 'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',

View File

@ -1454,6 +1454,12 @@ return [
'order-number-length' => 'Largo para Pedido #', 'order-number-length' => 'Largo para Pedido #',
'order-number-suffix' => 'Sufijo para Pedido #', 'order-number-suffix' => 'Sufijo para Pedido #',
'order-number-generator-class' => 'Generado de Números de Pedido', 'order-number-generator-class' => 'Generado de Números de Pedido',
'invoice-settings' => 'Configuración de facturas',
'invoice-number' => 'Configuración del número de factura',
'invoice-number-prefix' => 'Prefijo de número de factura',
'invoice-number-length' => 'Longitud del número de factura',
'invoice-number-suffix' => 'Sufijo de número de factura',
'invoice-number-generator-class' => 'Generador de números de facturas',
'minimum-order' => 'Configuración de Pedido Mínimo', 'minimum-order' => 'Configuración de Pedido Mínimo',
'minimum-order-amount' => 'Cantidad Mínima de Pedido', 'minimum-order-amount' => 'Cantidad Mínima de Pedido',
'default' => 'Predeterminado', 'default' => 'Predeterminado',

View File

@ -1434,6 +1434,12 @@ return [
'order-number-length' => 'طول شماره سفارش', 'order-number-length' => 'طول شماره سفارش',
'order-number-suffix' => 'تعداد کافی شماره سفارش', 'order-number-suffix' => 'تعداد کافی شماره سفارش',
'order-number-generator-class' => 'تولید کننده شماره سفارش', 'order-number-generator-class' => 'تولید کننده شماره سفارش',
'invoice-settings' => 'تنظیمات فاکتور',
'invoice-number' => 'تنظیمات شماره فاکتور',
'invoice-number-prefix' => 'پیش شماره شماره فاکتور',
'invoice-number-length' => 'طول شماره فاکتور',
'invoice-number-suffix' => 'پسوند شماره فاکتور',
'invoice-number-generator-class' => 'تولید کننده شماره فاکتور',
'minimum-order' => 'حداقل تنظیمات سفارش', 'minimum-order' => 'حداقل تنظیمات سفارش',
'minimum-order-amount' => 'حداقل مقدار سفارش', 'minimum-order-amount' => 'حداقل مقدار سفارش',
'default' => 'پیش فرض', 'default' => 'پیش فرض',

View File

@ -1442,6 +1442,12 @@ return [
'order-number-length' => 'Lunghezza Numero Ordine', 'order-number-length' => 'Lunghezza Numero Ordine',
'order-number-suffix' => 'Suffisso Numero Ordine', 'order-number-suffix' => 'Suffisso Numero Ordine',
'order-number-generator-class' => 'Generatore di numeri dordine', 'order-number-generator-class' => 'Generatore di numeri dordine',
'invoice-settings' => 'Impostazioni fattura',
'invoice-number' => 'Impostazioni numero fattura',
'invoice-number-prefix' => 'Prefisso numero fattura',
'invoice-number-length' => 'Lunghezza numero fattura',
'invoice-number-suffix' => 'Suffisso numero fattura',
'invoice-number-generator-class' => 'Generatore di numeri di fattura',
'minimum-order' => 'Impostazioni dell\'ordine minimo', 'minimum-order' => 'Impostazioni dell\'ordine minimo',
'minimum-order-amount' => 'Importo minimo dell\'ordine', 'minimum-order-amount' => 'Importo minimo dell\'ordine',
'default' => 'Default', 'default' => 'Default',

View File

@ -1436,6 +1436,12 @@ return [
'order-number-length' => 'Bestelnummer Lengte', 'order-number-length' => 'Bestelnummer Lengte',
'order-number-suffix' => 'Achtervoegsel bestelnummer', 'order-number-suffix' => 'Achtervoegsel bestelnummer',
'order-number-generator-class' => 'Ordernummer Generator', 'order-number-generator-class' => 'Ordernummer Generator',
'invoice-settings' => 'Factuurinstellingen',
'invoice-number' => 'Instellingen factuurnummer',
'invoice-number-prefix' => 'Voorvoegsel factuurnummer',
'invoice-number-length' => 'Lengte factuurnummer',
'invoice-number-suffix' => 'Achtervoegsel factuurnummer',
'invoice-number-generator-class' => 'Factuurnummergenerator',
'minimum-order' => 'Minimale bestelling instellen', 'minimum-order' => 'Minimale bestelling instellen',
'minimum-order-amount' => 'Minimaal bedrag van de bestelling', 'minimum-order-amount' => 'Minimaal bedrag van de bestelling',
'default' => 'Standaard', 'default' => 'Standaard',

View File

@ -1439,6 +1439,12 @@ return [
'order-number-length' => 'Długość numeru zamówienia', 'order-number-length' => 'Długość numeru zamówienia',
'order-number-suffix' => 'Sufiks numeru zamówienia”', 'order-number-suffix' => 'Sufiks numeru zamówienia”',
'order-number-generator-class' => 'Generator numeru zamówienia', 'order-number-generator-class' => 'Generator numeru zamówienia',
'invoice-settings' => 'Ustawienia faktury',
'invoice-number' => 'Ustawienia numeru faktury',
'invoice-number-prefix' => 'Prefiks numeru faktury',
'invoice-number-length' => 'Długość numeru faktury',
'invoice-number-suffix' => 'Sufiks numeru faktury',
'invoice-number-generator-class' => 'Generator numerów faktur',
'minimum-order' => 'Minimalne ustawienia zamówienia', 'minimum-order' => 'Minimalne ustawienia zamówienia',
'minimum-order-amount' => 'Minimalna kwota zamówienia', 'minimum-order-amount' => 'Minimalna kwota zamówienia',
'default' => 'Domyślna', 'default' => 'Domyślna',

View File

@ -1440,6 +1440,12 @@ return [
'order-number-length' => 'Tamanho do Número do Pedido', 'order-number-length' => 'Tamanho do Número do Pedido',
'order-number-suffix' => 'Sufixo do Número de Pedido', 'order-number-suffix' => 'Sufixo do Número de Pedido',
'order-number-generator-class' => 'Gerador de número de pedido', 'order-number-generator-class' => 'Gerador de número de pedido',
'invoice-settings' => 'Configurações de fatura',
'invoice-number' => 'Configurações de número de fatura',
'invoice-number-prefix' => 'Prefixo do número da fatura',
'invoice-number-length' => 'Comprimento do número da fatura',
'invoice-number-suffix' => 'Sufixo do número da fatura',
'invoice-number-generator-class' => 'Gerador de número de fatura',
'minimum-order' => 'Configurações de pedido mínimo ', 'minimum-order' => 'Configurações de pedido mínimo ',
'minimum-order-amount' => 'Quantidade Mínima do Pedido', 'minimum-order-amount' => 'Quantidade Mínima do Pedido',
'default' => 'Padrão', 'default' => 'Padrão',

View File

@ -1426,6 +1426,12 @@ return [
'order-number-length' => 'Numara Uzunluğu', 'order-number-length' => 'Numara Uzunluğu',
'order-number-suffix' => 'Numara Son Eki', 'order-number-suffix' => 'Numara Son Eki',
'order-number-generator-class' => 'Sipariş Numarası Üreticisi', 'order-number-generator-class' => 'Sipariş Numarası Üreticisi',
'invoice-settings' => 'Fatura Ayarları',
'invoice-number' => 'Fatura Numarası Ayarları',
'invoice-number-prefix' => 'Fatura Numarası Ön Eki',
'invoice-number-length' => 'Fatura Numarası Uzunluğu',
'invoice-number-suffix' => 'Fatura Numarası Eki',
'invoice-number-generator-class' => 'Fatura Numarası Oluşturucu',
'minimum-order' => 'Minimum Sipariş Ayarları', 'minimum-order' => 'Minimum Sipariş Ayarları',
'minimum-order-amount' => 'Minimum Sipariş Tutarı', 'minimum-order-amount' => 'Minimum Sipariş Tutarı',
'default' => 'Varsayılan', 'default' => 'Varsayılan',

View File

@ -127,9 +127,9 @@
<h1 class="text-center">{{ __('admin::app.sales.invoices.invoice') }}</h1> <h1 class="text-center">{{ __('admin::app.sales.invoices.invoice') }}</h1>
</div> </div>
</div> </div>
@if (core()->getConfigData('sales.orderSettings.invoice_slip_design.logo')) @if (core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo'))
<div class="image"> <div class="image">
<img class="logo" src="{{ Storage::url(core()->getConfigData('sales.orderSettings.invoice_slip_design.logo')) }}"/> <img class="logo" src="{{ Storage::url(core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo')) }}"/>
</div> </div>
@endif @endif
<div class="merchant-details"> <div class="merchant-details">
@ -157,7 +157,7 @@
<div class="invoice-summary"> <div class="invoice-summary">
<div class="row"> <div class="row">
<span class="label">{{ __('admin::app.sales.invoices.invoice-id') }} -</span> <span class="label">{{ __('admin::app.sales.invoices.invoice-id') }} -</span>
<span class="value">#{{ $invoice->id }}</span> <span class="value">#{{ $invoice->increment_id ?? $invoice->id }}</span>
</div> </div>
<div class="row"> <div class="row">

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.master') @extends('admin::layouts.master')
@section('page_title') @section('page_title')
{{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->id]) }} {{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}
@stop @stop
@section('content-wrapper') @section('content-wrapper')
@ -16,7 +16,7 @@
<i class="icon angle-left-icon back-link" onclick="window.location = '{{ route('admin.sales.invoices.index') }}'"></i> <i class="icon angle-left-icon back-link" onclick="window.location = '{{ route('admin.sales.invoices.index') }}'"></i>
{{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->id]) }} {{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}
{!! view_render_event('sales.invoice.title.after', ['order' => $order]) !!} {!! view_render_event('sales.invoice.title.after', ['order' => $order]) !!}
</h1> </h1>

View File

@ -490,7 +490,7 @@
<tbody> <tbody>
@foreach ($order->invoices as $invoice) @foreach ($order->invoices as $invoice)
<tr> <tr>
<td>#{{ $invoice->id }}</td> <td>#{{ $invoice->increment_id ?? $invoice->id }}</td>
<td>{{ $invoice->created_at }}</td> <td>{{ $invoice->created_at }}</td>
<td>#{{ $invoice->order->increment_id }}</td> <td>#{{ $invoice->order->increment_id }}</td>
<td>{{ $invoice->address->name }}</td> <td>{{ $invoice->address->name }}</td>

View File

@ -1,6 +1,9 @@
<?php <?php
return [ return [
/**
* Order Settings
*/
[ [
'key' => 'sales.orderSettings', 'key' => 'sales.orderSettings',
'name' => 'admin::app.admin.system.order-settings', 'name' => 'admin::app.admin.system.order-settings',
@ -35,7 +38,7 @@ return [
'locale_based' => true, 'locale_based' => true,
], ],
[ [
'name' => 'order_number_generator-class', 'name' => 'order_number_generator_class',
'title' => 'admin::app.admin.system.order-number-generator-class', 'title' => 'admin::app.admin.system.order-number-generator-class',
'type' => 'text', 'type' => 'text',
'validation' => false, 'validation' => false,
@ -57,8 +60,55 @@ return [
'locale_based' => true, 'locale_based' => true,
], ],
] ]
],
/**
* Invoice Settings
*/
[
'key' => 'sales.invoice_setttings',
'name' => 'admin::app.admin.system.invoice-settings',
'sort' => 4,
], [ ], [
'key' => 'sales.orderSettings.invoice_slip_design', 'key' => 'sales.invoice_setttings.invoice_number',
'name' => 'admin::app.admin.system.invoice-number',
'sort' => 0,
'fields' => [
[
'name' => 'invoice_number_prefix',
'title' => 'admin::app.admin.system.invoice-number-prefix',
'type' => 'text',
'validation' => false,
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'invoice_number_length',
'title' => 'admin::app.admin.system.invoice-number-length',
'type' => 'text',
'validation' => 'numeric',
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'invoice_number_suffix',
'title' => 'admin::app.admin.system.invoice-number-suffix',
'type' => 'text',
'validation' => false,
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'invoice_number_generator_class',
'title' => 'admin::app.admin.system.invoice-number-generator-class',
'type' => 'text',
'validation' => false,
'channel_based' => true,
'locale_based' => true,
],
]
], [
'key' => 'sales.invoice_setttings.invoice_slip_design',
'name' => 'admin::app.admin.system.invoice-slip-design', 'name' => 'admin::app.admin.system.invoice-slip-design',
'sort' => 2, 'sort' => 2,
'fields' => [ 'fields' => [
@ -70,5 +120,5 @@ return [
'channel_based' => true, 'channel_based' => true,
], ],
] ]
] ],
]; ];

View File

@ -0,0 +1,13 @@
<?php
namespace Webkul\Sales\Contracts;
interface Sequencer
{
/**
* Create and return the next sequence number for e.g. an order.
*
* @return string
*/
public function generate(): string;
}

View File

@ -0,0 +1,49 @@
<?php
namespace Webkul\Sales\Generators;
use Webkul\Sales\Models\Invoice;
class InvoiceSequencer extends Sequencer
{
/**
* Create invoice sequencer instance.
*
* @return void
*/
public function __construct()
{
$this->setAllConfigs();
}
/**
* Set all configs.
*
* @param string $configKey
* @return void
*/
public function setAllConfigs()
{
$this->prefix = core()->getConfigData('sales.invoice_setttings.invoice_number.invoice_number_prefix');
$this->length = core()->getConfigData('sales.invoice_setttings.invoice_number.invoice_number_length');
$this->suffix = core()->getConfigData('sales.invoice_setttings.invoice_number.invoice_number_suffix');
$this->generatorClass = core()->getConfigData('sales.invoice_setttings.invoice_number.invoice_number_generator_class');
$this->lastId = $this->getLastId();
}
/**
* Get last id.
*
* @return int
*/
public function getLastId()
{
$lastOrder = Invoice::query()->orderBy('id', 'desc')->limit(1)->first();
return $lastOrder ? $lastOrder->id : 0;
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace Webkul\Sales\Generators;
use Webkul\Sales\Models\Order;
class OrderSequencer extends Sequencer
{
/**
* Create order sequencer instance.
*
* @return void
*/
public function __construct()
{
$this->setAllConfigs();
}
/**
* Set all configs.
*
* @param string $configKey
* @return void
*/
public function setAllConfigs()
{
$this->prefix = core()->getConfigData('sales.orderSettings.order_number.order_number_prefix');
$this->length = core()->getConfigData('sales.orderSettings.order_number.order_number_length');
$this->suffix = core()->getConfigData('sales.orderSettings.order_number.order_number_suffix');
$this->generatorClass = core()->getConfigData('sales.orderSettings.order_number.order_number_generator_class');
$this->lastId = $this->getLastId();
}
/**
* Get last id.
*
* @return int
*/
public function getLastId()
{
$lastOrder = Order::query()->orderBy('id', 'desc')->limit(1)->first();
return $lastOrder ? $lastOrder->id : 0;
}
}

View File

@ -0,0 +1,124 @@
<?php
namespace Webkul\Sales\Generators;
use Webkul\Sales\Contracts\Sequencer as SequencerContract;
class Sequencer implements SequencerContract
{
/**
* Length.
*
* @var string
*/
public $length;
/**
* Prefix.
*
* @var string
*/
public $prefix;
/**
* Suffix.
*
* @var string
*/
public $suffix;
/**
* Generator class.
*
* @var string
*/
public $generatorClass;
/**
* Last id.
*
* @var int
*/
public $lastId = 0;
/**
* Set length from the core config.
*
* @param string $configKey
* @return void
*/
public function setLength($configKey)
{
$this->length = core()->getConfigData($configKey);
}
/**
* Set prefix from the core config.
*
* @param string $configKey
* @return void
*/
public function setPrefix($configKey)
{
$this->prefix = core()->getConfigData($configKey);
}
/**
* Set suffix from the core config.
*
* @param string $configKey
* @return void
*/
public function setSuffix($configKey)
{
$this->suffix = core()->getConfigData($configKey);
}
/**
* Set generator class from the core config.
*
* @param string $configKey
* @return void
*/
public function setGeneratorClass($configKey)
{
$this->generatorClass = core()->getConfigData($configKey);
}
/**
* Resolve generator class.
*
* @return string
*/
public function resolveGeneratorClass()
{
if (
$this->generatorClass !== ''
&& class_exists($this->generatorClass)
&& in_array(SequencerContract::class, class_implements($this->generatorClass), true)
) {
return app($this->generatorClass)->generate();
}
return $this->generate();
}
/**
* Create and return the next sequence number for e.g. an order.
*
* @return string
*/
public function generate(): string
{
if ($this->length && ($this->prefix || $this->suffix)) {
$number = ($this->prefix) . sprintf(
"%0{$this->length}d",
0
) . ($this->lastId + 1) . ($this->suffix);
} else {
$number = $this->lastId + 1;
}
return $number;
}
}

View File

@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Webkul\Core\Eloquent\Repository; use Webkul\Core\Eloquent\Repository;
use Webkul\Sales\Contracts\Invoice; use Webkul\Sales\Contracts\Invoice;
use Webkul\Sales\Generators\InvoiceSequencer;
class InvoiceRepository extends Repository class InvoiceRepository extends Repository
{ {
@ -103,6 +104,7 @@ class InvoiceRepository extends Repository
} }
$invoice = $this->model->create([ $invoice = $this->model->create([
'increment_id' => $this->generateIncrementId(),
'order_id' => $order->id, 'order_id' => $order->id,
'total_qty' => $totalQty, 'total_qty' => $totalQty,
'state' => $state, 'state' => $state,
@ -221,6 +223,16 @@ class InvoiceRepository extends Repository
return $invoice; return $invoice;
} }
/**
* Generate increment id.
*
* @return int
*/
public function generateIncrementId()
{
return app(InvoiceSequencer::class)->resolveGeneratorClass();
}
/** /**
* @param \Webkul\Sales\Contracts\Invoice $invoice * @param \Webkul\Sales\Contracts\Invoice $invoice
* @return \Webkul\Sales\Contracts\Invoice * @return \Webkul\Sales\Contracts\Invoice

View File

@ -2,14 +2,13 @@
namespace Webkul\Sales\Repositories; namespace Webkul\Sales\Repositories;
use Webkul\Sales\Contracts\Order; use Illuminate\Container\Container as App;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Webkul\Core\Eloquent\Repository; use Webkul\Core\Eloquent\Repository;
use Illuminate\Support\Facades\Event; use Webkul\Sales\Contracts\Order;
use Webkul\Shop\Generators\Sequencer; use Webkul\Sales\Generators\OrderSequencer;
use Illuminate\Container\Container as App;
use Webkul\Shop\Generators\OrderNumberIdSequencer;
class OrderRepository extends Repository class OrderRepository extends Repository
{ {
@ -213,19 +212,7 @@ class OrderRepository extends Repository
*/ */
public function generateIncrementId() public function generateIncrementId()
{ {
/** return app(OrderSequencer::class)->resolveGeneratorClass();
* @var $generatorClass Sequencer
*/
$generatorClass = core()->getConfigData('sales.orderSettings.order_number.order_number_generator-class') ?: false;
if ($generatorClass !== false
&& class_exists($generatorClass)
&& in_array(Sequencer::class, class_implements($generatorClass), true)
) {
return $generatorClass::generate();
}
return OrderNumberIdSequencer::generate();
} }
/** /**

View File

@ -1,38 +0,0 @@
<?php
namespace Webkul\Shop\Generators;
use Webkul\Sales\Models\Order;
class OrderNumberIdSequencer implements Sequencer
{
/**
* @inheritDoc
*/
public static function generate(): string
{
foreach ([
'Prefix' => 'prefix',
'Length' => 'length',
'Suffix' => 'suffix',
] as
$varSuffix => $confKey) {
$var = "invoiceNumber{$varSuffix}";
$$var = core()->getConfigData('sales.orderSettings.order_number.order_number_' . $confKey) ?: false;
}
$lastOrder = Order::query()->orderBy('id', 'desc')->limit(1)->first();
$lastId = $lastOrder ? $lastOrder->id : 0;
if ($invoiceNumberLength && ($invoiceNumberPrefix || $invoiceNumberSuffix)) {
$invoiceNumber = ($invoiceNumberPrefix) . sprintf("%0{$invoiceNumberLength}d",
0) . ($lastId + 1) . ($invoiceNumberSuffix);
} else {
$invoiceNumber = $lastId + 1;
}
return $invoiceNumber;
}
}

View File

@ -1,15 +0,0 @@
<?php
namespace Webkul\Shop\Generators;
interface Sequencer
{
/**
* create and return the next sequence number for e.g. an order
*
* @return string
*/
public static function generate(): string;
}

View File

@ -129,9 +129,9 @@
<h1 class="text-center">{{ __('admin::app.sales.invoices.invoice') }}</h1> <h1 class="text-center">{{ __('admin::app.sales.invoices.invoice') }}</h1>
</div> </div>
</div> </div>
@if (core()->getConfigData('sales.orderSettings.invoice_slip_design.logo')) @if (core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo'))
<div class="image"> <div class="image">
<img class="logo" src="{{ Storage::url(core()->getConfigData('sales.orderSettings.invoice_slip_design.logo')) }}" alt=""/> <img class="logo" src="{{ Storage::url(core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo')) }}" alt=""/>
</div> </div>
@endif @endif
<div class="merchant-details"> <div class="merchant-details">
@ -160,7 +160,7 @@
<div class="row"> <div class="row">
<span class="label">{{ __('shop::app.customer.account.order.view.invoice-id') }} -</span> <span class="label">{{ __('shop::app.customer.account.order.view.invoice-id') }} -</span>
<span class="value">#{{ $invoice->id }}</span> <span class="value">#{{ $invoice->increment_id ?? $invoice->id }}</span>
</div> </div>
<div class="row"> <div class="row">

View File

@ -217,7 +217,7 @@
<div class="sale-section"> <div class="sale-section">
<div class="secton-title"> <div class="secton-title">
<span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->id]) }}</span> <span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}</span>
<a href="{{ route('customer.orders.print', $invoice->id) }}" class="pull-right"> <a href="{{ route('customer.orders.print', $invoice->id) }}" class="pull-right">
{{ __('shop::app.customer.account.order.view.print') }} {{ __('shop::app.customer.account.order.view.print') }}

View File

@ -10,7 +10,7 @@
<div style="padding: 30px;"> <div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;"> <div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<span style="font-weight: bold;"> <span style="font-weight: bold;">
{{ __('shop::app.mail.invoice.heading', ['order_id' => $order->increment_id, 'invoice_id' => $invoice->id]) }} {{ __('shop::app.mail.invoice.heading', ['order_id' => $order->increment_id, 'invoice_id' => $invoice->increment_id ?? $invoice->id]) }}
</span> <br> </span> <br>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;"> <p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">

View File

@ -229,7 +229,7 @@
<div class="sale-section"> <div class="sale-section">
<div class="section-title"> <div class="section-title">
<span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->id]) }}</span> <span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}</span>
<a href="{{ route('customer.orders.print', $invoice->id) }}" class="float-right"> <a href="{{ route('customer.orders.print', $invoice->id) }}" class="float-right">
{{ __('shop::app.customer.account.order.view.print') }} {{ __('shop::app.customer.account.order.view.print') }}