diff --git a/src/Libraries/Nop.Core/Domain/Orders/OrderSettings.cs b/src/Libraries/Nop.Core/Domain/Orders/OrderSettings.cs index 99e1351611f..d59b10ce7b1 100644 --- a/src/Libraries/Nop.Core/Domain/Orders/OrderSettings.cs +++ b/src/Libraries/Nop.Core/Domain/Orders/OrderSettings.cs @@ -1,142 +1,142 @@ -using Nop.Core.Configuration; - -namespace Nop.Core.Domain.Orders -{ - public class OrderSettings : ISettings - { - /// - /// Gets or sets a value indicating whether customer can make re-order - /// - public bool IsReOrderAllowed { get; set; } - - /// - /// Gets or sets a minimum order subtotal amount - /// - public decimal MinOrderSubtotalAmount { get; set; } - /// - /// Gets or sets a value indicating whether 'Minimum order subtotal amount' option - /// should be evaluated over 'X' value including tax or not - /// - public bool MinOrderSubtotalAmountIncludingTax { get; set; } - /// - /// Gets or sets a minimum order total amount - /// - public decimal MinOrderTotalAmount { get; set; } - - /// - /// Gets or sets a value indicating whether automatically update order totals on editing an order in admin area - /// - public bool AutoUpdateOrderTotalsOnEditingOrder { get; set; } - - /// - /// Gets or sets a value indicating whether anonymous checkout allowed - /// - public bool AnonymousCheckoutAllowed { get; set; } - - /// - /// Gets or sets a value indicating whether 'Terms of service' enabled on the shopping cart page - /// - public bool TermsOfServiceOnShoppingCartPage { get; set; } - /// - /// Gets or sets a value indicating whether 'Terms of service' enabled on the order confirmation page - /// - public bool TermsOfServiceOnOrderConfirmPage { get; set; } - - /// - /// Gets or sets a value indicating whether 'One-page checkout' is enabled - /// - public bool OnePageCheckoutEnabled { get; set; } - - /// - /// Gets or sets a value indicating whether order totals should be displayed on 'Payment info' tab of 'One-page checkout' page - /// - public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab { get; set; } - /// - /// Gets or sets a value indicating whether "Billing address" step should be skipped - /// - public bool DisableBillingAddressCheckoutStep { get; set; } - /// - /// Gets or sets a value indicating whether "Order completed" page should be skipped - /// - public bool DisableOrderCompletedPage { get; set; } - - /// - /// Gets or sets a value indicating we should attach PDF invoice to "Order placed" email - /// - public bool AttachPdfInvoiceToOrderPlacedEmail { get; set; } - /// - /// Gets or sets a value indicating we should attach PDF invoice to "Order paid" email - /// - public bool AttachPdfInvoiceToOrderPaidEmail { get; set; } - /// - /// Gets or sets a value indicating we should attach PDF invoice to "Order completed" email - /// - public bool AttachPdfInvoiceToOrderCompletedEmail { get; set; } - /// - /// Gets or sets a value indicating we PDF invoices should be generated in customer language. Otherwise, use the current one - /// - public bool GeneratePdfInvoiceInCustomerLanguage { get; set; } - - /// - /// Gets or sets a value indicating whether "Return requests" are allowed - /// - public bool ReturnRequestsEnabled { get; set; } - /// - /// Gets or sets a value indicating whether customers are allowed to upload files - /// - public bool ReturnRequestsAllowFiles { get; set; } - /// - /// Gets or sets maximum file size for upload file (return request). Set 0 to allow any file size - /// - public int ReturnRequestsFileMaximumSize { get; set; } - /// - /// Gets or sets a value "Return requests" number mask - /// - public string ReturnRequestNumberMask { get; set; } - /// - /// Gets or sets a number of days that the Return Request Link will be available for customers after order placing. - /// - public int NumberOfDaysReturnRequestAvailable { get; set; } - - /// - /// Gets or sets a value indicating whether to activate related gift cards after completing the order - /// - public bool ActivateGiftCardsAfterCompletingOrder { get; set; } - /// - /// Gets or sets a value indicating whether to deactivate related gift cards after cancelling the order - /// - public bool DeactivateGiftCardsAfterCancellingOrder { get; set; } - /// - /// Gets or sets a value indicating whether to deactivate related gift cards after deleting the order - /// - public bool DeactivateGiftCardsAfterDeletingOrder { get; set; } - - /// - /// Gets or sets an order placement interval in seconds (prevent 2 orders being placed within an X seconds time frame). - /// - public int MinimumOrderPlacementInterval { get; set; } - - /// - /// Gets or sets a value indicating whether an order status should be set to "Complete" only when its shipping status is "Delivered". Otherwise, "Shipped" status will be enough. - /// - public bool CompleteOrderWhenDelivered { get; set; } - /// - /// Last issued Invoice Id - /// - public int InvoiceIdent { get; set; } - /// - /// Last issued Invoice Date - /// - public int InvoiceYear { get; set; } - - /// - /// Gets or sets a custom order number mask - /// - public string CustomOrderNumberMask { get; set; } - - /// - /// Gets or sets a value indicating whether the orders need to be exported with their products - /// - public bool ExportWithProducts { get; set; } - } +using Nop.Core.Configuration; + +namespace Nop.Core.Domain.Orders +{ + public class OrderSettings : ISettings + { + /// + /// Gets or sets a value indicating whether customer can make re-order + /// + public bool IsReOrderAllowed { get; set; } + + /// + /// Gets or sets a minimum order subtotal amount + /// + public decimal MinOrderSubtotalAmount { get; set; } + /// + /// Gets or sets a value indicating whether 'Minimum order subtotal amount' option + /// should be evaluated over 'X' value including tax or not + /// + public bool MinOrderSubtotalAmountIncludingTax { get; set; } + /// + /// Gets or sets a minimum order total amount + /// + public decimal MinOrderTotalAmount { get; set; } + + /// + /// Gets or sets a value indicating whether automatically update order totals on editing an order in admin area + /// + public bool AutoUpdateOrderTotalsOnEditingOrder { get; set; } + + /// + /// Gets or sets a value indicating whether anonymous checkout allowed + /// + public bool AnonymousCheckoutAllowed { get; set; } + + /// + /// Gets or sets a value indicating whether 'Terms of service' enabled on the shopping cart page + /// + public bool TermsOfServiceOnShoppingCartPage { get; set; } + /// + /// Gets or sets a value indicating whether 'Terms of service' enabled on the order confirmation page + /// + public bool TermsOfServiceOnOrderConfirmPage { get; set; } + + /// + /// Gets or sets a value indicating whether 'One-page checkout' is enabled + /// + public bool OnePageCheckoutEnabled { get; set; } + + /// + /// Gets or sets a value indicating whether order totals should be displayed on 'Payment info' tab of 'One-page checkout' page + /// + public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab { get; set; } + /// + /// Gets or sets a value indicating whether "Billing address" step should be skipped + /// + public bool DisableBillingAddressCheckoutStep { get; set; } + /// + /// Gets or sets a value indicating whether "Order completed" page should be skipped + /// + public bool DisableOrderCompletedPage { get; set; } + + /// + /// Gets or sets a value indicating we should attach PDF invoice to "Order placed" email + /// + public bool AttachPdfInvoiceToOrderPlacedEmail { get; set; } + /// + /// Gets or sets a value indicating we should attach PDF invoice to "Order paid" email + /// + public bool AttachPdfInvoiceToOrderPaidEmail { get; set; } + /// + /// Gets or sets a value indicating we should attach PDF invoice to "Order completed" email + /// + public bool AttachPdfInvoiceToOrderCompletedEmail { get; set; } + /// + /// Gets or sets a value indicating we PDF invoices should be generated in customer language. Otherwise, use the current one + /// + public bool GeneratePdfInvoiceInCustomerLanguage { get; set; } + + /// + /// Gets or sets a value indicating whether "Return requests" are allowed + /// + public bool ReturnRequestsEnabled { get; set; } + /// + /// Gets or sets a value indicating whether customers are allowed to upload files + /// + public bool ReturnRequestsAllowFiles { get; set; } + /// + /// Gets or sets maximum file size for upload file (return request). Set 0 to allow any file size + /// + public int ReturnRequestsFileMaximumSize { get; set; } + /// + /// Gets or sets a value "Return requests" number mask + /// + public string ReturnRequestNumberMask { get; set; } + /// + /// Gets or sets a number of days that the Return Request Link will be available for customers after order placing. + /// + public int NumberOfDaysReturnRequestAvailable { get; set; } + + /// + /// Gets or sets a value indicating whether to activate related gift cards after completing the order + /// + public bool ActivateGiftCardsAfterCompletingOrder { get; set; } + /// + /// Gets or sets a value indicating whether to deactivate related gift cards after cancelling the order + /// + public bool DeactivateGiftCardsAfterCancellingOrder { get; set; } + /// + /// Gets or sets a value indicating whether to deactivate related gift cards after deleting the order + /// + public bool DeactivateGiftCardsAfterDeletingOrder { get; set; } + + /// + /// Gets or sets an order placement interval in seconds (prevent 2 orders being placed within an X seconds time frame). + /// + public int MinimumOrderPlacementInterval { get; set; } + + /// + /// Gets or sets a value indicating whether an order status should be set to "Complete" only when its shipping status is "Delivered". Otherwise, "Shipped" status will be enough. + /// + public bool CompleteOrderWhenDelivered { get; set; } + /// + /// Last issued Invoice Id + /// + public int InvoiceIdent { get; set; } + /// + /// Last issued Invoice Year + /// + public int InvoiceYear { get; set; } + + /// + /// Gets or sets a custom order number mask + /// + public string CustomOrderNumberMask { get; set; } + + /// + /// Gets or sets a value indicating whether the orders need to be exported with their products + /// + public bool ExportWithProducts { get; set; } + } } \ No newline at end of file diff --git a/src/Libraries/Nop.Services/Orders/IOrderProcessingService.cs b/src/Libraries/Nop.Services/Orders/IOrderProcessingService.cs index fec0cfbe7b7..a9bd687887d 100644 --- a/src/Libraries/Nop.Services/Orders/IOrderProcessingService.cs +++ b/src/Libraries/Nop.Services/Orders/IOrderProcessingService.cs @@ -1,281 +1,286 @@ -using System.Collections.Generic; -using Nop.Core.Domain.Customers; -using Nop.Core.Domain.Orders; -using Nop.Core.Domain.Shipping; -using Nop.Services.Payments; - -namespace Nop.Services.Orders -{ - /// - /// Order processing service interface - /// - public partial interface IOrderProcessingService - { - /// - /// Checks order status - /// - /// Order - /// Validated order - void CheckOrderStatus(Order order); - - /// - /// Places an order - /// - /// Process payment request - /// Place order result - PlaceOrderResult PlaceOrder(ProcessPaymentRequest processPaymentRequest); - - /// - /// Update order totals - /// - /// Parameters for the updating order - void UpdateOrderTotals(UpdateOrderParameters updateOrderParameters); - - /// - /// Deletes an order - /// - /// The order - void DeleteOrder(Order order); - - - /// - /// Process next recurring payment - /// - /// Recurring payment - /// Process payment result (info about last payment for automatic recurring payments) - /// Collection of errors - IEnumerable ProcessNextRecurringPayment(RecurringPayment recurringPayment, ProcessPaymentResult paymentResult = null); - - /// - /// Cancels a recurring payment - /// - /// Recurring payment - IList CancelRecurringPayment(RecurringPayment recurringPayment); - - /// - /// Gets a value indicating whether a customer can cancel recurring payment - /// - /// Customer - /// Recurring Payment - /// value indicating whether a customer can cancel recurring payment - bool CanCancelRecurringPayment(Customer customerToValidate, RecurringPayment recurringPayment); - - /// - /// Gets a value indicating whether a customer can retry last failed recurring payment - /// - /// Customer - /// Recurring Payment - /// True if a customer can retry payment; otherwise false - bool CanRetryLastRecurringPayment(Customer customer, RecurringPayment recurringPayment); - - - - /// - /// Send a shipment - /// - /// Shipment - /// True to notify customer - void Ship(Shipment shipment, bool notifyCustomer); - - /// - /// Marks a shipment as delivered - /// - /// Shipment - /// True to notify customer - void Deliver(Shipment shipment, bool notifyCustomer); - - - - /// - /// Gets a value indicating whether cancel is allowed - /// - /// Order - /// A value indicating whether cancel is allowed - bool CanCancelOrder(Order order); - - /// - /// Cancels order - /// - /// Order - /// True to notify customer - void CancelOrder(Order order, bool notifyCustomer); - - - - /// - /// Gets a value indicating whether order can be marked as authorized - /// - /// Order - /// A value indicating whether order can be marked as authorized - bool CanMarkOrderAsAuthorized(Order order); - - /// - /// Marks order as authorized - /// - /// Order - void MarkAsAuthorized(Order order); - - - - /// - /// Gets a value indicating whether capture from admin panel is allowed - /// - /// Order - /// A value indicating whether capture from admin panel is allowed - bool CanCapture(Order order); - - /// - /// Capture an order (from admin panel) - /// - /// Order - /// A list of errors; empty list if no errors - IList Capture(Order order); - - /// - /// Gets a value indicating whether order can be marked as paid - /// - /// Order - /// A value indicating whether order can be marked as paid - bool CanMarkOrderAsPaid(Order order); - - /// - /// Marks order as paid - /// - /// Order - void MarkOrderAsPaid(Order order); - - - - /// - /// Gets a value indicating whether refund from admin panel is allowed - /// - /// Order - /// A value indicating whether refund from admin panel is allowed - bool CanRefund(Order order); - - /// - /// Refunds an order (from admin panel) - /// - /// Order - /// A list of errors; empty list if no errors - IList Refund(Order order); - - /// - /// Gets a value indicating whether order can be marked as refunded - /// - /// Order - /// A value indicating whether order can be marked as refunded - bool CanRefundOffline(Order order); - - /// - /// Refunds an order (offline) - /// - /// Order - void RefundOffline(Order order); - - /// - /// Gets a value indicating whether partial refund from admin panel is allowed - /// - /// Order - /// Amount to refund - /// A value indicating whether refund from admin panel is allowed - bool CanPartiallyRefund(Order order, decimal amountToRefund); - - /// - /// Partially refunds an order (from admin panel) - /// - /// Order - /// Amount to refund - /// A list of errors; empty list if no errors - IList PartiallyRefund(Order order, decimal amountToRefund); - - /// - /// Gets a value indicating whether order can be marked as partially refunded - /// - /// Order - /// Amount to refund - /// A value indicating whether order can be marked as partially refunded - bool CanPartiallyRefundOffline(Order order, decimal amountToRefund); - - /// - /// Partially refunds an order (offline) - /// - /// Order - /// Amount to refund - void PartiallyRefundOffline(Order order, decimal amountToRefund); - - - - /// - /// Gets a value indicating whether void from admin panel is allowed - /// - /// Order - /// A value indicating whether void from admin panel is allowed - bool CanVoid(Order order); - - /// - /// Voids order (from admin panel) - /// - /// Order - /// Voided order - IList Void(Order order); - - /// - /// Gets a value indicating whether order can be marked as voided - /// - /// Order - /// A value indicating whether order can be marked as voided - bool CanVoidOffline(Order order); - - /// - /// Voids order (offline) - /// - /// Order - void VoidOffline(Order order); - - - - - /// - /// Place order items in current user shopping cart. - /// - /// The order - void ReOrder(Order order); - - /// - /// Check whether return request is allowed - /// - /// Order - /// Result - bool IsReturnRequestAllowed(Order order); - - - - /// - /// Valdiate minimum order sub-total amount - /// - /// Shopping cart - /// true - OK; false - minimum order sub-total amount is not reached - bool ValidateMinOrderSubtotalAmount(IList cart); - - /// - /// Valdiate minimum order total amount - /// - /// Shopping cart - /// true - OK; false - minimum order total amount is not reached - bool ValidateMinOrderTotalAmount(IList cart); - /// - /// Get next Invoice ID and store settings - /// - /// - string GetInvoiceId(); - - /// - /// Gets a value indicating whether payment workflow is required - /// - /// Shopping cart - /// A value indicating reward points should be used; null to detect current choice of the customer - /// true - OK; false - minimum order total amount is not reached - bool IsPaymentWorkflowRequired(IList cart, bool? useRewardPoints = null); - } -} +using System.Collections.Generic; +using Nop.Core.Domain.Customers; +using Nop.Core.Domain.Orders; +using Nop.Core.Domain.Shipping; +using Nop.Services.Payments; + +namespace Nop.Services.Orders +{ + /// + /// Order processing service interface + /// + public partial interface IOrderProcessingService + { + /// + /// Checks order status + /// + /// Order + /// Validated order + void CheckOrderStatus(Order order); + + /// + /// Places an order + /// + /// Process payment request + /// Place order result + PlaceOrderResult PlaceOrder(ProcessPaymentRequest processPaymentRequest); + + /// + /// Update order totals + /// + /// Parameters for the updating order + void UpdateOrderTotals(UpdateOrderParameters updateOrderParameters); + + /// + /// Deletes an order + /// + /// The order + void DeleteOrder(Order order); + + + /// + /// Process next recurring payment + /// + /// Recurring payment + /// Process payment result (info about last payment for automatic recurring payments) + /// Collection of errors + IEnumerable ProcessNextRecurringPayment(RecurringPayment recurringPayment, ProcessPaymentResult paymentResult = null); + + /// + /// Cancels a recurring payment + /// + /// Recurring payment + IList CancelRecurringPayment(RecurringPayment recurringPayment); + + /// + /// Gets a value indicating whether a customer can cancel recurring payment + /// + /// Customer + /// Recurring Payment + /// value indicating whether a customer can cancel recurring payment + bool CanCancelRecurringPayment(Customer customerToValidate, RecurringPayment recurringPayment); + + /// + /// Gets a value indicating whether a customer can retry last failed recurring payment + /// + /// Customer + /// Recurring Payment + /// True if a customer can retry payment; otherwise false + bool CanRetryLastRecurringPayment(Customer customer, RecurringPayment recurringPayment); + + + + /// + /// Send a shipment + /// + /// Shipment + /// True to notify customer + void Ship(Shipment shipment, bool notifyCustomer); + + /// + /// Marks a shipment as delivered + /// + /// Shipment + /// True to notify customer + void Deliver(Shipment shipment, bool notifyCustomer); + + + + /// + /// Gets a value indicating whether cancel is allowed + /// + /// Order + /// A value indicating whether cancel is allowed + bool CanCancelOrder(Order order); + + /// + /// Cancels order + /// + /// Order + /// True to notify customer + void CancelOrder(Order order, bool notifyCustomer); + + + + /// + /// Gets a value indicating whether order can be marked as authorized + /// + /// Order + /// A value indicating whether order can be marked as authorized + bool CanMarkOrderAsAuthorized(Order order); + + /// + /// Marks order as authorized + /// + /// Order + void MarkAsAuthorized(Order order); + + + + /// + /// Gets a value indicating whether capture from admin panel is allowed + /// + /// Order + /// A value indicating whether capture from admin panel is allowed + bool CanCapture(Order order); + + /// + /// Capture an order (from admin panel) + /// + /// Order + /// A list of errors; empty list if no errors + IList Capture(Order order); + + /// + /// Gets a value indicating whether order can be marked as paid + /// + /// Order + /// A value indicating whether order can be marked as paid + bool CanMarkOrderAsPaid(Order order); + + /// + /// Marks order as paid + /// + /// Order + void MarkOrderAsPaid(Order order); + + + + /// + /// Gets a value indicating whether refund from admin panel is allowed + /// + /// Order + /// A value indicating whether refund from admin panel is allowed + bool CanRefund(Order order); + + /// + /// Refunds an order (from admin panel) + /// + /// Order + /// A list of errors; empty list if no errors + IList Refund(Order order); + + /// + /// Gets a value indicating whether order can be marked as refunded + /// + /// Order + /// A value indicating whether order can be marked as refunded + bool CanRefundOffline(Order order); + + /// + /// Refunds an order (offline) + /// + /// Order + void RefundOffline(Order order); + + /// + /// Gets a value indicating whether partial refund from admin panel is allowed + /// + /// Order + /// Amount to refund + /// A value indicating whether refund from admin panel is allowed + bool CanPartiallyRefund(Order order, decimal amountToRefund); + + /// + /// Partially refunds an order (from admin panel) + /// + /// Order + /// Amount to refund + /// A list of errors; empty list if no errors + IList PartiallyRefund(Order order, decimal amountToRefund); + + /// + /// Gets a value indicating whether order can be marked as partially refunded + /// + /// Order + /// Amount to refund + /// A value indicating whether order can be marked as partially refunded + bool CanPartiallyRefundOffline(Order order, decimal amountToRefund); + + /// + /// Partially refunds an order (offline) + /// + /// Order + /// Amount to refund + void PartiallyRefundOffline(Order order, decimal amountToRefund); + + + + /// + /// Gets a value indicating whether void from admin panel is allowed + /// + /// Order + /// A value indicating whether void from admin panel is allowed + bool CanVoid(Order order); + + /// + /// Voids order (from admin panel) + /// + /// Order + /// Voided order + IList Void(Order order); + + /// + /// Gets a value indicating whether order can be marked as voided + /// + /// Order + /// A value indicating whether order can be marked as voided + bool CanVoidOffline(Order order); + + /// + /// Voids order (offline) + /// + /// Order + void VoidOffline(Order order); + + + + + /// + /// Place order items in current user shopping cart. + /// + /// The order + void ReOrder(Order order); + + /// + /// Check whether return request is allowed + /// + /// Order + /// Result + bool IsReturnRequestAllowed(Order order); + + + + /// + /// Valdiate minimum order sub-total amount + /// + /// Shopping cart + /// true - OK; false - minimum order sub-total amount is not reached + bool ValidateMinOrderSubtotalAmount(IList cart); + + /// + /// Valdiate minimum order total amount + /// + /// Shopping cart + /// true - OK; false - minimum order total amount is not reached + bool ValidateMinOrderTotalAmount(IList cart); + /// + /// Get next Invoice ID and store settings + /// + /// + string GetInvoiceId(); + + /// + /// Gets a value indicating whether payment workflow is required + /// + /// Shopping cart + /// A value indicating reward points should be used; null to detect current choice of the customer + /// true - OK; false - minimum order total amount is not reached + bool IsPaymentWorkflowRequired(IList cart, bool? useRewardPoints = null); + /// + /// Get next Invoice ID and store settings + /// + /// + string GetInvoiceId(int storeId); + } +} diff --git a/src/Libraries/Nop.Services/Orders/OrderProcessingService.cs b/src/Libraries/Nop.Services/Orders/OrderProcessingService.cs index b047155dde7..099b45585d6 100644 --- a/src/Libraries/Nop.Services/Orders/OrderProcessingService.cs +++ b/src/Libraries/Nop.Services/Orders/OrderProcessingService.cs @@ -1241,7 +1241,7 @@ public virtual void CheckOrderStatus(Order order) if (order.PaymentStatus == PaymentStatus.Paid && order.InvoiceId == null) { order.InvoiceDateUtc = DateTime.UtcNow; - order.InvoiceId = GetInvoiceId(); + order.InvoiceId = GetInvoiceId(order.StoreId); _orderService.UpdateOrder(order); } @@ -3260,7 +3260,7 @@ public virtual bool ValidateMinOrderTotalAmount(IList cart) /// Get invoice ID /// /// - public virtual string GetInvoiceId() + public virtual string GetInvoiceId(int storeId) { var actYear = DateTime.UtcNow.Year; int ident = _orderSettings.InvoiceIdent; @@ -3269,7 +3269,7 @@ public virtual string GetInvoiceId() // Reset counter if a new year ident = 1; _orderSettings.InvoiceYear = actYear; - _settingService.SetSetting("ordersettings.invoiceyear", _orderSettings.InvoiceYear); + _settingService.SetSetting("ordersettings.invoiceyear", _orderSettings.InvoiceYear, storeId); } else { @@ -3277,7 +3277,7 @@ public virtual string GetInvoiceId() } _orderSettings.InvoiceIdent = ident; // Update settings - _settingService.SetSetting("ordersettings.invoiceident", _orderSettings.InvoiceIdent); + _settingService.SetSetting("ordersettings.invoiceident", _orderSettings.InvoiceIdent, storeId); return string.Format("I-{0}.{1}", DateTime.UtcNow.Year, ident.ToString("D5")); } diff --git a/src/Presentation/Nop.Web/Administration/Controllers/OrderController.cs b/src/Presentation/Nop.Web/Administration/Controllers/OrderController.cs index 1672741e252..47fa0b08894 100644 --- a/src/Presentation/Nop.Web/Administration/Controllers/OrderController.cs +++ b/src/Presentation/Nop.Web/Administration/Controllers/OrderController.cs @@ -2207,7 +2207,7 @@ public ActionResult EditInvoiceInfo(int id, OrderModel model) //assign invoice id when null if (model.InvoiceId == null) { - order.InvoiceId = _orderProcessingService.GetInvoiceId(); + order.InvoiceId = _orderProcessingService.GetInvoiceId(order.StoreId); order.InvoiceDateUtc = DateTime.UtcNow; //not needed, we use redirection now //ModelState.SetModelValue("InvoiceId", new ValueProviderResult(order.InvoiceId, "", ModelState["InvoiceId"].Value.Culture)); diff --git a/src/Presentation/Nop.Web/Administration/Controllers/SettingController.cs b/src/Presentation/Nop.Web/Administration/Controllers/SettingController.cs index 30f7da73f2c..578d84baf13 100644 --- a/src/Presentation/Nop.Web/Administration/Controllers/SettingController.cs +++ b/src/Presentation/Nop.Web/Administration/Controllers/SettingController.cs @@ -1117,6 +1117,8 @@ public virtual ActionResult Order() model.ReturnRequestNumberMask_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.ReturnRequestNumberMask, storeScope); model.NumberOfDaysReturnRequestAvailable_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.NumberOfDaysReturnRequestAvailable, storeScope); model.CustomOrderNumberMask_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.CustomOrderNumberMask, storeScope); + model.InvoiceIdent_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.InvoiceIdent, storeScope); + model.InvoiceYear_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.InvoiceYear, storeScope); model.ExportWithProducts_OverrideForStore = _settingService.SettingExists(orderSettings, x => x.ExportWithProducts, storeScope); } @@ -1164,6 +1166,8 @@ public virtual ActionResult Order(OrderSettingsModel model) _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.ReturnRequestNumberMask, model.ReturnRequestNumberMask_OverrideForStore, storeScope, false); _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.NumberOfDaysReturnRequestAvailable, model.NumberOfDaysReturnRequestAvailable_OverrideForStore, storeScope, false); _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.CustomOrderNumberMask, model.CustomOrderNumberMask_OverrideForStore, storeScope, false); + _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.InvoiceIdent, model.InvoiceIdent_OverrideForStore, storeScope, false); + _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.InvoiceYear, model.InvoiceYear_OverrideForStore, storeScope, false); _settingService.SaveSettingOverridablePerStore(orderSettings, x => x.ExportWithProducts, model.ExportWithProducts_OverrideForStore, storeScope, false); _settingService.SaveSetting(orderSettings, x => x.ActivateGiftCardsAfterCompletingOrder, 0, false); _settingService.SaveSetting(orderSettings, x => x.DeactivateGiftCardsAfterCancellingOrder, 0, false); @@ -2289,7 +2293,7 @@ public virtual ActionResult SettingDelete(int id) return new NullJsonResult(); } - //action displaying notification (warning) to a store owner about a lot of traffic + //action displaying notification (warning) to a store owner about a lot of traffic //between the Redis server and the application when LoadAllLocaleRecordsOnStartup seetting is set [ValidateInput(false)] public ActionResult RedisCacheHighTrafficWarning(bool loadAllLocaleRecordsOnStartup) diff --git a/src/Presentation/Nop.Web/Administration/Infrastructure/Mapper/AdminMapperConfiguration.cs b/src/Presentation/Nop.Web/Administration/Infrastructure/Mapper/AdminMapperConfiguration.cs index 1955eb27ef5..2352161214a 100644 --- a/src/Presentation/Nop.Web/Administration/Infrastructure/Mapper/AdminMapperConfiguration.cs +++ b/src/Presentation/Nop.Web/Administration/Infrastructure/Mapper/AdminMapperConfiguration.cs @@ -899,6 +899,9 @@ public Action GetConfiguration() .ForMember(dest => dest.PrimaryStoreCurrencyCode, mo => mo.Ignore()) .ForMember(dest => dest.OrderIdent, mo => mo.Ignore()) .ForMember(dest => dest.InvoiceIdent, mo => mo.Ignore()) + .ForMember(dest => dest.InvoiceIdent_OverrideForStore, mo => mo.Ignore()) + .ForMember(dest => dest.InvoiceYear, mo => mo.Ignore()) + .ForMember(dest => dest.InvoiceYear_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ActiveStoreScopeConfiguration, mo => mo.Ignore()) .ForMember(dest => dest.IsReOrderAllowed_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.MinOrderSubtotalAmount_OverrideForStore, mo => mo.Ignore()) @@ -921,6 +924,7 @@ public Action GetConfiguration() .ForMember(dest => dest.CustomProperties, mo => mo.Ignore()) .ForMember(dest => dest.ReturnRequestNumberMask_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.CustomOrderNumberMask_OverrideForStore, mo => mo.Ignore()) + .ForMember(dest => dest.InvoiceIdent_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportWithProducts_OverrideForStore, mo => mo.Ignore()); cfg.CreateMap() .ForMember(dest => dest.GeneratePdfInvoiceInCustomerLanguage, mo => mo.Ignore()) diff --git a/src/Presentation/Nop.Web/Administration/Models/Settings/OrderSettingsModel.cs b/src/Presentation/Nop.Web/Administration/Models/Settings/OrderSettingsModel.cs index e7410dc2d6f..90a3640aea8 100644 --- a/src/Presentation/Nop.Web/Administration/Models/Settings/OrderSettingsModel.cs +++ b/src/Presentation/Nop.Web/Administration/Models/Settings/OrderSettingsModel.cs @@ -1,112 +1,116 @@ -using Nop.Web.Framework; -using Nop.Web.Framework.Mvc; - -namespace Nop.Admin.Models.Settings -{ - public partial class OrderSettingsModel : BaseNopModel - { - public int ActiveStoreScopeConfiguration { get; set; } - - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.IsReOrderAllowed")] - public bool IsReOrderAllowed { get; set; } - public bool IsReOrderAllowed_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderSubtotalAmount")] - public decimal MinOrderSubtotalAmount { get; set; } - public bool MinOrderSubtotalAmount_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderSubtotalAmountIncludingTax")] - public bool MinOrderSubtotalAmountIncludingTax { get; set; } - public bool MinOrderSubtotalAmountIncludingTax_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderTotalAmount")] - public decimal MinOrderTotalAmount { get; set; } - public bool MinOrderTotalAmount_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.AutoUpdateOrderTotalsOnEditingOrder")] - public bool AutoUpdateOrderTotalsOnEditingOrder { get; set; } - public bool AutoUpdateOrderTotalsOnEditingOrder_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.AnonymousCheckoutAllowed")] - public bool AnonymousCheckoutAllowed { get; set; } - public bool AnonymousCheckoutAllowed_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.TermsOfServiceOnShoppingCartPage")] - public bool TermsOfServiceOnShoppingCartPage { get; set; } - public bool TermsOfServiceOnShoppingCartPage_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.TermsOfServiceOnOrderConfirmPage")] - public bool TermsOfServiceOnOrderConfirmPage { get; set; } - public bool TermsOfServiceOnOrderConfirmPage_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.OnePageCheckoutEnabled")] - public bool OnePageCheckoutEnabled { get; set; } - public bool OnePageCheckoutEnabled_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab")] - public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab { get; set; } - public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.DisableBillingAddressCheckoutStep")] - public bool DisableBillingAddressCheckoutStep { get; set; } - public bool DisableBillingAddressCheckoutStep_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.DisableOrderCompletedPage")] - public bool DisableOrderCompletedPage { get; set; } - public bool DisableOrderCompletedPage_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderPlacedEmail")] - public bool AttachPdfInvoiceToOrderPlacedEmail { get; set; } - public bool AttachPdfInvoiceToOrderPlacedEmail_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderPaidEmail")] - public bool AttachPdfInvoiceToOrderPaidEmail { get; set; } - public bool AttachPdfInvoiceToOrderPaidEmail_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderCompletedEmail")] - public bool AttachPdfInvoiceToOrderCompletedEmail { get; set; } - public bool AttachPdfInvoiceToOrderCompletedEmail_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestsEnabled")] - public bool ReturnRequestsEnabled { get; set; } - public bool ReturnRequestsEnabled_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestsAllowFiles")] - public bool ReturnRequestsAllowFiles { get; set; } - public bool ReturnRequestsAllowFiles_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestNumberMask")] - public string ReturnRequestNumberMask { get; set; } - public bool ReturnRequestNumberMask_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.NumberOfDaysReturnRequestAvailable")] - public int NumberOfDaysReturnRequestAvailable { get; set; } - public bool NumberOfDaysReturnRequestAvailable_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.ActivateGiftCardsAfterCompletingOrder")] - public bool ActivateGiftCardsAfterCompletingOrder { get; set; } - [NopResourceDisplayName("Admin.Configuration.Settings.Order.DeactivateGiftCardsAfterCancellingOrder")] - public bool DeactivateGiftCardsAfterCancellingOrder { get; set; } - [NopResourceDisplayName("Admin.Configuration.Settings.Order.DeactivateGiftCardsAfterDeletingOrder")] - public bool DeactivateGiftCardsAfterDeletingOrder { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.CompleteOrderWhenDelivered")] - public bool CompleteOrderWhenDelivered { get; set; } - - public string PrimaryStoreCurrencyCode { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.OrderIdent")] - public int? OrderIdent { get; set; } - [NopResourceDisplayName("Admin.Configuration.Settings.Order.InvoiceIdent")] - public int InvoiceIdent { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.CustomOrderNumberMask")] - public string CustomOrderNumberMask { get; set; } - public bool CustomOrderNumberMask_OverrideForStore { get; set; } - - [NopResourceDisplayName("Admin.Configuration.Settings.Order.ExportWithProducts")] - public bool ExportWithProducts { get; set; } - public bool ExportWithProducts_OverrideForStore { get; set; } - } +using Nop.Web.Framework; +using Nop.Web.Framework.Mvc; + +namespace Nop.Admin.Models.Settings +{ + public partial class OrderSettingsModel : BaseNopModel + { + public int ActiveStoreScopeConfiguration { get; set; } + + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.IsReOrderAllowed")] + public bool IsReOrderAllowed { get; set; } + public bool IsReOrderAllowed_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderSubtotalAmount")] + public decimal MinOrderSubtotalAmount { get; set; } + public bool MinOrderSubtotalAmount_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderSubtotalAmountIncludingTax")] + public bool MinOrderSubtotalAmountIncludingTax { get; set; } + public bool MinOrderSubtotalAmountIncludingTax_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.MinOrderTotalAmount")] + public decimal MinOrderTotalAmount { get; set; } + public bool MinOrderTotalAmount_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.AutoUpdateOrderTotalsOnEditingOrder")] + public bool AutoUpdateOrderTotalsOnEditingOrder { get; set; } + public bool AutoUpdateOrderTotalsOnEditingOrder_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.AnonymousCheckoutAllowed")] + public bool AnonymousCheckoutAllowed { get; set; } + public bool AnonymousCheckoutAllowed_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.TermsOfServiceOnShoppingCartPage")] + public bool TermsOfServiceOnShoppingCartPage { get; set; } + public bool TermsOfServiceOnShoppingCartPage_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.TermsOfServiceOnOrderConfirmPage")] + public bool TermsOfServiceOnOrderConfirmPage { get; set; } + public bool TermsOfServiceOnOrderConfirmPage_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.OnePageCheckoutEnabled")] + public bool OnePageCheckoutEnabled { get; set; } + public bool OnePageCheckoutEnabled_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab")] + public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab { get; set; } + public bool OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.DisableBillingAddressCheckoutStep")] + public bool DisableBillingAddressCheckoutStep { get; set; } + public bool DisableBillingAddressCheckoutStep_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.DisableOrderCompletedPage")] + public bool DisableOrderCompletedPage { get; set; } + public bool DisableOrderCompletedPage_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderPlacedEmail")] + public bool AttachPdfInvoiceToOrderPlacedEmail { get; set; } + public bool AttachPdfInvoiceToOrderPlacedEmail_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderPaidEmail")] + public bool AttachPdfInvoiceToOrderPaidEmail { get; set; } + public bool AttachPdfInvoiceToOrderPaidEmail_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.AttachPdfInvoiceToOrderCompletedEmail")] + public bool AttachPdfInvoiceToOrderCompletedEmail { get; set; } + public bool AttachPdfInvoiceToOrderCompletedEmail_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestsEnabled")] + public bool ReturnRequestsEnabled { get; set; } + public bool ReturnRequestsEnabled_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestsAllowFiles")] + public bool ReturnRequestsAllowFiles { get; set; } + public bool ReturnRequestsAllowFiles_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.ReturnRequestNumberMask")] + public string ReturnRequestNumberMask { get; set; } + public bool ReturnRequestNumberMask_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.NumberOfDaysReturnRequestAvailable")] + public int NumberOfDaysReturnRequestAvailable { get; set; } + public bool NumberOfDaysReturnRequestAvailable_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.ActivateGiftCardsAfterCompletingOrder")] + public bool ActivateGiftCardsAfterCompletingOrder { get; set; } + [NopResourceDisplayName("Admin.Configuration.Settings.Order.DeactivateGiftCardsAfterCancellingOrder")] + public bool DeactivateGiftCardsAfterCancellingOrder { get; set; } + [NopResourceDisplayName("Admin.Configuration.Settings.Order.DeactivateGiftCardsAfterDeletingOrder")] + public bool DeactivateGiftCardsAfterDeletingOrder { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.CompleteOrderWhenDelivered")] + public bool CompleteOrderWhenDelivered { get; set; } + + public string PrimaryStoreCurrencyCode { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.OrderIdent")] + public int? OrderIdent { get; set; } + [NopResourceDisplayName("Admin.Configuration.Settings.Order.InvoiceIdent")] + public int InvoiceIdent { get; set; } + public bool InvoiceIdent_OverrideForStore { get; set; } + [NopResourceDisplayName("Admin.Configuration.Settings.Order.InvoiceYear")] + public int InvoiceYear { get; set; } + public bool InvoiceYear_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.CustomOrderNumberMask")] + public string CustomOrderNumberMask { get; set; } + public bool CustomOrderNumberMask_OverrideForStore { get; set; } + + [NopResourceDisplayName("Admin.Configuration.Settings.Order.ExportWithProducts")] + public bool ExportWithProducts { get; set; } + public bool ExportWithProducts_OverrideForStore { get; set; } + } } \ No newline at end of file diff --git a/src/Presentation/Nop.Web/Administration/Views/Setting/Order.cshtml b/src/Presentation/Nop.Web/Administration/Views/Setting/Order.cshtml index 5705d5411b4..59d1b89afc5 100644 --- a/src/Presentation/Nop.Web/Administration/Views/Setting/Order.cshtml +++ b/src/Presentation/Nop.Web/Administration/Views/Setting/Order.cshtml @@ -1,433 +1,453 @@ -@model OrderSettingsModel - -@{ - //page title - ViewBag.Title = T("Admin.Configuration.Settings.Order").Text; - //active menu item (system name) - Html.SetActiveMenuItemSystemName("Order settings"); -} - -@using (Html.BeginForm()) -{ - @Html.AntiForgeryToken() -
-

- @T("Admin.Configuration.Settings.Order") -

-
- -
-
- - - -
-
- @Html.Action("StoreScopeConfiguration", "Setting") - @Html.Action("Mode", "Setting") - @Html.ValidationSummary(false) - - -
-
- - { - //custom tabs - var eventMessage = new AdminTabStripCreated(this.Html, "ordersettings-edit"); - EngineContext.Current.Resolve().Publish(eventMessage); - foreach (var eventBlock in eventMessage.BlocksToRender) - { - @eventBlock - } - } - - @*save selected tab name*@ - -} - -@helper TabOrderSettings() -{ - - -
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.Checkout") -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.AnonymousCheckoutAllowed_OverrideForStore, model => model.AnonymousCheckoutAllowed, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.AnonymousCheckoutAllowed) -
-
- @Html.NopEditorFor(model => model.AnonymousCheckoutAllowed) - @Html.ValidationMessageFor(model => model.AnonymousCheckoutAllowed) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.OnePageCheckoutEnabled_OverrideForStore, model => model.OnePageCheckoutEnabled, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.OnePageCheckoutEnabled) -
-
- @Html.NopEditorFor(model => model.OnePageCheckoutEnabled) - @Html.ValidationMessageFor(model => model.OnePageCheckoutEnabled) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab_OverrideForStore, model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) -
-
- @Html.NopEditorFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) - @Html.ValidationMessageFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.TermsOfServiceOnShoppingCartPage_OverrideForStore, model => model.TermsOfServiceOnShoppingCartPage, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.TermsOfServiceOnShoppingCartPage) -
-
- @Html.NopEditorFor(model => model.TermsOfServiceOnShoppingCartPage) - @Html.ValidationMessageFor(model => model.TermsOfServiceOnShoppingCartPage) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.TermsOfServiceOnOrderConfirmPage_OverrideForStore, model => model.TermsOfServiceOnOrderConfirmPage, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.TermsOfServiceOnOrderConfirmPage) -
-
- @Html.NopEditorFor(model => model.TermsOfServiceOnOrderConfirmPage) - @Html.ValidationMessageFor(model => model.TermsOfServiceOnOrderConfirmPage) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.DisableBillingAddressCheckoutStep_OverrideForStore, model => model.DisableBillingAddressCheckoutStep, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.DisableBillingAddressCheckoutStep) -
-
- @Html.NopEditorFor(model => model.DisableBillingAddressCheckoutStep) - @Html.ValidationMessageFor(model => model.DisableBillingAddressCheckoutStep) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.DisableOrderCompletedPage_OverrideForStore, model => model.DisableOrderCompletedPage, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.DisableOrderCompletedPage) -
-
- @Html.NopEditorFor(model => model.DisableOrderCompletedPage) - @Html.ValidationMessageFor(model => model.DisableOrderCompletedPage) -
-
-
-
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.OrderTotals") -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.MinOrderSubtotalAmount_OverrideForStore, model => model.MinOrderSubtotalAmount, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.MinOrderSubtotalAmount) -
-
- @Html.NopEditorFor(model => model.MinOrderSubtotalAmount, Model.PrimaryStoreCurrencyCode) - @Html.ValidationMessageFor(model => model.MinOrderSubtotalAmount) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.MinOrderSubtotalAmountIncludingTax_OverrideForStore, model => model.MinOrderSubtotalAmountIncludingTax, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.MinOrderSubtotalAmountIncludingTax) -
-
- @Html.NopEditorFor(model => model.MinOrderSubtotalAmountIncludingTax) - @Html.ValidationMessageFor(model => model.MinOrderSubtotalAmountIncludingTax) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.MinOrderTotalAmount_OverrideForStore, model => model.MinOrderTotalAmount, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.MinOrderTotalAmount) -
-
- @Html.NopEditorFor(model => model.MinOrderTotalAmount, Model.PrimaryStoreCurrencyCode) - @Html.ValidationMessageFor(model => model.MinOrderTotalAmount) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.AutoUpdateOrderTotalsOnEditingOrder_OverrideForStore, model => model.AutoUpdateOrderTotalsOnEditingOrder, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) -
-
- @Html.NopEditorFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) - @Html.ValidationMessageFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) -
-
-
-
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.Common") -
-
- @if (Model.OrderIdent.HasValue) - { -
-
- @Html.NopLabelFor(model => model.OrderIdent) -
-
- @Html.NopEditorFor(model => model.OrderIdent) -
-
- } -
-
- @Html.OverrideStoreCheckboxFor(model => model.CustomOrderNumberMask_OverrideForStore, model => model.CustomOrderNumberMask, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.CustomOrderNumberMask) -
-
- @Html.NopEditorFor(model => model.CustomOrderNumberMask) - @Html.ValidationMessageFor(model => model.CustomOrderNumberMask) -
    -
  • - @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.YYYY") -
  • -
  • - @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.YY") -
  • -
  • - @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.MM") -
  • -
  • - @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.DD") -
  • -
  • - @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.ID") -
  • -
-
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.IsReOrderAllowed_OverrideForStore, model => model.IsReOrderAllowed, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.IsReOrderAllowed) -
-
- @Html.NopEditorFor(model => model.IsReOrderAllowed) - @Html.ValidationMessageFor(model => model.IsReOrderAllowed) -
-
-
-
- @Html.NopLabelFor(model => model.CompleteOrderWhenDelivered) -
-
- @Html.NopEditorFor(model => model.CompleteOrderWhenDelivered) - @Html.ValidationMessageFor(model => model.CompleteOrderWhenDelivered) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.ExportWithProducts_OverrideForStore, model => model.ExportWithProducts, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.ExportWithProducts) -
-
- @Html.NopEditorFor(model => model.ExportWithProducts) - @Html.ValidationMessageFor(model => model.ExportWithProducts) -
-
-
-
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.PdfInvoice") -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderPlacedEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderPlacedEmail, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) -
-
- @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) - @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderPaidEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderPaidEmail, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderPaidEmail) -
-
- @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderPaidEmail) - @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderPaidEmail) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderCompletedEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderCompletedEmail, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) -
-
- @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) - @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) -
-
-
-
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.GiftCards") -
-
-
-
- @Html.NopLabelFor(model => model.ActivateGiftCardsAfterCompletingOrder) -
-
- @Html.NopEditorFor(model => model.ActivateGiftCardsAfterCompletingOrder) - @Html.ValidationMessageFor(model => model.ActivateGiftCardsAfterCompletingOrder) -
-
-
-
- @Html.NopLabelFor(model => model.DeactivateGiftCardsAfterCancellingOrder) -
-
- @Html.NopEditorFor(model => model.DeactivateGiftCardsAfterCancellingOrder) - @Html.ValidationMessageFor(model => model.DeactivateGiftCardsAfterCancellingOrder) -
-
-
-
- @Html.NopLabelFor(model => model.DeactivateGiftCardsAfterDeletingOrder) -
-
- @Html.NopEditorFor(model => model.DeactivateGiftCardsAfterDeletingOrder) - @Html.ValidationMessageFor(model => model.DeactivateGiftCardsAfterDeletingOrder) -
-
-
-
-
-} - -@helper TabReturnRequestSettings() -{ -
-
-
- @T("Admin.Configuration.Settings.Order.BlockTitle.Common") -
-
-
    -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription1") -
  • -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription2") -
  • -
-
-
- @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestsEnabled_OverrideForStore, model => model.ReturnRequestsEnabled, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.ReturnRequestsEnabled) -
-
- @Html.NopEditorFor(model => model.ReturnRequestsEnabled) - @Html.ValidationMessageFor(model => model.ReturnRequestsEnabled) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestNumberMask_OverrideForStore, model => model.ReturnRequestNumberMask, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.ReturnRequestNumberMask) -
-
- @Html.NopEditorFor(model => model.ReturnRequestNumberMask) - @Html.ValidationMessageFor(model => model.ReturnRequestNumberMask) -
    -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.ID") -
  • -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.YYYY") -
  • -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.YY") -
  • -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.MM") -
  • -
  • - @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.DD") -
  • -
-
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.NumberOfDaysReturnRequestAvailable_OverrideForStore, model => model.NumberOfDaysReturnRequestAvailable, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.NumberOfDaysReturnRequestAvailable) -
-
- @Html.NopEditorFor(model => model.NumberOfDaysReturnRequestAvailable) - @Html.ValidationMessageFor(model => model.NumberOfDaysReturnRequestAvailable) -
-
-
-
- @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestsAllowFiles_OverrideForStore, model => model.ReturnRequestsAllowFiles, Model.ActiveStoreScopeConfiguration) - @Html.NopLabelFor(model => model.ReturnRequestsAllowFiles) -
-
- @Html.NopEditorFor(model => model.ReturnRequestsAllowFiles) - @Html.ValidationMessageFor(model => model.ReturnRequestsAllowFiles) -
-
-
-
- @Html.Partial("_ReturnRequestReasons") - @Html.Partial("_ReturnRequestActions") -
+@model OrderSettingsModel + +@{ + //page title + ViewBag.Title = T("Admin.Configuration.Settings.Order").Text; + //active menu item (system name) + Html.SetActiveMenuItemSystemName("Order settings"); +} + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() +
+

+ @T("Admin.Configuration.Settings.Order") +

+
+ +
+
+ + + +
+
+ @Html.Action("StoreScopeConfiguration", "Setting") + @Html.Action("Mode", "Setting") + @Html.ValidationSummary(false) + + +
+
+ + { + //custom tabs + var eventMessage = new AdminTabStripCreated(this.Html, "ordersettings-edit"); + EngineContext.Current.Resolve().Publish(eventMessage); + foreach (var eventBlock in eventMessage.BlocksToRender) + { + @eventBlock + } + } + + @*save selected tab name*@ + +} + +@helper TabOrderSettings() +{ + + +
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.Checkout") +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.AnonymousCheckoutAllowed_OverrideForStore, model => model.AnonymousCheckoutAllowed, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.AnonymousCheckoutAllowed) +
+
+ @Html.NopEditorFor(model => model.AnonymousCheckoutAllowed) + @Html.ValidationMessageFor(model => model.AnonymousCheckoutAllowed) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.OnePageCheckoutEnabled_OverrideForStore, model => model.OnePageCheckoutEnabled, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.OnePageCheckoutEnabled) +
+
+ @Html.NopEditorFor(model => model.OnePageCheckoutEnabled) + @Html.ValidationMessageFor(model => model.OnePageCheckoutEnabled) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab_OverrideForStore, model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) +
+
+ @Html.NopEditorFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) + @Html.ValidationMessageFor(model => model.OnePageCheckoutDisplayOrderTotalsOnPaymentInfoTab) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.TermsOfServiceOnShoppingCartPage_OverrideForStore, model => model.TermsOfServiceOnShoppingCartPage, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.TermsOfServiceOnShoppingCartPage) +
+
+ @Html.NopEditorFor(model => model.TermsOfServiceOnShoppingCartPage) + @Html.ValidationMessageFor(model => model.TermsOfServiceOnShoppingCartPage) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.TermsOfServiceOnOrderConfirmPage_OverrideForStore, model => model.TermsOfServiceOnOrderConfirmPage, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.TermsOfServiceOnOrderConfirmPage) +
+
+ @Html.NopEditorFor(model => model.TermsOfServiceOnOrderConfirmPage) + @Html.ValidationMessageFor(model => model.TermsOfServiceOnOrderConfirmPage) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.DisableBillingAddressCheckoutStep_OverrideForStore, model => model.DisableBillingAddressCheckoutStep, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.DisableBillingAddressCheckoutStep) +
+
+ @Html.NopEditorFor(model => model.DisableBillingAddressCheckoutStep) + @Html.ValidationMessageFor(model => model.DisableBillingAddressCheckoutStep) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.DisableOrderCompletedPage_OverrideForStore, model => model.DisableOrderCompletedPage, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.DisableOrderCompletedPage) +
+
+ @Html.NopEditorFor(model => model.DisableOrderCompletedPage) + @Html.ValidationMessageFor(model => model.DisableOrderCompletedPage) +
+
+
+
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.OrderTotals") +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.MinOrderSubtotalAmount_OverrideForStore, model => model.MinOrderSubtotalAmount, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.MinOrderSubtotalAmount) +
+
+ @Html.NopEditorFor(model => model.MinOrderSubtotalAmount, Model.PrimaryStoreCurrencyCode) + @Html.ValidationMessageFor(model => model.MinOrderSubtotalAmount) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.MinOrderSubtotalAmountIncludingTax_OverrideForStore, model => model.MinOrderSubtotalAmountIncludingTax, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.MinOrderSubtotalAmountIncludingTax) +
+
+ @Html.NopEditorFor(model => model.MinOrderSubtotalAmountIncludingTax) + @Html.ValidationMessageFor(model => model.MinOrderSubtotalAmountIncludingTax) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.MinOrderTotalAmount_OverrideForStore, model => model.MinOrderTotalAmount, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.MinOrderTotalAmount) +
+
+ @Html.NopEditorFor(model => model.MinOrderTotalAmount, Model.PrimaryStoreCurrencyCode) + @Html.ValidationMessageFor(model => model.MinOrderTotalAmount) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.AutoUpdateOrderTotalsOnEditingOrder_OverrideForStore, model => model.AutoUpdateOrderTotalsOnEditingOrder, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) +
+
+ @Html.NopEditorFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) + @Html.ValidationMessageFor(model => model.AutoUpdateOrderTotalsOnEditingOrder) +
+
+
+
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.Common") +
+
+ @if (Model.OrderIdent.HasValue) + { +
+
+ @Html.NopLabelFor(model => model.OrderIdent) +
+
+ @Html.NopEditorFor(model => model.OrderIdent) +
+
+ } +
+
+ @Html.OverrideStoreCheckboxFor(model => model.CustomOrderNumberMask_OverrideForStore, model => model.CustomOrderNumberMask, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.CustomOrderNumberMask) +
+
+ @Html.NopEditorFor(model => model.CustomOrderNumberMask) + @Html.ValidationMessageFor(model => model.CustomOrderNumberMask) +
    +
  • + @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.YYYY") +
  • +
  • + @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.YY") +
  • +
  • + @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.MM") +
  • +
  • + @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.DD") +
  • +
  • + @T("Admin.Configuration.Settings.Order.CustomOrderNumberMask.Description.ID") +
  • +
+
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.InvoiceIdent_OverrideForStore, model => model.InvoiceIdent, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.InvoiceIdent) +
+
+ @Html.NopEditorFor(model => model.InvoiceIdent) + @Html.ValidationMessageFor(model => model.InvoiceIdent) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.InvoiceYear_OverrideForStore, model => model.InvoiceYear, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.InvoiceYear) +
+
+ @Html.NopEditorFor(model => model.InvoiceYear) + @Html.ValidationMessageFor(model => model.InvoiceYear) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.IsReOrderAllowed_OverrideForStore, model => model.IsReOrderAllowed, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.IsReOrderAllowed) +
+
+ @Html.NopEditorFor(model => model.IsReOrderAllowed) + @Html.ValidationMessageFor(model => model.IsReOrderAllowed) +
+
+
+
+ @Html.NopLabelFor(model => model.CompleteOrderWhenDelivered) +
+
+ @Html.NopEditorFor(model => model.CompleteOrderWhenDelivered) + @Html.ValidationMessageFor(model => model.CompleteOrderWhenDelivered) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.ExportWithProducts_OverrideForStore, model => model.ExportWithProducts, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.ExportWithProducts) +
+
+ @Html.NopEditorFor(model => model.ExportWithProducts) + @Html.ValidationMessageFor(model => model.ExportWithProducts) +
+
+
+
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.PdfInvoice") +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderPlacedEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderPlacedEmail, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) +
+
+ @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) + @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderPlacedEmail) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderPaidEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderPaidEmail, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderPaidEmail) +
+
+ @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderPaidEmail) + @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderPaidEmail) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.AttachPdfInvoiceToOrderCompletedEmail_OverrideForStore, model => model.AttachPdfInvoiceToOrderCompletedEmail, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) +
+
+ @Html.NopEditorFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) + @Html.ValidationMessageFor(model => model.AttachPdfInvoiceToOrderCompletedEmail) +
+
+
+
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.GiftCards") +
+
+
+
+ @Html.NopLabelFor(model => model.ActivateGiftCardsAfterCompletingOrder) +
+
+ @Html.NopEditorFor(model => model.ActivateGiftCardsAfterCompletingOrder) + @Html.ValidationMessageFor(model => model.ActivateGiftCardsAfterCompletingOrder) +
+
+
+
+ @Html.NopLabelFor(model => model.DeactivateGiftCardsAfterCancellingOrder) +
+
+ @Html.NopEditorFor(model => model.DeactivateGiftCardsAfterCancellingOrder) + @Html.ValidationMessageFor(model => model.DeactivateGiftCardsAfterCancellingOrder) +
+
+
+
+ @Html.NopLabelFor(model => model.DeactivateGiftCardsAfterDeletingOrder) +
+
+ @Html.NopEditorFor(model => model.DeactivateGiftCardsAfterDeletingOrder) + @Html.ValidationMessageFor(model => model.DeactivateGiftCardsAfterDeletingOrder) +
+
+
+
+
+} + +@helper TabReturnRequestSettings() +{ +
+
+
+ @T("Admin.Configuration.Settings.Order.BlockTitle.Common") +
+
+
    +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription1") +
  • +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription2") +
  • +
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestsEnabled_OverrideForStore, model => model.ReturnRequestsEnabled, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.ReturnRequestsEnabled) +
+
+ @Html.NopEditorFor(model => model.ReturnRequestsEnabled) + @Html.ValidationMessageFor(model => model.ReturnRequestsEnabled) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestNumberMask_OverrideForStore, model => model.ReturnRequestNumberMask, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.ReturnRequestNumberMask) +
+
+ @Html.NopEditorFor(model => model.ReturnRequestNumberMask) + @Html.ValidationMessageFor(model => model.ReturnRequestNumberMask) +
    +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.ID") +
  • +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.YYYY") +
  • +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.YY") +
  • +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.MM") +
  • +
  • + @T("Admin.Configuration.Settings.Order.ReturnRequestNumberMask.Description.DD") +
  • +
+
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.NumberOfDaysReturnRequestAvailable_OverrideForStore, model => model.NumberOfDaysReturnRequestAvailable, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.NumberOfDaysReturnRequestAvailable) +
+
+ @Html.NopEditorFor(model => model.NumberOfDaysReturnRequestAvailable) + @Html.ValidationMessageFor(model => model.NumberOfDaysReturnRequestAvailable) +
+
+
+
+ @Html.OverrideStoreCheckboxFor(model => model.ReturnRequestsAllowFiles_OverrideForStore, model => model.ReturnRequestsAllowFiles, Model.ActiveStoreScopeConfiguration) + @Html.NopLabelFor(model => model.ReturnRequestsAllowFiles) +
+
+ @Html.NopEditorFor(model => model.ReturnRequestsAllowFiles) + @Html.ValidationMessageFor(model => model.ReturnRequestsAllowFiles) +
+
+
+
+ @Html.Partial("_ReturnRequestReasons") + @Html.Partial("_ReturnRequestActions") +
} \ No newline at end of file diff --git a/src/Presentation/Nop.Web/App_Data/Install/SqlServer.Indexes.sql b/src/Presentation/Nop.Web/App_Data/Install/SqlServer.Indexes.sql index 585081f1fb4..7676ccd337b 100644 --- a/src/Presentation/Nop.Web/App_Data/Install/SqlServer.Indexes.sql +++ b/src/Presentation/Nop.Web/App_Data/Install/SqlServer.Indexes.sql @@ -37,7 +37,7 @@ GO CREATE NONCLUSTERED INDEX [IX_Order_CustomerId] ON [Order] ([CustomerId] ASC) GO -CREATE UNIQUE NONCLUSTERED INDEX UI_Order_InvoiceId ON dbo.[Order](InvoiceId) +CREATE UNIQUE NONCLUSTERED INDEX UI_Order_InvoiceId ON dbo.[Order](InvoiceId, StoreId) WHERE InvoiceId IS NOT NULL; CREATE NONCLUSTERED INDEX [IX_Language_DisplayOrder] ON [Language] ([DisplayOrder] ASC) diff --git a/src/Presentation/Nop.Web/App_Data/Localization/defaultResources.nopres.xml b/src/Presentation/Nop.Web/App_Data/Localization/defaultResources.nopres.xml index 87054ff1eea..4ebdc18aecc 100644 --- a/src/Presentation/Nop.Web/App_Data/Localization/defaultResources.nopres.xml +++ b/src/Presentation/Nop.Web/App_Data/Localization/defaultResources.nopres.xml @@ -6966,6 +6966,12 @@ Invoice ID counter. This is useful if you want your invoices to start from certain number. This only affects invoices henceforward. The value must be greater than the current maximum invoice ID. + + Year of last invoice + + + Year of last invoice. If actual year is different from this setting, then InvoiceIdent starts from one. + Customer roles diff --git a/upgradescripts/3.80-the next version/upgrade.sql b/upgradescripts/3.80-the next version/upgrade.sql index 122ee933846..d068d8deb06 100644 --- a/upgradescripts/3.80-the next version/upgrade.sql +++ b/upgradescripts/3.80-the next version/upgrade.sql @@ -248,6 +248,18 @@ set @resources=' You haven''t written any reviews yet + + Last used Invoice No. + + + Invoice ID counter. This is useful if you want your invoices to start from certain number. This only affects invoices henceforward. The value must be greater than the current maximum invoice ID. + + + Year of last invoice + + + Year of last invoice. If actual year is different from this setting, then InvoiceIdent starts from one. + Force entering email twice during registration. @@ -3422,12 +3434,14 @@ BEGIN ADD InvoiceId NVARCHAR(20) NULL; END +GO +DROP INDEX IF EXISTS [UI_Order_InvoiceId] ON [dbo].[Order] GO IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Order]') AND name = N'UI_Order_InvoiceId') BEGIN CREATE UNIQUE NONCLUSTERED INDEX UI_Order_InvoiceId - ON dbo.[Order](InvoiceId) + ON dbo.[Order](InvoiceId, StoreId) WHERE InvoiceId IS NOT NULL; END GO