@aptos-scp/scp-component-store-selling-features-domain-model 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -0
- package/README.md +96 -0
- package/lib/config/DiTypes.d.ts +6 -0
- package/lib/config/DiTypes.js +10 -0
- package/lib/config/ErrorCodes.d.ts +10 -0
- package/lib/config/ErrorCodes.js +14 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.js +9 -0
- package/lib/config/inversify/binding-helpers.d.ts +3 -0
- package/lib/config/inversify/binding-helpers.js +7 -0
- package/lib/config/inversify/index.d.ts +3 -0
- package/lib/config/inversify/index.js +9 -0
- package/lib/config/inversify/inversify.app.config.d.ts +19 -0
- package/lib/config/inversify/inversify.app.config.js +45 -0
- package/lib/config/inversify/inversify.terminal.config/index.d.ts +1 -0
- package/lib/config/inversify/inversify.terminal.config/index.js +7 -0
- package/lib/config/inversify/inversify.terminal.config/transaction-services.config.d.ts +11 -0
- package/lib/config/inversify/inversify.terminal.config/transaction-services.config.js +30 -0
- package/lib/domain/UIBusinessEventTypes.d.ts +305 -0
- package/lib/domain/UIBusinessEventTypes.js +313 -0
- package/lib/domain/index.d.ts +5 -0
- package/lib/domain/index.js +10 -0
- package/lib/domain/model/AddressVerification.d.ts +21 -0
- package/lib/domain/model/AddressVerification.js +3 -0
- package/lib/domain/model/ApplicationControlTransaction.d.ts +13 -0
- package/lib/domain/model/ApplicationControlTransaction.js +47 -0
- package/lib/domain/model/AtcudCodePrefixData.d.ts +19 -0
- package/lib/domain/model/AtcudCodePrefixData.js +3 -0
- package/lib/domain/model/BaseLineDecorator.d.ts +83 -0
- package/lib/domain/model/BaseLineDecorator.js +216 -0
- package/lib/domain/model/BaseTransactionLine.d.ts +71 -0
- package/lib/domain/model/BaseTransactionLine.js +183 -0
- package/lib/domain/model/CashDrawerDetail.d.ts +21 -0
- package/lib/domain/model/CashDrawerDetail.js +3 -0
- package/lib/domain/model/Constants.d.ts +977 -0
- package/lib/domain/model/Constants.js +985 -0
- package/lib/domain/model/CorruptedTransaction.d.ts +16 -0
- package/lib/domain/model/CorruptedTransaction.js +58 -0
- package/lib/domain/model/Coupon.d.ts +8 -0
- package/lib/domain/model/Coupon.js +3 -0
- package/lib/domain/model/CreateEinvoiceLine.d.ts +32 -0
- package/lib/domain/model/CreateEinvoiceLine.js +71 -0
- package/lib/domain/model/Customer.d.ts +387 -0
- package/lib/domain/model/Customer.js +320 -0
- package/lib/domain/model/CustomerServiceTransaction.d.ts +12 -0
- package/lib/domain/model/CustomerServiceTransaction.js +39 -0
- package/lib/domain/model/Department.d.ts +15 -0
- package/lib/domain/model/Department.js +3 -0
- package/lib/domain/model/EmailVerification.d.ts +24 -0
- package/lib/domain/model/EmailVerification.js +35 -0
- package/lib/domain/model/Employee.d.ts +80 -0
- package/lib/domain/model/Employee.js +73 -0
- package/lib/domain/model/EndOfTransactionTenderingSession.d.ts +39 -0
- package/lib/domain/model/EndOfTransactionTenderingSession.js +89 -0
- package/lib/domain/model/ExchangeRates.d.ts +13 -0
- package/lib/domain/model/ExchangeRates.js +8 -0
- package/lib/domain/model/FiscalControlTransaction.d.ts +12 -0
- package/lib/domain/model/FiscalControlTransaction.js +43 -0
- package/lib/domain/model/FulfillmentGroup.d.ts +35 -0
- package/lib/domain/model/FulfillmentGroup.js +137 -0
- package/lib/domain/model/IAppLocalFeaturesStorage.d.ts +78 -0
- package/lib/domain/model/IAppLocalFeaturesStorage.js +3 -0
- package/lib/domain/model/ICreateEinvoiceLine.d.ts +9 -0
- package/lib/domain/model/ICreateEinvoiceLine.js +3 -0
- package/lib/domain/model/IEmployeeDiscount.d.ts +15 -0
- package/lib/domain/model/IEmployeeDiscount.js +3 -0
- package/lib/domain/model/IFiscalTransactionNumberMaintainer.d.ts +10 -0
- package/lib/domain/model/IFiscalTransactionNumberMaintainer.js +8 -0
- package/lib/domain/model/IInvoiceOperation.d.ts +10 -0
- package/lib/domain/model/IInvoiceOperation.js +8 -0
- package/lib/domain/model/ILastRetailTransactionInfo.d.ts +13 -0
- package/lib/domain/model/ILastRetailTransactionInfo.js +3 -0
- package/lib/domain/model/ILastTransactionStatus.d.ts +5 -0
- package/lib/domain/model/ILastTransactionStatus.js +3 -0
- package/lib/domain/model/ILoyaltyVoucher.d.ts +28 -0
- package/lib/domain/model/ILoyaltyVoucher.js +9 -0
- package/lib/domain/model/IPrinterInfo.d.ts +6 -0
- package/lib/domain/model/IPrinterInfo.js +3 -0
- package/lib/domain/model/ISequence.d.ts +8 -0
- package/lib/domain/model/ISequence.js +3 -0
- package/lib/domain/model/IServiceResultLine.d.ts +4 -0
- package/lib/domain/model/IServiceResultLine.js +3 -0
- package/lib/domain/model/ISingleUseCoupon.d.ts +22 -0
- package/lib/domain/model/ISingleUseCoupon.js +38 -0
- package/lib/domain/model/ITransactionMetadataPersistanceObject.d.ts +12 -0
- package/lib/domain/model/ITransactionMetadataPersistanceObject.js +3 -0
- package/lib/domain/model/Inventory.d.ts +156 -0
- package/lib/domain/model/Inventory.js +78 -0
- package/lib/domain/model/ItemHandlingSession.d.ts +40 -0
- package/lib/domain/model/ItemHandlingSession.js +131 -0
- package/lib/domain/model/LoyaltyMembership.d.ts +153 -0
- package/lib/domain/model/LoyaltyMembership.js +23 -0
- package/lib/domain/model/MerchandiseTransaction.d.ts +310 -0
- package/lib/domain/model/MerchandiseTransaction.js +1299 -0
- package/lib/domain/model/MetricsLogs.d.ts +41 -0
- package/lib/domain/model/MetricsLogs.js +3 -0
- package/lib/domain/model/MunicipalFiscalCode.d.ts +25 -0
- package/lib/domain/model/MunicipalFiscalCode.js +3 -0
- package/lib/domain/model/NoSaleTransaction.d.ts +13 -0
- package/lib/domain/model/NoSaleTransaction.js +49 -0
- package/lib/domain/model/Order.d.ts +67 -0
- package/lib/domain/model/Order.js +190 -0
- package/lib/domain/model/OrderTotals.d.ts +44 -0
- package/lib/domain/model/OrderTotals.js +76 -0
- package/lib/domain/model/Organization.d.ts +99 -0
- package/lib/domain/model/Organization.js +3 -0
- package/lib/domain/model/PrepaidTender.d.ts +14 -0
- package/lib/domain/model/PrepaidTender.js +3 -0
- package/lib/domain/model/ReceiptSession.d.ts +87 -0
- package/lib/domain/model/ReceiptSession.js +206 -0
- package/lib/domain/model/ReprintReceiptTransaction.d.ts +49 -0
- package/lib/domain/model/ReprintReceiptTransaction.js +179 -0
- package/lib/domain/model/ResumeTransactionSession.d.ts +22 -0
- package/lib/domain/model/ResumeTransactionSession.js +56 -0
- package/lib/domain/model/RetailTransaction.d.ts +127 -0
- package/lib/domain/model/RetailTransaction.js +556 -0
- package/lib/domain/model/Sendsale.d.ts +4 -0
- package/lib/domain/model/Sendsale.js +3 -0
- package/lib/domain/model/StoreItem.d.ts +175 -0
- package/lib/domain/model/StoreItem.js +750 -0
- package/lib/domain/model/StoredValueCardSession.d.ts +29 -0
- package/lib/domain/model/StoredValueCardSession.js +65 -0
- package/lib/domain/model/StoredValueCertificateSession.d.ts +47 -0
- package/lib/domain/model/StoredValueCertificateSession.js +153 -0
- package/lib/domain/model/SubscriptionTokenSession.d.ts +22 -0
- package/lib/domain/model/SubscriptionTokenSession.js +60 -0
- package/lib/domain/model/Subscriptions.d.ts +12 -0
- package/lib/domain/model/Subscriptions.js +3 -0
- package/lib/domain/model/TaxRefundControlTransaction.d.ts +13 -0
- package/lib/domain/model/TaxRefundControlTransaction.js +50 -0
- package/lib/domain/model/TenderAuthorizationSession.d.ts +102 -0
- package/lib/domain/model/TenderAuthorizationSession.js +337 -0
- package/lib/domain/model/TenderControlTransaction.d.ts +30 -0
- package/lib/domain/model/TenderControlTransaction.js +138 -0
- package/lib/domain/model/TenderHandlingSession.d.ts +100 -0
- package/lib/domain/model/TenderHandlingSession.js +379 -0
- package/lib/domain/model/TenderType.d.ts +161 -0
- package/lib/domain/model/TenderType.js +1317 -0
- package/lib/domain/model/TerminalControlTransaction.d.ts +14 -0
- package/lib/domain/model/TerminalControlTransaction.js +55 -0
- package/lib/domain/model/TerminalSession.d.ts +49 -0
- package/lib/domain/model/TerminalSession.js +122 -0
- package/lib/domain/model/TillControlTransaction.d.ts +20 -0
- package/lib/domain/model/TillControlTransaction.js +79 -0
- package/lib/domain/model/TillSession.d.ts +67 -0
- package/lib/domain/model/TillSession.js +222 -0
- package/lib/domain/model/TransactionFlowState.d.ts +26 -0
- package/lib/domain/model/TransactionFlowState.js +72 -0
- package/lib/domain/model/TransactionReferenceLine.d.ts +112 -0
- package/lib/domain/model/TransactionReferenceLine.js +323 -0
- package/lib/domain/model/User.d.ts +115 -0
- package/lib/domain/model/User.js +210 -0
- package/lib/domain/model/UserSession.d.ts +36 -0
- package/lib/domain/model/UserSession.js +186 -0
- package/lib/domain/model/UserTransaction.d.ts +12 -0
- package/lib/domain/model/UserTransaction.js +38 -0
- package/lib/domain/model/VoidInterfaces.d.ts +15 -0
- package/lib/domain/model/VoidInterfaces.js +23 -0
- package/lib/domain/model/cashDrawer/CashDrawerRequestLine.d.ts +17 -0
- package/lib/domain/model/cashDrawer/CashDrawerRequestLine.js +50 -0
- package/lib/domain/model/cashDrawer/CashDrawerSession.d.ts +67 -0
- package/lib/domain/model/cashDrawer/CashDrawerSession.js +211 -0
- package/lib/domain/model/cashDrawer/CashDrawerStatusChangeLine.d.ts +30 -0
- package/lib/domain/model/cashDrawer/CashDrawerStatusChangeLine.js +86 -0
- package/lib/domain/model/cashDrawer/ICashDrawerRequestLine.d.ts +6 -0
- package/lib/domain/model/cashDrawer/ICashDrawerRequestLine.js +3 -0
- package/lib/domain/model/cashDrawer/ICashDrawerStatusChangeLine.d.ts +13 -0
- package/lib/domain/model/cashDrawer/ICashDrawerStatusChangeLine.js +3 -0
- package/lib/domain/model/cashDrawer/index.d.ts +5 -0
- package/lib/domain/model/cashDrawer/index.js +9 -0
- package/lib/domain/model/configuration/ConfigurationUtils.d.ts +3 -0
- package/lib/domain/model/configuration/ConfigurationUtils.js +8 -0
- package/lib/domain/model/configuration/DataEntryRule.d.ts +31 -0
- package/lib/domain/model/configuration/DataEntryRule.js +303 -0
- package/lib/domain/model/configuration/I18nReceiptFormattingInterface.d.ts +38 -0
- package/lib/domain/model/configuration/I18nReceiptFormattingInterface.js +3 -0
- package/lib/domain/model/configuration/I18nTaxFreeConfig.d.ts +11 -0
- package/lib/domain/model/configuration/I18nTaxFreeConfig.js +3 -0
- package/lib/domain/model/configuration/IAccessPolicyConfig.d.ts +5 -0
- package/lib/domain/model/configuration/IAccessPolicyConfig.js +3 -0
- package/lib/domain/model/configuration/IAdapterPoliciesConfig.d.ts +24 -0
- package/lib/domain/model/configuration/IAdapterPoliciesConfig.js +13 -0
- package/lib/domain/model/configuration/IConditionalAttributeBehaviorRuleConfig.d.ts +32 -0
- package/lib/domain/model/configuration/IConditionalAttributeBehaviorRuleConfig.js +8 -0
- package/lib/domain/model/configuration/ICustomerConfig.d.ts +31 -0
- package/lib/domain/model/configuration/ICustomerConfig.js +15 -0
- package/lib/domain/model/configuration/IDataEntryRuleConfig.d.ts +66 -0
- package/lib/domain/model/configuration/IDataEntryRuleConfig.js +22 -0
- package/lib/domain/model/configuration/IDiscountAttributesConfig .d.ts +26 -0
- package/lib/domain/model/configuration/IDiscountAttributesConfig .js +8 -0
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.d.ts +27 -0
- package/lib/domain/model/configuration/IDiscountBehaviorsConfig.js +21 -0
- package/lib/domain/model/configuration/IDonationBehaviorsConfig.d.ts +9 -0
- package/lib/domain/model/configuration/IDonationBehaviorsConfig.js +3 -0
- package/lib/domain/model/configuration/IFeatureAccessConfig.d.ts +186 -0
- package/lib/domain/model/configuration/IFeatureAccessConfig.js +51 -0
- package/lib/domain/model/configuration/IFeesConfig.d.ts +109 -0
- package/lib/domain/model/configuration/IFeesConfig.js +86 -0
- package/lib/domain/model/configuration/IPrinterTypeConfig.d.ts +25 -0
- package/lib/domain/model/configuration/IPrinterTypeConfig.js +3 -0
- package/lib/domain/model/configuration/IProductInquiryBehaviorsConfig.d.ts +8 -0
- package/lib/domain/model/configuration/IProductInquiryBehaviorsConfig.js +8 -0
- package/lib/domain/model/configuration/IReasonCodesConfig.d.ts +16 -0
- package/lib/domain/model/configuration/IReasonCodesConfig.js +3 -0
- package/lib/domain/model/configuration/IReceiptConfig.d.ts +64 -0
- package/lib/domain/model/configuration/IReceiptConfig.js +24 -0
- package/lib/domain/model/configuration/IReceiptFormattingConfig.d.ts +155 -0
- package/lib/domain/model/configuration/IReceiptFormattingConfig.js +27 -0
- package/lib/domain/model/configuration/IReceiptStylingConfig.d.ts +52 -0
- package/lib/domain/model/configuration/IReceiptStylingConfig.js +18 -0
- package/lib/domain/model/configuration/IReserveInventoryConfig.d.ts +4 -0
- package/lib/domain/model/configuration/IReserveInventoryConfig.js +8 -0
- package/lib/domain/model/configuration/ISelfCheckoutModeBehaviorsConfig.d.ts +14 -0
- package/lib/domain/model/configuration/ISelfCheckoutModeBehaviorsConfig.js +3 -0
- package/lib/domain/model/configuration/ISequenceConfig.d.ts +44 -0
- package/lib/domain/model/configuration/ISequenceConfig.js +26 -0
- package/lib/domain/model/configuration/IStoreOperationsBehavior.d.ts +7 -0
- package/lib/domain/model/configuration/IStoreOperationsBehavior.js +8 -0
- package/lib/domain/model/configuration/IStoreShippingMethodConfig.d.ts +21 -0
- package/lib/domain/model/configuration/IStoreShippingMethodConfig.js +3 -0
- package/lib/domain/model/configuration/ITaxBehaviorConfig.d.ts +14 -0
- package/lib/domain/model/configuration/ITaxBehaviorConfig.js +3 -0
- package/lib/domain/model/configuration/ITaxRefundConfig.d.ts +8 -0
- package/lib/domain/model/configuration/ITaxRefundConfig.js +3 -0
- package/lib/domain/model/configuration/ITendersConfig.d.ts +88 -0
- package/lib/domain/model/configuration/ITendersConfig.js +22 -0
- package/lib/domain/model/configuration/Ii18n.d.ts +4 -0
- package/lib/domain/model/configuration/Ii18n.js +3 -0
- package/lib/domain/model/configuration/TaxLottery.d.ts +4 -0
- package/lib/domain/model/configuration/TaxLottery.js +8 -0
- package/lib/domain/model/configuration/index.d.ts +30 -0
- package/lib/domain/model/configuration/index.js +25 -0
- package/lib/domain/model/customer/CreateCustomerLine.d.ts +151 -0
- package/lib/domain/model/customer/CreateCustomerLine.js +312 -0
- package/lib/domain/model/customer/CustomerLine.d.ts +43 -0
- package/lib/domain/model/customer/CustomerLine.js +109 -0
- package/lib/domain/model/customer/ICreateCustomerLine.d.ts +16 -0
- package/lib/domain/model/customer/ICreateCustomerLine.js +3 -0
- package/lib/domain/model/customer/ICustomerI18nFormats.d.ts +126 -0
- package/lib/domain/model/customer/ICustomerI18nFormats.js +67 -0
- package/lib/domain/model/customer/ICustomerLine.d.ts +8 -0
- package/lib/domain/model/customer/ICustomerLine.js +3 -0
- package/lib/domain/model/customer/ITaxCustomerLine.d.ts +46 -0
- package/lib/domain/model/customer/ITaxCustomerLine.js +3 -0
- package/lib/domain/model/customer/IUpdateCustomerLine.d.ts +30 -0
- package/lib/domain/model/customer/IUpdateCustomerLine.js +3 -0
- package/lib/domain/model/customer/TaxCustomerLine.d.ts +105 -0
- package/lib/domain/model/customer/TaxCustomerLine.js +252 -0
- package/lib/domain/model/customer/UpdateCustomerLine.d.ts +148 -0
- package/lib/domain/model/customer/UpdateCustomerLine.js +296 -0
- package/lib/domain/model/customer/index.d.ts +9 -0
- package/lib/domain/model/customer/index.js +11 -0
- package/lib/domain/model/digitalSignature/DigitalSignatureFailureLine.d.ts +11 -0
- package/lib/domain/model/digitalSignature/DigitalSignatureFailureLine.js +33 -0
- package/lib/domain/model/digitalSignature/index.d.ts +1 -0
- package/lib/domain/model/digitalSignature/index.js +7 -0
- package/lib/domain/model/discounts/BaseManualDiscountLine.d.ts +119 -0
- package/lib/domain/model/discounts/BaseManualDiscountLine.js +435 -0
- package/lib/domain/model/discounts/BaseManualDiscountLineDecorator.d.ts +42 -0
- package/lib/domain/model/discounts/BaseManualDiscountLineDecorator.js +107 -0
- package/lib/domain/model/discounts/BasePromotionCouponLine.d.ts +22 -0
- package/lib/domain/model/discounts/BasePromotionCouponLine.js +45 -0
- package/lib/domain/model/discounts/BasePromotionCouponLineDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/BasePromotionCouponLineDecorator.js +38 -0
- package/lib/domain/model/discounts/ExpiredCouponOverrideLine.d.ts +27 -0
- package/lib/domain/model/discounts/ExpiredCouponOverrideLine.js +54 -0
- package/lib/domain/model/discounts/IManualDiscountLine.d.ts +33 -0
- package/lib/domain/model/discounts/IManualDiscountLine.js +3 -0
- package/lib/domain/model/discounts/IPromotionCouponLine.d.ts +10 -0
- package/lib/domain/model/discounts/IPromotionCouponLine.js +3 -0
- package/lib/domain/model/discounts/LoyaltyActivityDiscountLineTotalDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/LoyaltyActivityDiscountLineTotalDecorator.js +32 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLine.d.ts +52 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLine.js +131 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLineTotalDecorator.d.ts +26 -0
- package/lib/domain/model/discounts/LoyaltyDiscountLineTotalDecorator.js +66 -0
- package/lib/domain/model/discounts/ManualDiscountLineModificationDecorator.d.ts +49 -0
- package/lib/domain/model/discounts/ManualDiscountLineModificationDecorator.js +143 -0
- package/lib/domain/model/discounts/ManualDiscountLineTotalDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/ManualDiscountLineTotalDecorator.js +32 -0
- package/lib/domain/model/discounts/ManualItemDiscountLine.d.ts +27 -0
- package/lib/domain/model/discounts/ManualItemDiscountLine.js +53 -0
- package/lib/domain/model/discounts/ManualTransactionDiscountLine.d.ts +22 -0
- package/lib/domain/model/discounts/ManualTransactionDiscountLine.js +40 -0
- package/lib/domain/model/discounts/ModifyManualDiscountLine.d.ts +29 -0
- package/lib/domain/model/discounts/ModifyManualDiscountLine.js +62 -0
- package/lib/domain/model/discounts/PromotionCouponLine.d.ts +22 -0
- package/lib/domain/model/discounts/PromotionCouponLine.js +59 -0
- package/lib/domain/model/discounts/VoidedDiscountLineDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/VoidedDiscountLineDecorator.js +38 -0
- package/lib/domain/model/discounts/VoidedLoyaltyDiscountLineDecorator.d.ts +18 -0
- package/lib/domain/model/discounts/VoidedLoyaltyDiscountLineDecorator.js +46 -0
- package/lib/domain/model/discounts/VoidedPromotionCouponLineDecorator.d.ts +13 -0
- package/lib/domain/model/discounts/VoidedPromotionCouponLineDecorator.js +32 -0
- package/lib/domain/model/discounts/employee/EmployeeDiscountLine.d.ts +17 -0
- package/lib/domain/model/discounts/employee/EmployeeDiscountLine.js +43 -0
- package/lib/domain/model/discounts/employee/index.d.ts +1 -0
- package/lib/domain/model/discounts/employee/index.js +7 -0
- package/lib/domain/model/discounts/index.d.ts +19 -0
- package/lib/domain/model/discounts/index.js +23 -0
- package/lib/domain/model/discounts/lineTypes.d.ts +12 -0
- package/lib/domain/model/discounts/lineTypes.js +30 -0
- package/lib/domain/model/donation/BaseDonationLineDecorator.d.ts +16 -0
- package/lib/domain/model/donation/BaseDonationLineDecorator.js +38 -0
- package/lib/domain/model/donation/DonationLine.d.ts +43 -0
- package/lib/domain/model/donation/DonationLine.js +102 -0
- package/lib/domain/model/donation/IDonationLine.d.ts +9 -0
- package/lib/domain/model/donation/IDonationLine.js +3 -0
- package/lib/domain/model/donation/VoidedDonationLineDecorator.d.ts +17 -0
- package/lib/domain/model/donation/VoidedDonationLineDecorator.js +43 -0
- package/lib/domain/model/donation/index.d.ts +4 -0
- package/lib/domain/model/donation/index.js +9 -0
- package/lib/domain/model/employeeCustomer/BaseEmployeeCustomerLineDecorator.d.ts +13 -0
- package/lib/domain/model/employeeCustomer/BaseEmployeeCustomerLineDecorator.js +32 -0
- package/lib/domain/model/employeeCustomer/EmployeeCustomerLine.d.ts +39 -0
- package/lib/domain/model/employeeCustomer/EmployeeCustomerLine.js +98 -0
- package/lib/domain/model/employeeCustomer/IEmployeeCustomerLine.d.ts +8 -0
- package/lib/domain/model/employeeCustomer/IEmployeeCustomerLine.js +3 -0
- package/lib/domain/model/employeeCustomer/VoidedEmployeeCustomerLineDecorator.d.ts +15 -0
- package/lib/domain/model/employeeCustomer/VoidedEmployeeCustomerLineDecorator.js +38 -0
- package/lib/domain/model/employeeCustomer/index.d.ts +4 -0
- package/lib/domain/model/employeeCustomer/index.js +9 -0
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.d.ts +26 -0
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.js +74 -0
- package/lib/domain/model/extensibilityForm/IExtensibilityForm.d.ts +8 -0
- package/lib/domain/model/extensibilityForm/IExtensibilityForm.js +3 -0
- package/lib/domain/model/extensibilityForm/index.d.ts +2 -0
- package/lib/domain/model/extensibilityForm/index.js +7 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.d.ts +68 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.js +194 -0
- package/lib/domain/model/fee/FeeLine.d.ts +179 -0
- package/lib/domain/model/fee/FeeLine.js +660 -0
- package/lib/domain/model/fee/FeeLineBaseTaxAdjustmentDecorator.d.ts +18 -0
- package/lib/domain/model/fee/FeeLineBaseTaxAdjustmentDecorator.js +52 -0
- package/lib/domain/model/fee/FeeLineChangeQuantityDecorator.d.ts +14 -0
- package/lib/domain/model/fee/FeeLineChangeQuantityDecorator.js +35 -0
- package/lib/domain/model/fee/FeeLineExtendedAmountDecorator.d.ts +38 -0
- package/lib/domain/model/fee/FeeLineExtendedAmountDecorator.js +134 -0
- package/lib/domain/model/fee/FeeLineOriginalPricingAdjustmentDecorator.d.ts +22 -0
- package/lib/domain/model/fee/FeeLineOriginalPricingAdjustmentDecorator.js +82 -0
- package/lib/domain/model/fee/FeeLinePricingExtendedAmountDecorator.d.ts +22 -0
- package/lib/domain/model/fee/FeeLinePricingExtendedAmountDecorator.js +82 -0
- package/lib/domain/model/fee/FeeLineTaxExemptDecorator.d.ts +24 -0
- package/lib/domain/model/fee/FeeLineTaxExemptDecorator.js +67 -0
- package/lib/domain/model/fee/FeeLineTaxOverrideDecorator.d.ts +21 -0
- package/lib/domain/model/fee/FeeLineTaxOverrideDecorator.js +63 -0
- package/lib/domain/model/fee/FeeQuantityChangeLine.d.ts +19 -0
- package/lib/domain/model/fee/FeeQuantityChangeLine.js +52 -0
- package/lib/domain/model/fee/IFeeLine.d.ts +104 -0
- package/lib/domain/model/fee/IFeeLine.js +3 -0
- package/lib/domain/model/fee/VoidedFeeLineDecorator.d.ts +15 -0
- package/lib/domain/model/fee/VoidedFeeLineDecorator.js +38 -0
- package/lib/domain/model/fee/index.d.ts +12 -0
- package/lib/domain/model/fee/index.js +17 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementLine.d.ts +34 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementLine.js +69 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementRetryLine.d.ts +15 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceManagementRetryLine.js +45 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.d.ts +35 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +87 -0
- package/lib/domain/model/fiscalDevice/index.d.ts +3 -0
- package/lib/domain/model/fiscalDevice/index.js +9 -0
- package/lib/domain/model/foreignCurrency/ExchangeRateManualEntryLine.d.ts +29 -0
- package/lib/domain/model/foreignCurrency/ExchangeRateManualEntryLine.js +67 -0
- package/lib/domain/model/foreignCurrency/index.d.ts +1 -0
- package/lib/domain/model/foreignCurrency/index.js +7 -0
- package/lib/domain/model/geoLocation.d.ts +23 -0
- package/lib/domain/model/geoLocation.js +3 -0
- package/lib/domain/model/giftCard/BalanceInquiryLine.d.ts +34 -0
- package/lib/domain/model/giftCard/BalanceInquiryLine.js +86 -0
- package/lib/domain/model/giftCard/index.d.ts +1 -0
- package/lib/domain/model/giftCard/index.js +7 -0
- package/lib/domain/model/index.d.ts +108 -0
- package/lib/domain/model/index.js +95 -0
- package/lib/domain/model/inventory/ReserveInventoryLine.d.ts +32 -0
- package/lib/domain/model/inventory/ReserveInventoryLine.js +76 -0
- package/lib/domain/model/inventory/index.d.ts +1 -0
- package/lib/domain/model/inventory/index.js +7 -0
- package/lib/domain/model/item/BaseItemLineDecorator.d.ts +148 -0
- package/lib/domain/model/item/BaseItemLineDecorator.js +400 -0
- package/lib/domain/model/item/BasePriceChangeLineDecorator.d.ts +20 -0
- package/lib/domain/model/item/BasePriceChangeLineDecorator.js +50 -0
- package/lib/domain/model/item/IAllLinePricingAdjustments.d.ts +32 -0
- package/lib/domain/model/item/IAllLinePricingAdjustments.js +66 -0
- package/lib/domain/model/item/IHardSoftStopItemInfo.d.ts +11 -0
- package/lib/domain/model/item/IHardSoftStopItemInfo.js +3 -0
- package/lib/domain/model/item/IItemLine.d.ts +313 -0
- package/lib/domain/model/item/IItemLine.js +7 -0
- package/lib/domain/model/item/ISerializedPriceCalculationResultsWithSource.d.ts +45 -0
- package/lib/domain/model/item/ISerializedPriceCalculationResultsWithSource.js +3 -0
- package/lib/domain/model/item/ItemLine.d.ts +303 -0
- package/lib/domain/model/item/ItemLine.js +1169 -0
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.d.ts +75 -0
- package/lib/domain/model/item/ItemLineBaseDiscountDecorator.js +178 -0
- package/lib/domain/model/item/ItemLineBaseTaxAdjustmentDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineBaseTaxAdjustmentDecorator.js +51 -0
- package/lib/domain/model/item/ItemLineCommentReceiptDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineCommentReceiptDecorator.js +40 -0
- package/lib/domain/model/item/ItemLineExtendedAmountDecorator.d.ts +30 -0
- package/lib/domain/model/item/ItemLineExtendedAmountDecorator.js +124 -0
- package/lib/domain/model/item/ItemLineExtensibilityFormDataDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLineExtensibilityFormDataDecorator.js +43 -0
- package/lib/domain/model/item/ItemLineGiftIssueDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineGiftIssueDecorator.js +53 -0
- package/lib/domain/model/item/ItemLineGiftReceiptDecorator.d.ts +15 -0
- package/lib/domain/model/item/ItemLineGiftReceiptDecorator.js +37 -0
- package/lib/domain/model/item/ItemLineManualDiscountDecorator.d.ts +57 -0
- package/lib/domain/model/item/ItemLineManualDiscountDecorator.js +198 -0
- package/lib/domain/model/item/ItemLineNonFinancialRewardDecorator.d.ts +40 -0
- package/lib/domain/model/item/ItemLineNonFinancialRewardDecorator.js +116 -0
- package/lib/domain/model/item/ItemLineOriginalAdjustmentDecorator.d.ts +13 -0
- package/lib/domain/model/item/ItemLineOriginalAdjustmentDecorator.js +54 -0
- package/lib/domain/model/item/ItemLinePriceChangeDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLinePriceChangeDecorator.js +47 -0
- package/lib/domain/model/item/ItemLinePromotionDecorator.d.ts +45 -0
- package/lib/domain/model/item/ItemLinePromotionDecorator.js +142 -0
- package/lib/domain/model/item/ItemLineQuantityChangeDecorator.d.ts +18 -0
- package/lib/domain/model/item/ItemLineQuantityChangeDecorator.js +57 -0
- package/lib/domain/model/item/ItemLineReasonCodeChangeDecorator.d.ts +16 -0
- package/lib/domain/model/item/ItemLineReasonCodeChangeDecorator.js +49 -0
- package/lib/domain/model/item/ItemLineRegularPriceDecorator.d.ts +21 -0
- package/lib/domain/model/item/ItemLineRegularPriceDecorator.js +58 -0
- package/lib/domain/model/item/ItemLineReserveInventoryDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineReserveInventoryDecorator.js +42 -0
- package/lib/domain/model/item/ItemLineRewardDecorator.d.ts +39 -0
- package/lib/domain/model/item/ItemLineRewardDecorator.js +115 -0
- package/lib/domain/model/item/ItemLineSalePriceDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineSalePriceDecorator.js +51 -0
- package/lib/domain/model/item/ItemLineSalespersonDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineSalespersonDecorator.js +44 -0
- package/lib/domain/model/item/ItemLineSendSaleDecorator.d.ts +16 -0
- package/lib/domain/model/item/ItemLineSendSaleDecorator.js +39 -0
- package/lib/domain/model/item/ItemLineSubscriptionDecorator.d.ts +17 -0
- package/lib/domain/model/item/ItemLineSubscriptionDecorator.js +40 -0
- package/lib/domain/model/item/ItemLineTaxExemptDecorator.d.ts +21 -0
- package/lib/domain/model/item/ItemLineTaxExemptDecorator.js +64 -0
- package/lib/domain/model/item/ItemLineTaxOverrideDecorator.d.ts +19 -0
- package/lib/domain/model/item/ItemLineTaxOverrideDecorator.js +59 -0
- package/lib/domain/model/item/ItemOrderCancellationLine.d.ts +27 -0
- package/lib/domain/model/item/ItemOrderCancellationLine.js +65 -0
- package/lib/domain/model/item/ItemPriceChangeLine.d.ts +44 -0
- package/lib/domain/model/item/ItemPriceChangeLine.js +131 -0
- package/lib/domain/model/item/ItemQuantityChangeLine.d.ts +31 -0
- package/lib/domain/model/item/ItemQuantityChangeLine.js +93 -0
- package/lib/domain/model/item/ReasonCodeChangeLine.d.ts +32 -0
- package/lib/domain/model/item/ReasonCodeChangeLine.js +83 -0
- package/lib/domain/model/item/ReservedOrderItemLineCancellationDecorator.d.ts +19 -0
- package/lib/domain/model/item/ReservedOrderItemLineCancellationDecorator.js +52 -0
- package/lib/domain/model/item/VoidedItemLineDecorator.d.ts +28 -0
- package/lib/domain/model/item/VoidedItemLineDecorator.js +65 -0
- package/lib/domain/model/item/VoidedPriceChangeLineDecorator.d.ts +15 -0
- package/lib/domain/model/item/VoidedPriceChangeLineDecorator.js +38 -0
- package/lib/domain/model/item/index.d.ts +37 -0
- package/lib/domain/model/item/index.js +41 -0
- package/lib/domain/model/lottery/TaxLotteryAddLine.d.ts +24 -0
- package/lib/domain/model/lottery/TaxLotteryAddLine.js +54 -0
- package/lib/domain/model/lottery/TaxLotteryModificationLine.d.ts +26 -0
- package/lib/domain/model/lottery/TaxLotteryModificationLine.js +61 -0
- package/lib/domain/model/lottery/TaxLotteryVoidLine.d.ts +28 -0
- package/lib/domain/model/lottery/TaxLotteryVoidLine.js +66 -0
- package/lib/domain/model/lottery/index.d.ts +3 -0
- package/lib/domain/model/lottery/index.js +9 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyEnrollmentLine.d.ts +46 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyEnrollmentLine.js +105 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyMembershipLine.d.ts +34 -0
- package/lib/domain/model/loyaltyMembership/LoyaltyMembershipLine.js +117 -0
- package/lib/domain/model/loyaltyMembership/index.d.ts +2 -0
- package/lib/domain/model/loyaltyMembership/index.js +8 -0
- package/lib/domain/model/mixedBasket/IMixedBasket.d.ts +4 -0
- package/lib/domain/model/mixedBasket/IMixedBasket.js +3 -0
- package/lib/domain/model/mixedBasket/MixedBasketSession.d.ts +21 -0
- package/lib/domain/model/mixedBasket/MixedBasketSession.js +55 -0
- package/lib/domain/model/mixedBasket/index.d.ts +2 -0
- package/lib/domain/model/mixedBasket/index.js +7 -0
- package/lib/domain/model/noSale/NoSaleLine.d.ts +32 -0
- package/lib/domain/model/noSale/NoSaleLine.js +75 -0
- package/lib/domain/model/noSale/StartNoSaleLine.d.ts +33 -0
- package/lib/domain/model/noSale/StartNoSaleLine.js +75 -0
- package/lib/domain/model/noSale/index.d.ts +2 -0
- package/lib/domain/model/noSale/index.js +8 -0
- package/lib/domain/model/order/IOrderTotalsAccumulator.d.ts +23 -0
- package/lib/domain/model/order/IOrderTotalsAccumulator.js +3 -0
- package/lib/domain/model/order/OrderDeliveryAssignmentLine.d.ts +20 -0
- package/lib/domain/model/order/OrderDeliveryAssignmentLine.js +64 -0
- package/lib/domain/model/order/OrderItemReference.d.ts +5 -0
- package/lib/domain/model/order/OrderItemReference.js +3 -0
- package/lib/domain/model/order/OrderTotalsAccumulator.d.ts +39 -0
- package/lib/domain/model/order/OrderTotalsAccumulator.js +48 -0
- package/lib/domain/model/order/index.d.ts +4 -0
- package/lib/domain/model/order/index.js +8 -0
- package/lib/domain/model/paidOperation/PaidOperationLine.d.ts +23 -0
- package/lib/domain/model/paidOperation/PaidOperationLine.js +65 -0
- package/lib/domain/model/paidOperation/PaidOperationSignatureLine.d.ts +27 -0
- package/lib/domain/model/paidOperation/PaidOperationSignatureLine.js +58 -0
- package/lib/domain/model/paidOperation/StartPaidOperationLine.d.ts +34 -0
- package/lib/domain/model/paidOperation/StartPaidOperationLine.js +75 -0
- package/lib/domain/model/paidOperation/index.d.ts +3 -0
- package/lib/domain/model/paidOperation/index.js +9 -0
- package/lib/domain/model/paymentDevice/IUploadDeviceLogsLine.d.ts +6 -0
- package/lib/domain/model/paymentDevice/IUploadDeviceLogsLine.js +3 -0
- package/lib/domain/model/paymentDevice/UploadDeviceLogLine.d.ts +28 -0
- package/lib/domain/model/paymentDevice/UploadDeviceLogLine.js +57 -0
- package/lib/domain/model/paymentDevice/index.d.ts +1 -0
- package/lib/domain/model/paymentDevice/index.js +7 -0
- package/lib/domain/model/print/PrintStatusLine.d.ts +27 -0
- package/lib/domain/model/print/PrintStatusLine.js +55 -0
- package/lib/domain/model/print/index.d.ts +1 -0
- package/lib/domain/model/print/index.js +7 -0
- package/lib/domain/model/receipt/BaseReceiptLineDecorator.d.ts +49 -0
- package/lib/domain/model/receipt/BaseReceiptLineDecorator.js +115 -0
- package/lib/domain/model/receipt/FiscalReceiptLine.d.ts +63 -0
- package/lib/domain/model/receipt/FiscalReceiptLine.js +170 -0
- package/lib/domain/model/receipt/GiftReceiptLine.d.ts +17 -0
- package/lib/domain/model/receipt/GiftReceiptLine.js +51 -0
- package/lib/domain/model/receipt/IPrintRetryLine.d.ts +4 -0
- package/lib/domain/model/receipt/IPrintRetryLine.js +3 -0
- package/lib/domain/model/receipt/IReceiptLine.d.ts +37 -0
- package/lib/domain/model/receipt/IReceiptLine.js +3 -0
- package/lib/domain/model/receipt/IReceiptRefundMessage.d.ts +4 -0
- package/lib/domain/model/receipt/IReceiptRefundMessage.js +3 -0
- package/lib/domain/model/receipt/ItemCommentLine.d.ts +16 -0
- package/lib/domain/model/receipt/ItemCommentLine.js +50 -0
- package/lib/domain/model/receipt/PrintRetryLine.d.ts +14 -0
- package/lib/domain/model/receipt/PrintRetryLine.js +43 -0
- package/lib/domain/model/receipt/PrintRetryLineDecorator.d.ts +12 -0
- package/lib/domain/model/receipt/PrintRetryLineDecorator.js +28 -0
- package/lib/domain/model/receipt/PrinterStatusReceiptLineDecorator.d.ts +12 -0
- package/lib/domain/model/receipt/PrinterStatusReceiptLineDecorator.js +38 -0
- package/lib/domain/model/receipt/ReceiptDestinationReceiptLineDecorator.d.ts +18 -0
- package/lib/domain/model/receipt/ReceiptDestinationReceiptLineDecorator.js +44 -0
- package/lib/domain/model/receipt/ReceiptLine.d.ts +88 -0
- package/lib/domain/model/receipt/ReceiptLine.js +236 -0
- package/lib/domain/model/receipt/ReceiptOptionLine.d.ts +44 -0
- package/lib/domain/model/receipt/ReceiptOptionLine.js +107 -0
- package/lib/domain/model/receipt/index.d.ts +12 -0
- package/lib/domain/model/receipt/index.js +15 -0
- package/lib/domain/model/reprint/ReprintTransactionLine.d.ts +30 -0
- package/lib/domain/model/reprint/ReprintTransactionLine.js +64 -0
- package/lib/domain/model/reprint/index.d.ts +1 -0
- package/lib/domain/model/reprint/index.js +7 -0
- package/lib/domain/model/salesperson/SalespersonLine.d.ts +27 -0
- package/lib/domain/model/salesperson/SalespersonLine.js +60 -0
- package/lib/domain/model/salesperson/index.d.ts +1 -0
- package/lib/domain/model/salesperson/index.js +7 -0
- package/lib/domain/model/sendsale/SendSaleConversionLine.d.ts +25 -0
- package/lib/domain/model/sendsale/SendSaleConversionLine.js +50 -0
- package/lib/domain/model/sendsale/index.d.ts +1 -0
- package/lib/domain/model/sendsale/index.js +7 -0
- package/lib/domain/model/shipping/ShippingFeeChangeLine.d.ts +39 -0
- package/lib/domain/model/shipping/ShippingFeeChangeLine.js +95 -0
- package/lib/domain/model/shipping/ShippingFeeLineChangeDecorator.d.ts +26 -0
- package/lib/domain/model/shipping/ShippingFeeLineChangeDecorator.js +81 -0
- package/lib/domain/model/shipping/index.d.ts +2 -0
- package/lib/domain/model/shipping/index.js +8 -0
- package/lib/domain/model/subscription/AddSubscriptionLine.d.ts +31 -0
- package/lib/domain/model/subscription/AddSubscriptionLine.js +69 -0
- package/lib/domain/model/subscription/ModifySubscriptionLine.d.ts +31 -0
- package/lib/domain/model/subscription/ModifySubscriptionLine.js +69 -0
- package/lib/domain/model/subscription/RemoveSubscriptionLine.d.ts +25 -0
- package/lib/domain/model/subscription/RemoveSubscriptionLine.js +50 -0
- package/lib/domain/model/subscription/index.d.ts +3 -0
- package/lib/domain/model/subscription/index.js +9 -0
- package/lib/domain/model/supervisorOverride/ISupervisorCredentials.d.ts +4 -0
- package/lib/domain/model/supervisorOverride/ISupervisorCredentials.js +3 -0
- package/lib/domain/model/supervisorOverride/SupervisorOverrideLine.d.ts +24 -0
- package/lib/domain/model/supervisorOverride/SupervisorOverrideLine.js +51 -0
- package/lib/domain/model/supervisorOverride/index.d.ts +2 -0
- package/lib/domain/model/supervisorOverride/index.js +7 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.d.ts +53 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.js +187 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.d.ts +27 -0
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.js +74 -0
- package/lib/domain/model/taxExempt/ITaxExemptLine.d.ts +22 -0
- package/lib/domain/model/taxExempt/ITaxExemptLine.js +3 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.d.ts +23 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.js +47 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.d.ts +32 -0
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.js +91 -0
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.d.ts +28 -0
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.js +62 -0
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.d.ts +28 -0
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.js +62 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.d.ts +23 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.js +47 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.d.ts +32 -0
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.js +93 -0
- package/lib/domain/model/taxExempt/VoidedItemTaxExemptLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxExempt/VoidedItemTaxExemptLineDecorator.js +38 -0
- package/lib/domain/model/taxExempt/VoidedTransactionTaxExemptLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxExempt/VoidedTransactionTaxExemptLineDecorator.js +38 -0
- package/lib/domain/model/taxExempt/index.d.ts +11 -0
- package/lib/domain/model/taxExempt/index.js +16 -0
- package/lib/domain/model/taxLottery/TaxLotteryLine.d.ts +24 -0
- package/lib/domain/model/taxLottery/TaxLotteryLine.js +49 -0
- package/lib/domain/model/taxLottery/index.d.ts +1 -0
- package/lib/domain/model/taxLottery/index.js +7 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLine.d.ts +40 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLine.js +153 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLineDecorator.d.ts +21 -0
- package/lib/domain/model/taxOverride/BaseTaxOverrideLineDecorator.js +54 -0
- package/lib/domain/model/taxOverride/ITaxOverrideLine.d.ts +19 -0
- package/lib/domain/model/taxOverride/ITaxOverrideLine.js +3 -0
- package/lib/domain/model/taxOverride/ModifyTaxOverrideLine.d.ts +31 -0
- package/lib/domain/model/taxOverride/ModifyTaxOverrideLine.js +70 -0
- package/lib/domain/model/taxOverride/TaxOverrideLine.d.ts +15 -0
- package/lib/domain/model/taxOverride/TaxOverrideLine.js +49 -0
- package/lib/domain/model/taxOverride/TaxOverrideLineModificationDecorator.d.ts +14 -0
- package/lib/domain/model/taxOverride/TaxOverrideLineModificationDecorator.js +39 -0
- package/lib/domain/model/taxOverride/VoidedTaxOverrideLineDecorator.d.ts +15 -0
- package/lib/domain/model/taxOverride/VoidedTaxOverrideLineDecorator.js +38 -0
- package/lib/domain/model/taxOverride/index.d.ts +7 -0
- package/lib/domain/model/taxOverride/index.js +12 -0
- package/lib/domain/model/taxRecord/ITaxRecordLine.d.ts +90 -0
- package/lib/domain/model/taxRecord/ITaxRecordLine.js +3 -0
- package/lib/domain/model/taxRecord/TaxRecordLine.d.ts +67 -0
- package/lib/domain/model/taxRecord/TaxRecordLine.js +175 -0
- package/lib/domain/model/taxRecord/index.d.ts +2 -0
- package/lib/domain/model/taxRecord/index.js +7 -0
- package/lib/domain/model/taxRefund/ReprintTaxRefundLine.d.ts +30 -0
- package/lib/domain/model/taxRefund/ReprintTaxRefundLine.js +64 -0
- package/lib/domain/model/taxRefund/StartTaxRefundLine.d.ts +29 -0
- package/lib/domain/model/taxRefund/StartTaxRefundLine.js +62 -0
- package/lib/domain/model/taxRefund/TaxRefundInterfaces.d.ts +229 -0
- package/lib/domain/model/taxRefund/TaxRefundInterfaces.js +36 -0
- package/lib/domain/model/taxRefund/TaxRefundLine.d.ts +34 -0
- package/lib/domain/model/taxRefund/TaxRefundLine.js +73 -0
- package/lib/domain/model/taxRefund/TaxRefundSession.d.ts +84 -0
- package/lib/domain/model/taxRefund/TaxRefundSession.js +214 -0
- package/lib/domain/model/taxRefund/VoidTaxRefundLine.d.ts +30 -0
- package/lib/domain/model/taxRefund/VoidTaxRefundLine.js +71 -0
- package/lib/domain/model/taxRefund/index.d.ts +6 -0
- package/lib/domain/model/taxRefund/index.js +12 -0
- package/lib/domain/model/tender/BaseTenderLineDecorator.d.ts +47 -0
- package/lib/domain/model/tender/BaseTenderLineDecorator.js +110 -0
- package/lib/domain/model/tender/CancelSubscriptionTokenLine.d.ts +11 -0
- package/lib/domain/model/tender/CancelSubscriptionTokenLine.js +32 -0
- package/lib/domain/model/tender/ITenderLine.d.ts +45 -0
- package/lib/domain/model/tender/ITenderLine.js +3 -0
- package/lib/domain/model/tender/OfflineAuthorization.d.ts +17 -0
- package/lib/domain/model/tender/OfflineAuthorization.js +47 -0
- package/lib/domain/model/tender/RefundedTenderLineDecorator.d.ts +12 -0
- package/lib/domain/model/tender/RefundedTenderLineDecorator.js +42 -0
- package/lib/domain/model/tender/TenderAuthorizationStatusLine.d.ts +65 -0
- package/lib/domain/model/tender/TenderAuthorizationStatusLine.js +220 -0
- package/lib/domain/model/tender/TenderChangeCancelLine.d.ts +25 -0
- package/lib/domain/model/tender/TenderChangeCancelLine.js +51 -0
- package/lib/domain/model/tender/TenderLine.d.ts +113 -0
- package/lib/domain/model/tender/TenderLine.js +385 -0
- package/lib/domain/model/tender/TenderSignatureLine.d.ts +29 -0
- package/lib/domain/model/tender/TenderSignatureLine.js +66 -0
- package/lib/domain/model/tender/TenderTaxLineDecorator.d.ts +12 -0
- package/lib/domain/model/tender/TenderTaxLineDecorator.js +29 -0
- package/lib/domain/model/tender/TenderUtils.d.ts +9 -0
- package/lib/domain/model/tender/TenderUtils.js +43 -0
- package/lib/domain/model/tender/VoidedTenderLineDecorator.d.ts +13 -0
- package/lib/domain/model/tender/VoidedTenderLineDecorator.js +43 -0
- package/lib/domain/model/tender/exchange/StartTenderExchangeLine.d.ts +28 -0
- package/lib/domain/model/tender/exchange/StartTenderExchangeLine.js +56 -0
- package/lib/domain/model/tender/exchange/index.d.ts +1 -0
- package/lib/domain/model/tender/exchange/index.js +7 -0
- package/lib/domain/model/tender/index.d.ts +16 -0
- package/lib/domain/model/tender/index.js +21 -0
- package/lib/domain/model/tender/reversals/Interfaces.d.ts +25 -0
- package/lib/domain/model/tender/reversals/Interfaces.js +10 -0
- package/lib/domain/model/tender/reversals/index.d.ts +1 -0
- package/lib/domain/model/tender/reversals/index.js +7 -0
- package/lib/domain/model/tender/valueCard/Interfaces.d.ts +84 -0
- package/lib/domain/model/tender/valueCard/Interfaces.js +104 -0
- package/lib/domain/model/tender/valueCard/index.d.ts +1 -0
- package/lib/domain/model/tender/valueCard/index.js +7 -0
- package/lib/domain/model/tender/valueCertificate/Interfaces.d.ts +228 -0
- package/lib/domain/model/tender/valueCertificate/Interfaces.js +78 -0
- package/lib/domain/model/tender/valueCertificate/index.d.ts +1 -0
- package/lib/domain/model/tender/valueCertificate/index.js +7 -0
- package/lib/domain/model/terminal/FiscalPrinterAbortLineType.d.ts +21 -0
- package/lib/domain/model/terminal/FiscalPrinterAbortLineType.js +45 -0
- package/lib/domain/model/terminal/FiscalPrinterReportLineType.d.ts +34 -0
- package/lib/domain/model/terminal/FiscalPrinterReportLineType.js +85 -0
- package/lib/domain/model/terminal/FiscalPrinterStatusLineType.d.ts +24 -0
- package/lib/domain/model/terminal/FiscalPrinterStatusLineType.js +55 -0
- package/lib/domain/model/terminal/FiscalPrinterSyncLineType.d.ts +28 -0
- package/lib/domain/model/terminal/FiscalPrinterSyncLineType.js +67 -0
- package/lib/domain/model/terminal/TerminalStateChangeLine.d.ts +27 -0
- package/lib/domain/model/terminal/TerminalStateChangeLine.js +61 -0
- package/lib/domain/model/terminal/index.d.ts +5 -0
- package/lib/domain/model/terminal/index.js +11 -0
- package/lib/domain/model/till/StartTillLine.d.ts +58 -0
- package/lib/domain/model/till/StartTillLine.js +119 -0
- package/lib/domain/model/till/TenderTransferLine.d.ts +33 -0
- package/lib/domain/model/till/TenderTransferLine.js +140 -0
- package/lib/domain/model/till/TillAdjustmentLine.d.ts +21 -0
- package/lib/domain/model/till/TillAdjustmentLine.js +64 -0
- package/lib/domain/model/till/TillCountLine.d.ts +27 -0
- package/lib/domain/model/till/TillCountLine.js +96 -0
- package/lib/domain/model/till/TillFloatLine.d.ts +29 -0
- package/lib/domain/model/till/TillFloatLine.js +90 -0
- package/lib/domain/model/till/TillStateChangeLine.d.ts +26 -0
- package/lib/domain/model/till/TillStateChangeLine.js +78 -0
- package/lib/domain/model/till/index.d.ts +6 -0
- package/lib/domain/model/till/index.js +12 -0
- package/lib/domain/model/transaction/AttachmentLine.d.ts +17 -0
- package/lib/domain/model/transaction/AttachmentLine.js +45 -0
- package/lib/domain/model/transaction/CloseTransactionLine.d.ts +22 -0
- package/lib/domain/model/transaction/CloseTransactionLine.js +44 -0
- package/lib/domain/model/transaction/IPostVoidSearchResult.d.ts +7 -0
- package/lib/domain/model/transaction/IPostVoidSearchResult.js +4 -0
- package/lib/domain/model/transaction/RecordTransactionLine.d.ts +29 -0
- package/lib/domain/model/transaction/RecordTransactionLine.js +60 -0
- package/lib/domain/model/transaction/SignatureLine.d.ts +30 -0
- package/lib/domain/model/transaction/SignatureLine.js +67 -0
- package/lib/domain/model/transaction/SuspendTransactionLine.d.ts +24 -0
- package/lib/domain/model/transaction/SuspendTransactionLine.js +52 -0
- package/lib/domain/model/transaction/TotalTransactionLine.d.ts +26 -0
- package/lib/domain/model/transaction/TotalTransactionLine.js +55 -0
- package/lib/domain/model/transaction/TransactionResumeCompleteLine.d.ts +22 -0
- package/lib/domain/model/transaction/TransactionResumeCompleteLine.js +44 -0
- package/lib/domain/model/transaction/TransactionResumeStartLine.d.ts +25 -0
- package/lib/domain/model/transaction/TransactionResumeStartLine.js +55 -0
- package/lib/domain/model/transaction/TransactionReturnModeLine.d.ts +23 -0
- package/lib/domain/model/transaction/TransactionReturnModeLine.js +45 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.d.ts +27 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.js +61 -0
- package/lib/domain/model/transaction/fiscal/index.d.ts +1 -0
- package/lib/domain/model/transaction/fiscal/index.js +7 -0
- package/lib/domain/model/transaction/index.d.ts +12 -0
- package/lib/domain/model/transaction/index.js +18 -0
- package/lib/domain/model/transaction/order/ItemFulfillmentReferenceLine.d.ts +25 -0
- package/lib/domain/model/transaction/order/ItemFulfillmentReferenceLine.js +51 -0
- package/lib/domain/model/transaction/order/ItemPickupSignatureLine.d.ts +28 -0
- package/lib/domain/model/transaction/order/ItemPickupSignatureLine.js +63 -0
- package/lib/domain/model/transaction/order/OrderReferenceLine.d.ts +25 -0
- package/lib/domain/model/transaction/order/OrderReferenceLine.js +50 -0
- package/lib/domain/model/transaction/order/index.d.ts +3 -0
- package/lib/domain/model/transaction/order/index.js +9 -0
- package/lib/domain/model/user/AuthenticationFailedLine.d.ts +16 -0
- package/lib/domain/model/user/AuthenticationFailedLine.js +45 -0
- package/lib/domain/model/user/IPasswordExpiration.d.ts +4 -0
- package/lib/domain/model/user/IPasswordExpiration.js +3 -0
- package/lib/domain/model/user/PasswordExpiration.d.ts +10 -0
- package/lib/domain/model/user/PasswordExpiration.js +38 -0
- package/lib/domain/model/user/UserLine.d.ts +33 -0
- package/lib/domain/model/user/UserLine.js +84 -0
- package/lib/domain/model/user/index.d.ts +4 -0
- package/lib/domain/model/user/index.js +9 -0
- package/lib/domain/model/void/LineVoidLine.d.ts +50 -0
- package/lib/domain/model/void/LineVoidLine.js +158 -0
- package/lib/domain/model/void/TransactionVoidLine.d.ts +34 -0
- package/lib/domain/model/void/TransactionVoidLine.js +86 -0
- package/lib/domain/model/void/VoidedLineDecorator.d.ts +10 -0
- package/lib/domain/model/void/VoidedLineDecorator.js +40 -0
- package/lib/domain/model/void/index.d.ts +3 -0
- package/lib/domain/model/void/index.js +9 -0
- package/lib/domain/processing/PosBusinessAction.d.ts +9 -0
- package/lib/domain/processing/PosBusinessAction.js +55 -0
- package/lib/domain/processing/index.d.ts +1 -0
- package/lib/domain/processing/index.js +7 -0
- package/lib/domain/service/IReceiptFormattingService.d.ts +48 -0
- package/lib/domain/service/IReceiptFormattingService.js +3 -0
- package/lib/domain/service/ITransactionAccountingService.d.ts +6 -0
- package/lib/domain/service/ITransactionAccountingService.js +3 -0
- package/lib/domain/service/ITransactionReferenceFormatter.d.ts +4 -0
- package/lib/domain/service/ITransactionReferenceFormatter.js +3 -0
- package/lib/domain/service/index.d.ts +3 -0
- package/lib/domain/service/index.js +3 -0
- package/lib/domain/utility/index.d.ts +3 -0
- package/lib/domain/utility/index.js +9 -0
- package/lib/domain/utility/orderUtils.d.ts +6 -0
- package/lib/domain/utility/orderUtils.js +47 -0
- package/lib/domain/utility/supervisorOverride.d.ts +28 -0
- package/lib/domain/utility/supervisorOverride.js +298 -0
- package/lib/domain/utility/utils.d.ts +12 -0
- package/lib/domain/utility/utils.js +128 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/package.json +194 -0
- package/types/es-symbol/index.d.ts +4 -0
|
@@ -0,0 +1,1299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _ = require("lodash");
|
|
4
|
+
const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
|
|
5
|
+
const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
|
|
6
|
+
const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-transaction");
|
|
7
|
+
const config_1 = require("../../config");
|
|
8
|
+
const Customer_1 = require("./Customer");
|
|
9
|
+
const Employee_1 = require("./Employee");
|
|
10
|
+
const item_1 = require("./item");
|
|
11
|
+
const Order_1 = require("./Order");
|
|
12
|
+
const RetailTransaction_1 = require("./RetailTransaction");
|
|
13
|
+
const utils_1 = require("../utility/utils");
|
|
14
|
+
const TaxCustomerLine_1 = require("./customer/TaxCustomerLine");
|
|
15
|
+
exports.MERCHANDISE_TRANSACTION_TYPE = "MerchandiseTransaction";
|
|
16
|
+
exports.isMerchandiseTransaction = (transaction) => {
|
|
17
|
+
// tslint:disable-next-line:no-use-before-declare
|
|
18
|
+
return (transaction instanceof MerchandiseTransaction ||
|
|
19
|
+
(transaction &&
|
|
20
|
+
transaction.transactionSubTotal !== undefined &&
|
|
21
|
+
transaction.transactionBalanceDue !== undefined));
|
|
22
|
+
};
|
|
23
|
+
/*
|
|
24
|
+
Ensure that any new property needs to added here as well toJSON methods as well.
|
|
25
|
+
*/
|
|
26
|
+
class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
27
|
+
constructor(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, governmentIssuedIds, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, fiscalSignature, requiresVoid, eInvoiceReference, prepaidTendersToApply, digestValue) {
|
|
28
|
+
super(deviceIdentity, businessDayDate, transactionNumber, exports.MERCHANDISE_TRANSACTION_TYPE, performingUser, transactionId);
|
|
29
|
+
this._accountingCurrency = accountingCurrency;
|
|
30
|
+
this._transactionTotalDeliveryFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
31
|
+
this._transactionTotalBagFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
32
|
+
this._transactionTotalPublicImprovementFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
33
|
+
this._transactionTotalCustomFeeByType = undefined;
|
|
34
|
+
this._transactionTotalShippingFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
35
|
+
this._transactionSubTotal = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
36
|
+
this._transactionSubTotalAfterTaxAdjustment = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
37
|
+
this._transactionTotalFeeAfterTaxAdjustment = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
38
|
+
this._transactionSubTotalExcludingTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
39
|
+
this._transactionSubTotalIncludingTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
40
|
+
this._transactionOrderGrandTotal = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
41
|
+
this._transactionTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
42
|
+
this._transactionTaxableAmount = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
43
|
+
this._transactionSubTotalExcludingTransactionDiscounts = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
44
|
+
this._transactionLevelSavings = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
45
|
+
this._transactionTaxes = undefined;
|
|
46
|
+
this._transactionTotalTendered = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
47
|
+
this._transactionTotalTenderedPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
48
|
+
this._transactionTotalTenderedExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
49
|
+
this._transactionTotalPreviouslyCollectedTenders = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
50
|
+
this._transactionTotalTenderedOnOrderCreate = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
51
|
+
this._transactionTotalChangeTendered = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
52
|
+
this._transactionNonTaxableFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
53
|
+
this._transactionTotalFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
54
|
+
this._transactionTotalDonations = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
55
|
+
this._transactionTotalSavings = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
56
|
+
this._transactionTotalTransactionDiscounts = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
57
|
+
this._returnSubTotal = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
58
|
+
this._returnSubTotalExcludingTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
59
|
+
this._returnSubTotalIncludingTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
60
|
+
this._returnTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
61
|
+
this._returnTotalSavings = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
62
|
+
this._saleTotalQuantity = 0;
|
|
63
|
+
this._returnTotalQuantity = 0;
|
|
64
|
+
this._customer = undefined;
|
|
65
|
+
this._taxCustomer = undefined;
|
|
66
|
+
this._transactionTradeType = undefined;
|
|
67
|
+
this._salesperson = undefined;
|
|
68
|
+
this._shouldUpdatePricing = false;
|
|
69
|
+
this._shouldUpdateTaxation = false;
|
|
70
|
+
this._transactionReferenceFormatter = transactionReferenceFormatter;
|
|
71
|
+
this._giftReceiptMode = giftReceiptMode;
|
|
72
|
+
this._giftReceipt = giftReceipt;
|
|
73
|
+
this._totalsBeforeVoid = totalsBeforeVoid;
|
|
74
|
+
this._unusedCoupons = unusedCoupons;
|
|
75
|
+
this._employeeCustomer = employeeCustomer;
|
|
76
|
+
this._governmentIssuedIds = governmentIssuedIds;
|
|
77
|
+
this._invoiceNumber = invoiceNumber;
|
|
78
|
+
this._invoiceSequenceNumber = invoiceSequenceNumber;
|
|
79
|
+
this._invoiceSequenceNumberGenerator = invoiceSequenceNumberGenerator;
|
|
80
|
+
this._taxLotteryNumber = taxLotteryNumber;
|
|
81
|
+
this._transactionTaxExemptAmount = undefined;
|
|
82
|
+
this._transactionTaxAdjustmentAmount = undefined;
|
|
83
|
+
this._tradeType = undefined;
|
|
84
|
+
this._denominationRounding = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
85
|
+
this._order = order;
|
|
86
|
+
this._taxLotteryCustomerCode = taxLotteryCustomerCode;
|
|
87
|
+
this._taxScanCodeData = taxScanCodeData;
|
|
88
|
+
this._fiscalSignature = fiscalSignature;
|
|
89
|
+
this._requiresVoid = requiresVoid;
|
|
90
|
+
this._eInvoiceReference = eInvoiceReference;
|
|
91
|
+
this._digestValue = digestValue;
|
|
92
|
+
this._prepaidTendersToApply = prepaidTendersToApply;
|
|
93
|
+
this._transactionSubTotalExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
94
|
+
this._transactionTotalSavingsExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
95
|
+
this._transactionTotalTaxExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
96
|
+
this._balanceDueExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
97
|
+
this._transactionTotalExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
98
|
+
this._transactionSubTotalExcludingPreviouslyCollectedExcludingTax = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
99
|
+
}
|
|
100
|
+
// Note: Remember to also add/remove properties in newTransaction(), clone() and loadFromJsonObject().
|
|
101
|
+
static createFromJsonObj(transactionJsonObj, transactionLineFactory,
|
|
102
|
+
//tslint:disable-next-line
|
|
103
|
+
transactionReferenceFormatter) {
|
|
104
|
+
const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
|
|
105
|
+
const deviceIdentity = RetailTransaction_1.RetailTransaction.getDeviceIdentityFromJsonObject(transactionJsonObj);
|
|
106
|
+
const businessDayDate = RetailTransaction_1.RetailTransaction.getBusinessDayDateFromJsonObject(transactionJsonObj);
|
|
107
|
+
const transactionNumber = RetailTransaction_1.RetailTransaction.getTransactionNumberFromJsonObject(transactionJsonObj);
|
|
108
|
+
const performingUser = RetailTransaction_1.RetailTransaction.getPerformingUserFromJsonObject(transactionJsonObj);
|
|
109
|
+
const accountingCurrency = transactionJsonObj._accountingCurrency;
|
|
110
|
+
const giftReceiptMode = transactionJsonObj._giftReceiptMode;
|
|
111
|
+
const giftReceipt = transactionJsonObj._giftReceipt;
|
|
112
|
+
const totalsBeforeVoid = transactionJsonObj._totalsBeforeVoid;
|
|
113
|
+
const unusedCoupons = transactionJsonObj._unusedCoupons;
|
|
114
|
+
const employeeCustomer = Employee_1.Employee.createFromJsonObject(transactionJsonObj._employeeCustomer);
|
|
115
|
+
const gbns = transactionJsonObj._governmentIssuedIds;
|
|
116
|
+
const invoiceNumber = transactionJsonObj._invoiceNumber;
|
|
117
|
+
const invoiceSequenceNumber = transactionJsonObj._invoiceSequenceNumber;
|
|
118
|
+
const invoiceSequenceNumberGenerator = transactionJsonObj._invoiceSequenceNumberGenerator;
|
|
119
|
+
const taxLotteryNumber = transactionJsonObj._taxLotteryNumber;
|
|
120
|
+
const order = Order_1.Order.createFromJsonObject(transactionJsonObj._order);
|
|
121
|
+
const taxScanCodeData = transactionJsonObj._taxScanCodeData;
|
|
122
|
+
const taxLotteryCustomerCode = transactionJsonObj._taxLotteryCustomerCode;
|
|
123
|
+
const eInvoiceReference = transactionJsonObj._eInvoiceReference;
|
|
124
|
+
const digestValue = transactionJsonObj._digestValue;
|
|
125
|
+
const prepaidTendersToApply = transactionJsonObj._prepaidTendersToApply;
|
|
126
|
+
const merchandiseTransaction = new MerchandiseTransaction(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, gbns, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, undefined, undefined, eInvoiceReference, prepaidTendersToApply, digestValue);
|
|
127
|
+
merchandiseTransaction.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
|
|
128
|
+
return merchandiseTransaction;
|
|
129
|
+
}
|
|
130
|
+
clone() {
|
|
131
|
+
const transaction = super.clone();
|
|
132
|
+
if (exports.isMerchandiseTransaction(transaction)) {
|
|
133
|
+
transaction._accountingCurrency = this._accountingCurrency;
|
|
134
|
+
transaction._transactionSubTotal = this._transactionSubTotal;
|
|
135
|
+
transaction._transactionSubTotalAfterTaxAdjustment = this._transactionSubTotalAfterTaxAdjustment;
|
|
136
|
+
transaction._transactionTotalFeeAfterTaxAdjustment = this._transactionTotalFeeAfterTaxAdjustment;
|
|
137
|
+
transaction._transactionSubTotalExcludingTax = this._transactionSubTotalExcludingTax;
|
|
138
|
+
transaction._transactionSubTotalIncludingTax = this._transactionSubTotalIncludingTax;
|
|
139
|
+
transaction._transactionOrderGrandTotal = this._transactionOrderGrandTotal;
|
|
140
|
+
transaction._transactionTax = this._transactionTax;
|
|
141
|
+
transaction._transactionTaxableAmount = this._transactionTaxableAmount;
|
|
142
|
+
transaction._transactionSubTotalExcludingTransactionDiscounts =
|
|
143
|
+
this._transactionSubTotalExcludingTransactionDiscounts;
|
|
144
|
+
transaction._transactionLevelSavings = this._transactionLevelSavings;
|
|
145
|
+
transaction._transactionTaxes = this._transactionTaxes;
|
|
146
|
+
transaction._transactionTotalSavings = this._transactionTotalSavings;
|
|
147
|
+
transaction._transactionTotalTransactionDiscounts = this._transactionTotalTransactionDiscounts;
|
|
148
|
+
transaction._transactionTotalTendered = this._transactionTotalTendered;
|
|
149
|
+
transaction._transactionTotalTenderedPreviouslyCollected =
|
|
150
|
+
this._transactionTotalTenderedPreviouslyCollected;
|
|
151
|
+
transaction._transactionTotalTenderedExcludingPreviouslyCollected =
|
|
152
|
+
this._transactionTotalTenderedExcludingPreviouslyCollected;
|
|
153
|
+
transaction._transactionTotalPreviouslyCollectedTenders =
|
|
154
|
+
this._transactionTotalPreviouslyCollectedTenders;
|
|
155
|
+
transaction._transactionTotalChangeTendered = this._transactionTotalChangeTendered;
|
|
156
|
+
transaction._transactionTotalTenderedOnOrderCreate = this._transactionTotalTenderedOnOrderCreate;
|
|
157
|
+
transaction._transactionNonTaxableFee = this._transactionNonTaxableFee;
|
|
158
|
+
transaction._transactionFeeExcludingTax = this._transactionFeeExcludingTax;
|
|
159
|
+
transaction._transactionFeeTax = this._transactionFeeTax;
|
|
160
|
+
transaction._transactionTotalFee = this._transactionTotalFee;
|
|
161
|
+
transaction._transactionTotalDonations = this._transactionTotalDonations;
|
|
162
|
+
transaction._transactionTotalDeliveryFee = this._transactionTotalDeliveryFee;
|
|
163
|
+
transaction._transactionTotalBagFee = this._transactionTotalBagFee;
|
|
164
|
+
transaction._transactionTotalPublicImprovementFee = this._transactionTotalPublicImprovementFee;
|
|
165
|
+
transaction._transactionTotalCustomFeeByType = this._transactionTotalCustomFeeByType;
|
|
166
|
+
transaction._transactionTotalShippingFee = this._transactionTotalShippingFee;
|
|
167
|
+
transaction._returnSubTotal = this._returnSubTotal;
|
|
168
|
+
transaction._returnSubTotalExcludingTax = this._returnSubTotalExcludingTax;
|
|
169
|
+
transaction._returnSubTotalIncludingTax = this._returnSubTotalIncludingTax;
|
|
170
|
+
transaction._returnTax = this._returnTax;
|
|
171
|
+
transaction._returnTotalSavings = this._returnTotalSavings;
|
|
172
|
+
transaction._saleTotalQuantity = this._saleTotalQuantity;
|
|
173
|
+
transaction._returnTotalQuantity = this._returnTotalQuantity;
|
|
174
|
+
transaction._customer = this._customer;
|
|
175
|
+
transaction._taxCustomer = this._taxCustomer;
|
|
176
|
+
transaction._transactionTradeType = this._transactionTradeType;
|
|
177
|
+
transaction._shouldUpdatePricing = this._shouldUpdatePricing;
|
|
178
|
+
transaction._shouldUpdateTaxation = this._shouldUpdateTaxation;
|
|
179
|
+
transaction._transactionReferenceFormatter = this._transactionReferenceFormatter;
|
|
180
|
+
transaction._referenceNumber = this._referenceNumber;
|
|
181
|
+
transaction._giftReceiptMode = this._giftReceiptMode;
|
|
182
|
+
transaction._giftReceipt = this._giftReceipt;
|
|
183
|
+
transaction._salesperson = this._salesperson;
|
|
184
|
+
transaction._totalsBeforeVoid = this._totalsBeforeVoid;
|
|
185
|
+
transaction._unusedCoupons = this._unusedCoupons;
|
|
186
|
+
transaction._employeeCustomer = this._employeeCustomer;
|
|
187
|
+
transaction._governmentIssuedIds = this._governmentIssuedIds;
|
|
188
|
+
transaction._invoiceNumber = this._invoiceNumber;
|
|
189
|
+
transaction._invoiceSequenceNumber = this._invoiceSequenceNumber;
|
|
190
|
+
transaction._invoiceSequenceNumberGenerator = this._invoiceSequenceNumberGenerator;
|
|
191
|
+
transaction._transactionTaxExemptAmount = this._transactionTaxExemptAmount;
|
|
192
|
+
transaction._transactionTaxAdjustmentAmount = this._transactionTaxAdjustmentAmount;
|
|
193
|
+
transaction._tradeType = this._tradeType;
|
|
194
|
+
transaction._taxLotteryNumber = this._taxLotteryNumber;
|
|
195
|
+
transaction._denominationRounding = this._denominationRounding;
|
|
196
|
+
transaction._order = this._order;
|
|
197
|
+
transaction._orderReferenceSequenceNumber = this._orderReferenceSequenceNumber;
|
|
198
|
+
transaction._orderReferenceSequenceNumberGenerator = this._orderReferenceSequenceNumberGenerator;
|
|
199
|
+
transaction._taxLotteryCustomerCode = this._taxLotteryCustomerCode;
|
|
200
|
+
transaction._taxScanCodeData = this._taxScanCodeData;
|
|
201
|
+
transaction._fiscalSignature = this._fiscalSignature;
|
|
202
|
+
transaction._requiresVoid = this._requiresVoid;
|
|
203
|
+
transaction._fiscalTransactionNumber = this._fiscalTransactionNumber;
|
|
204
|
+
transaction._fiscalTypeCode = this._fiscalTypeCode;
|
|
205
|
+
transaction._fiscalTransactionSequenceNumber = this._fiscalTransactionSequenceNumber;
|
|
206
|
+
transaction._fiscalTransactionSequenceNumberGenerator = this._fiscalTransactionSequenceNumberGenerator;
|
|
207
|
+
transaction._invoiceFiscalTransactionNumber = this._invoiceFiscalTransactionNumber;
|
|
208
|
+
transaction._invoiceTransactionNumber = this._invoiceTransactionNumber;
|
|
209
|
+
transaction._eInvoiceReference = this._eInvoiceReference;
|
|
210
|
+
transaction._digestValue = this._digestValue;
|
|
211
|
+
transaction._prepaidTendersToApply = this._prepaidTendersToApply;
|
|
212
|
+
transaction._transactionSubTotalExcludingPreviouslyCollected =
|
|
213
|
+
this._transactionSubTotalExcludingPreviouslyCollected;
|
|
214
|
+
transaction._transactionTotalSavingsExcludingPreviouslyCollected =
|
|
215
|
+
this._transactionTotalSavingsExcludingPreviouslyCollected;
|
|
216
|
+
transaction._transactionTotalTaxExcludingPreviouslyCollected =
|
|
217
|
+
this._transactionTotalTaxExcludingPreviouslyCollected;
|
|
218
|
+
transaction._balanceDueExcludingPreviouslyCollected = this._balanceDueExcludingPreviouslyCollected;
|
|
219
|
+
transaction._transactionTotalExcludingPreviouslyCollected =
|
|
220
|
+
this._transactionTotalExcludingPreviouslyCollected;
|
|
221
|
+
transaction._transactionSubTotalExcludingPreviouslyCollectedExcludingTax =
|
|
222
|
+
this._transactionSubTotalExcludingPreviouslyCollectedExcludingTax;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
throw new scp_component_store_selling_core_1.PosError("Cannot clone MerchandiseTransaction, because new instance is not a MerchandiseTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
|
|
226
|
+
}
|
|
227
|
+
return transaction;
|
|
228
|
+
}
|
|
229
|
+
addLine(line) {
|
|
230
|
+
const transaction = super.addLine(line);
|
|
231
|
+
if (exports.isMerchandiseTransaction(transaction) &&
|
|
232
|
+
!(this.isReadyToClose() || this.isWaitingToClose() || this.isClosing() || this.isClosed())) {
|
|
233
|
+
if (line.couldAffectPricing) {
|
|
234
|
+
transaction._shouldUpdatePricing = true;
|
|
235
|
+
}
|
|
236
|
+
if (line.couldAffectTaxation) {
|
|
237
|
+
transaction._shouldUpdateTaxation = true;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return transaction;
|
|
241
|
+
}
|
|
242
|
+
createOrUpdateOrder(order) {
|
|
243
|
+
const newTransaction = this.clone();
|
|
244
|
+
newTransaction._order = order;
|
|
245
|
+
return newTransaction;
|
|
246
|
+
}
|
|
247
|
+
removeOrder() {
|
|
248
|
+
const newTransaction = this.clone();
|
|
249
|
+
newTransaction._order = undefined;
|
|
250
|
+
return newTransaction;
|
|
251
|
+
}
|
|
252
|
+
voidOrder() {
|
|
253
|
+
const newTransaction = this.clone();
|
|
254
|
+
newTransaction._order = newTransaction._order.void();
|
|
255
|
+
return newTransaction;
|
|
256
|
+
}
|
|
257
|
+
assignPrepaidTendersToApply(prepaidTendersToApply) {
|
|
258
|
+
const newTransaction = this.clone();
|
|
259
|
+
newTransaction._prepaidTendersToApply = prepaidTendersToApply;
|
|
260
|
+
return newTransaction;
|
|
261
|
+
}
|
|
262
|
+
removeAppliedPrepaidTender(prepaidTender) {
|
|
263
|
+
var _a;
|
|
264
|
+
const newTransaction = this.clone();
|
|
265
|
+
const transactionPrepaidTenders = (_a = newTransaction) === null || _a === void 0 ? void 0 : _a.prepaidTendersToApply;
|
|
266
|
+
if (transactionPrepaidTenders) {
|
|
267
|
+
newTransaction._prepaidTendersToApply = [];
|
|
268
|
+
const updatedPrepaidTendersToApply = [];
|
|
269
|
+
transactionPrepaidTenders.forEach((transactionPrepaidTender) => {
|
|
270
|
+
if (transactionPrepaidTender.sequenceNumber !== prepaidTender.sequenceNumber) {
|
|
271
|
+
updatedPrepaidTendersToApply.push(transactionPrepaidTender);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
newTransaction._prepaidTendersToApply = updatedPrepaidTendersToApply;
|
|
275
|
+
}
|
|
276
|
+
return newTransaction;
|
|
277
|
+
}
|
|
278
|
+
get accountingCurrency() {
|
|
279
|
+
return this._accountingCurrency;
|
|
280
|
+
}
|
|
281
|
+
get transactionSubTotal() {
|
|
282
|
+
return this._transactionSubTotal;
|
|
283
|
+
}
|
|
284
|
+
get transactionSubTotalAfterTaxAdjustment() {
|
|
285
|
+
return this._transactionSubTotalAfterTaxAdjustment;
|
|
286
|
+
}
|
|
287
|
+
get transactionTotalFeeAfterTaxAdjustment() {
|
|
288
|
+
return this._transactionTotalFeeAfterTaxAdjustment;
|
|
289
|
+
}
|
|
290
|
+
get transactionSubTotalExcludingTax() {
|
|
291
|
+
return this._transactionSubTotalExcludingTax;
|
|
292
|
+
}
|
|
293
|
+
get transactionSubTotalIncludingTax() {
|
|
294
|
+
return this._transactionSubTotalIncludingTax;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Total order items with shipping, including subscriptions and send sale
|
|
298
|
+
*/
|
|
299
|
+
get transactionOrderGrandTotal() {
|
|
300
|
+
return this._transactionOrderGrandTotal;
|
|
301
|
+
}
|
|
302
|
+
get transactionTax() {
|
|
303
|
+
return this._transactionTax;
|
|
304
|
+
}
|
|
305
|
+
get transactionTotalExcludingTax() {
|
|
306
|
+
return this.transactionTotal.minus(this.transactionTax);
|
|
307
|
+
}
|
|
308
|
+
get transactionTaxableAmount() {
|
|
309
|
+
return this._transactionTaxableAmount;
|
|
310
|
+
}
|
|
311
|
+
get transactionSubTotalExcludingTransactionDiscounts() {
|
|
312
|
+
return this._transactionSubTotalExcludingTransactionDiscounts;
|
|
313
|
+
}
|
|
314
|
+
get transactionLevelSavings() {
|
|
315
|
+
return this._transactionLevelSavings;
|
|
316
|
+
}
|
|
317
|
+
get transactionTaxes() {
|
|
318
|
+
return this.isVoided() || this.isPostVoid() ? [] : this._transactionTaxes;
|
|
319
|
+
}
|
|
320
|
+
get transactionTaxesBeforeVoid() {
|
|
321
|
+
return this.isVoided() || this.isPostVoid() ? this._transactionTaxes : [];
|
|
322
|
+
}
|
|
323
|
+
get transactionTotalSavings() {
|
|
324
|
+
return this._transactionTotalSavings;
|
|
325
|
+
}
|
|
326
|
+
get transactionTotalTransactionDiscounts() {
|
|
327
|
+
return this._transactionTotalTransactionDiscounts;
|
|
328
|
+
}
|
|
329
|
+
get transactionTotalTendered() {
|
|
330
|
+
return this._transactionTotalTendered;
|
|
331
|
+
}
|
|
332
|
+
get transactionTotalTenderedPreviouslyCollected() {
|
|
333
|
+
return this._transactionTotalTenderedPreviouslyCollected;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Transaction SubTotal excluding previously collected tendered amount and excluding tax
|
|
337
|
+
*/
|
|
338
|
+
get transactionSubTotalExcludingPreviouslyCollectedExcludingTax() {
|
|
339
|
+
return this._transactionSubTotalExcludingPreviouslyCollectedExcludingTax;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Total amount of tender applied to this transaction excluding previously collected tendered amount applied to this transaction
|
|
343
|
+
*/
|
|
344
|
+
get transactionTotalTenderedExcludingPreviouslyCollected() {
|
|
345
|
+
return this._transactionTotalTenderedExcludingPreviouslyCollected;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Total previously collected ammount applied to this transaction (transferfromaccount)
|
|
349
|
+
*/
|
|
350
|
+
get transactionTotalPreviouslyCollectedTenders() {
|
|
351
|
+
return this._transactionTotalPreviouslyCollectedTenders;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Total tendered amount for the order on creation (order items, order fees..)
|
|
355
|
+
*/
|
|
356
|
+
get transactionTotalTenderedOnOrderCreate() {
|
|
357
|
+
return this._transactionTotalTenderedOnOrderCreate;
|
|
358
|
+
}
|
|
359
|
+
get transactionTotalChangeTendered() {
|
|
360
|
+
return this._transactionTotalChangeTendered;
|
|
361
|
+
}
|
|
362
|
+
get transactionNonTaxableFee() {
|
|
363
|
+
return this._transactionNonTaxableFee;
|
|
364
|
+
}
|
|
365
|
+
get transactionTotalDonations() {
|
|
366
|
+
return this._transactionTotalDonations;
|
|
367
|
+
}
|
|
368
|
+
get transactionFeeExcludingTax() {
|
|
369
|
+
return this._transactionFeeExcludingTax;
|
|
370
|
+
}
|
|
371
|
+
get transactionFeeTax() {
|
|
372
|
+
return this._transactionFeeTax;
|
|
373
|
+
}
|
|
374
|
+
get transactionTotalFee() {
|
|
375
|
+
return this._transactionTotalFee;
|
|
376
|
+
}
|
|
377
|
+
get transactionTotalDeliveryFee() {
|
|
378
|
+
return this._transactionTotalDeliveryFee;
|
|
379
|
+
}
|
|
380
|
+
get transactionTotalBagFee() {
|
|
381
|
+
return this._transactionTotalBagFee;
|
|
382
|
+
}
|
|
383
|
+
get transactionTotalPublicImprovementFee() {
|
|
384
|
+
return this._transactionTotalPublicImprovementFee;
|
|
385
|
+
}
|
|
386
|
+
get transactionTotalCustomFeeByType() {
|
|
387
|
+
return this._transactionTotalCustomFeeByType;
|
|
388
|
+
}
|
|
389
|
+
get transactionTotalShippingFee() {
|
|
390
|
+
return this._transactionTotalShippingFee;
|
|
391
|
+
}
|
|
392
|
+
get returnSubTotal() {
|
|
393
|
+
return this._returnSubTotal;
|
|
394
|
+
}
|
|
395
|
+
get returnSubTotalExcludingTax() {
|
|
396
|
+
return this._returnSubTotalExcludingTax;
|
|
397
|
+
}
|
|
398
|
+
get returnSubTotalIncludingTax() {
|
|
399
|
+
return this._returnSubTotalIncludingTax;
|
|
400
|
+
}
|
|
401
|
+
get returnTax() {
|
|
402
|
+
return this._returnTax;
|
|
403
|
+
}
|
|
404
|
+
get returnTotalSavings() {
|
|
405
|
+
return this._returnTotalSavings;
|
|
406
|
+
}
|
|
407
|
+
get transactionSubTotalExcludingPreviouslyCollected() {
|
|
408
|
+
return this._transactionSubTotalExcludingPreviouslyCollected;
|
|
409
|
+
}
|
|
410
|
+
get transactionTotalSavingsExcludingPreviouslyCollected() {
|
|
411
|
+
return this._transactionTotalSavingsExcludingPreviouslyCollected;
|
|
412
|
+
}
|
|
413
|
+
get transactionTotalTaxExcludingPreviouslyCollected() {
|
|
414
|
+
return this._transactionTotalTaxExcludingPreviouslyCollected;
|
|
415
|
+
}
|
|
416
|
+
get saleTotalQuantity() {
|
|
417
|
+
return this._saleTotalQuantity;
|
|
418
|
+
}
|
|
419
|
+
get returnTotalQuantity() {
|
|
420
|
+
return this._returnTotalQuantity;
|
|
421
|
+
}
|
|
422
|
+
get transactionTotalsBeforeVoid() {
|
|
423
|
+
return this._totalsBeforeVoid;
|
|
424
|
+
}
|
|
425
|
+
get customer() {
|
|
426
|
+
return this._customer;
|
|
427
|
+
}
|
|
428
|
+
get taxCustomer() {
|
|
429
|
+
return this._taxCustomer;
|
|
430
|
+
}
|
|
431
|
+
get transactionTradeType() {
|
|
432
|
+
return this._transactionTradeType;
|
|
433
|
+
}
|
|
434
|
+
get employeeCustomer() {
|
|
435
|
+
return this._employeeCustomer;
|
|
436
|
+
}
|
|
437
|
+
get referenceNumber() {
|
|
438
|
+
if (super.isOpen() && this._referenceNumber === undefined) {
|
|
439
|
+
this.generateTransactionReferenceNumber(this);
|
|
440
|
+
}
|
|
441
|
+
return this._referenceNumber;
|
|
442
|
+
}
|
|
443
|
+
get unusedCoupons() {
|
|
444
|
+
return this._unusedCoupons;
|
|
445
|
+
}
|
|
446
|
+
get governmentIssuedIds() {
|
|
447
|
+
return this._governmentIssuedIds;
|
|
448
|
+
}
|
|
449
|
+
get invoiceNumber() {
|
|
450
|
+
return this._invoiceNumber;
|
|
451
|
+
}
|
|
452
|
+
get orderReferenceNumber() {
|
|
453
|
+
return this._order ? this._order.orderReferenceId : "";
|
|
454
|
+
}
|
|
455
|
+
get invoiceSequenceNumber() {
|
|
456
|
+
return this._invoiceSequenceNumber;
|
|
457
|
+
}
|
|
458
|
+
get invoiceSequenceNumberGenerator() {
|
|
459
|
+
return this._invoiceSequenceNumberGenerator;
|
|
460
|
+
}
|
|
461
|
+
get orderReferenceSequenceNumber() {
|
|
462
|
+
return this._orderReferenceSequenceNumber;
|
|
463
|
+
}
|
|
464
|
+
get orderReferenceSequenceNumberGenerator() {
|
|
465
|
+
return this._orderReferenceSequenceNumberGenerator;
|
|
466
|
+
}
|
|
467
|
+
get transactionTaxExemptAmount() {
|
|
468
|
+
return this._transactionTaxExemptAmount;
|
|
469
|
+
}
|
|
470
|
+
get transactionTaxAdjustmentAmount() {
|
|
471
|
+
return this._transactionTaxAdjustmentAmount;
|
|
472
|
+
}
|
|
473
|
+
get tradeType() {
|
|
474
|
+
return this._tradeType;
|
|
475
|
+
}
|
|
476
|
+
get taxLotteryNumber() {
|
|
477
|
+
return this._taxLotteryNumber;
|
|
478
|
+
}
|
|
479
|
+
get taxLotteryCustomerCode() {
|
|
480
|
+
return this._taxLotteryCustomerCode;
|
|
481
|
+
}
|
|
482
|
+
get taxScanCodeData() {
|
|
483
|
+
return this._taxScanCodeData;
|
|
484
|
+
}
|
|
485
|
+
get signatureCollected() {
|
|
486
|
+
return this.findSignatureLine();
|
|
487
|
+
}
|
|
488
|
+
get itemPickupSignatureCollected() {
|
|
489
|
+
return this.findItemPickupSignatureLine();
|
|
490
|
+
}
|
|
491
|
+
get isPickingUpItems() {
|
|
492
|
+
return this.findItemPickupLine();
|
|
493
|
+
}
|
|
494
|
+
get denominationRounding() {
|
|
495
|
+
return this._denominationRounding;
|
|
496
|
+
}
|
|
497
|
+
get order() {
|
|
498
|
+
return this._order;
|
|
499
|
+
}
|
|
500
|
+
get prepaidTendersToApply() {
|
|
501
|
+
return _.cloneDeep(this._prepaidTendersToApply);
|
|
502
|
+
}
|
|
503
|
+
get inventoryReservationStatus() {
|
|
504
|
+
return this.isPartialReserve()
|
|
505
|
+
? scp_types_commerce_transaction_1.MerchandiseTransactionReservationStatus.PartiallyReserved
|
|
506
|
+
: scp_types_commerce_transaction_1.MerchandiseTransactionReservationStatus.FullyReserved;
|
|
507
|
+
}
|
|
508
|
+
get fiscalSignature() {
|
|
509
|
+
return this._fiscalSignature;
|
|
510
|
+
}
|
|
511
|
+
get requiresVoid() {
|
|
512
|
+
return this._requiresVoid;
|
|
513
|
+
}
|
|
514
|
+
get fiscalTransactionNumber() {
|
|
515
|
+
return this._fiscalTransactionNumber;
|
|
516
|
+
}
|
|
517
|
+
get fiscalTypeCode() {
|
|
518
|
+
return this._fiscalTypeCode;
|
|
519
|
+
}
|
|
520
|
+
get fiscalTransactionSequenceNumber() {
|
|
521
|
+
return this._fiscalTransactionSequenceNumber;
|
|
522
|
+
}
|
|
523
|
+
get fiscalTransactionSequenceNumberGenerator() {
|
|
524
|
+
return this._fiscalTransactionSequenceNumberGenerator;
|
|
525
|
+
}
|
|
526
|
+
get invoiceFiscalTransactionNumber() {
|
|
527
|
+
return this._invoiceFiscalTransactionNumber;
|
|
528
|
+
}
|
|
529
|
+
get invoiceTransactionNumber() {
|
|
530
|
+
return this._invoiceTransactionNumber;
|
|
531
|
+
}
|
|
532
|
+
get eInvoiceReference() {
|
|
533
|
+
return this._eInvoiceReference;
|
|
534
|
+
}
|
|
535
|
+
get digestValue() {
|
|
536
|
+
return this._digestValue;
|
|
537
|
+
}
|
|
538
|
+
updateUnusedCoupons(unusedCoupons) {
|
|
539
|
+
const newTransaction = this.clone();
|
|
540
|
+
newTransaction._unusedCoupons = unusedCoupons;
|
|
541
|
+
return newTransaction;
|
|
542
|
+
}
|
|
543
|
+
updateGovernmentIssuedIds(governmentIssuedIds) {
|
|
544
|
+
const newTransaction = this.clone();
|
|
545
|
+
newTransaction._governmentIssuedIds = governmentIssuedIds;
|
|
546
|
+
return newTransaction;
|
|
547
|
+
}
|
|
548
|
+
assignCustomer(customer) {
|
|
549
|
+
const newTransaction = this.clone();
|
|
550
|
+
newTransaction._customer = customer;
|
|
551
|
+
return newTransaction;
|
|
552
|
+
}
|
|
553
|
+
assignTaxCustomer(taxCustomer) {
|
|
554
|
+
const newTransaction = this.clone();
|
|
555
|
+
newTransaction._taxCustomer = taxCustomer;
|
|
556
|
+
return newTransaction;
|
|
557
|
+
}
|
|
558
|
+
assignTradeType(transactionTradeType) {
|
|
559
|
+
const newTransaction = this.clone();
|
|
560
|
+
newTransaction._transactionTradeType = transactionTradeType;
|
|
561
|
+
return newTransaction;
|
|
562
|
+
}
|
|
563
|
+
removeCustomer() {
|
|
564
|
+
const newTransaction = this.clone();
|
|
565
|
+
newTransaction._customer = undefined;
|
|
566
|
+
return newTransaction;
|
|
567
|
+
}
|
|
568
|
+
updateGiftReceiptMode(giftReceiptMode) {
|
|
569
|
+
const newTransaction = this.clone();
|
|
570
|
+
newTransaction._giftReceiptMode = giftReceiptMode;
|
|
571
|
+
return newTransaction;
|
|
572
|
+
}
|
|
573
|
+
updateGiftReceipt(giftReceipt, giftReceiptMode) {
|
|
574
|
+
const newTransaction = this.clone();
|
|
575
|
+
newTransaction._giftReceipt = giftReceipt;
|
|
576
|
+
newTransaction._giftReceiptMode = giftReceiptMode;
|
|
577
|
+
return newTransaction;
|
|
578
|
+
}
|
|
579
|
+
get salesperson() {
|
|
580
|
+
return this._salesperson;
|
|
581
|
+
}
|
|
582
|
+
updateTransactionTotalsBeforeVoid(totalsBeforeVoid) {
|
|
583
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
584
|
+
const newTransaction = this.clone();
|
|
585
|
+
//make sure all the Money entries in totalsBeforeVoid are the correct type
|
|
586
|
+
if (totalsBeforeVoid) {
|
|
587
|
+
totalsBeforeVoid.transactionSubTotal = this.convertAmountToAccountingCurrency((_a = totalsBeforeVoid.transactionSubTotal) === null || _a === void 0 ? void 0 : _a.amount);
|
|
588
|
+
totalsBeforeVoid.transactionTotal = this.convertAmountToAccountingCurrency((_b = totalsBeforeVoid.transactionTotal) === null || _b === void 0 ? void 0 : _b.amount);
|
|
589
|
+
totalsBeforeVoid.transactionTotalFee = this.convertAmountToAccountingCurrency((_c = totalsBeforeVoid.transactionTotalFee) === null || _c === void 0 ? void 0 : _c.amount);
|
|
590
|
+
totalsBeforeVoid.transactionTotalDonations = this.convertAmountToAccountingCurrency((_d = totalsBeforeVoid.transactionTotalDonations) === null || _d === void 0 ? void 0 : _d.amount);
|
|
591
|
+
totalsBeforeVoid.transactionTotalSavings = this.convertAmountToAccountingCurrency((_e = totalsBeforeVoid.transactionTotalSavings) === null || _e === void 0 ? void 0 : _e.amount);
|
|
592
|
+
totalsBeforeVoid.transactionTotalTendered = this.convertAmountToAccountingCurrency((_f = totalsBeforeVoid.transactionTotalTendered) === null || _f === void 0 ? void 0 : _f.amount);
|
|
593
|
+
totalsBeforeVoid.transactionTotalTenderedExcludingPreviouslyCollected =
|
|
594
|
+
this.convertAmountToAccountingCurrency((_g = totalsBeforeVoid.transactionTotalTenderedExcludingPreviouslyCollected) === null || _g === void 0 ? void 0 : _g.amount);
|
|
595
|
+
totalsBeforeVoid.transactionTotalTransactionDiscounts = this.convertAmountToAccountingCurrency((_h = totalsBeforeVoid.transactionTotalTransactionDiscounts) === null || _h === void 0 ? void 0 : _h.amount);
|
|
596
|
+
totalsBeforeVoid.transactionTotalPreviouslyCollectedTenders = this.convertAmountToAccountingCurrency((_j = totalsBeforeVoid.transactionTotalPreviouslyCollectedTenders) === null || _j === void 0 ? void 0 : _j.amount);
|
|
597
|
+
totalsBeforeVoid.transactionTotalTenderedOnOrderCreate = this.convertAmountToAccountingCurrency((_k = totalsBeforeVoid.transactionTotalTenderedOnOrderCreate) === null || _k === void 0 ? void 0 : _k.amount);
|
|
598
|
+
totalsBeforeVoid.transactionSubTotalExcludingTax = this.convertAmountToAccountingCurrency((_l = totalsBeforeVoid.transactionSubTotalExcludingTax) === null || _l === void 0 ? void 0 : _l.amount);
|
|
599
|
+
totalsBeforeVoid.transactionSubTotalIncludingTax = this.convertAmountToAccountingCurrency((_m = totalsBeforeVoid.transactionSubTotalIncludingTax) === null || _m === void 0 ? void 0 : _m.amount);
|
|
600
|
+
totalsBeforeVoid.transactionSubTotalExcludingTransactionDiscounts =
|
|
601
|
+
this.convertAmountToAccountingCurrency((_o = totalsBeforeVoid.transactionSubTotalExcludingTransactionDiscounts) === null || _o === void 0 ? void 0 : _o.amount);
|
|
602
|
+
totalsBeforeVoid.transactionNonTaxableFee = this.convertAmountToAccountingCurrency((_p = totalsBeforeVoid.transactionNonTaxableFee) === null || _p === void 0 ? void 0 : _p.amount);
|
|
603
|
+
totalsBeforeVoid.transactionFeeExcludingTax = this.convertAmountToAccountingCurrency((_q = totalsBeforeVoid.transactionFeeExcludingTax) === null || _q === void 0 ? void 0 : _q.amount);
|
|
604
|
+
totalsBeforeVoid.transactionFeeTax = this.convertAmountToAccountingCurrency((_r = totalsBeforeVoid.transactionFeeTax) === null || _r === void 0 ? void 0 : _r.amount);
|
|
605
|
+
totalsBeforeVoid.transactionTotalDeliveryFee = this.convertAmountToAccountingCurrency((_s = totalsBeforeVoid.transactionTotalDeliveryFee) === null || _s === void 0 ? void 0 : _s.amount);
|
|
606
|
+
totalsBeforeVoid.transactionTotalBagFee = this.convertAmountToAccountingCurrency((_t = totalsBeforeVoid.transactionTotalBagFee) === null || _t === void 0 ? void 0 : _t.amount);
|
|
607
|
+
totalsBeforeVoid.transactionTotalPublicImprovementFee = this.convertAmountToAccountingCurrency((_u = totalsBeforeVoid.transactionTotalPublicImprovementFee) === null || _u === void 0 ? void 0 : _u.amount);
|
|
608
|
+
totalsBeforeVoid.transactionTotalCustomFeeByType = (_v = totalsBeforeVoid.transactionTotalCustomFeeByType) === null || _v === void 0 ? void 0 : _v.map((fee) => {
|
|
609
|
+
var _a;
|
|
610
|
+
return {
|
|
611
|
+
feeId: fee.feeId,
|
|
612
|
+
feeType: fee.feeType,
|
|
613
|
+
description: fee.description,
|
|
614
|
+
amount: this.convertAmountToAccountingCurrency((_a = fee.amount) === null || _a === void 0 ? void 0 : _a.amount),
|
|
615
|
+
};
|
|
616
|
+
});
|
|
617
|
+
totalsBeforeVoid.transactionTotalShippingFee = this.convertAmountToAccountingCurrency((_w = totalsBeforeVoid.transactionTotalShippingFee) === null || _w === void 0 ? void 0 : _w.amount);
|
|
618
|
+
totalsBeforeVoid.transactionTax = this.convertAmountToAccountingCurrency((_x = totalsBeforeVoid.transactionTax) === null || _x === void 0 ? void 0 : _x.amount);
|
|
619
|
+
totalsBeforeVoid.transactionTaxableAmount = this.convertAmountToAccountingCurrency((_y = totalsBeforeVoid.transactionTaxableAmount) === null || _y === void 0 ? void 0 : _y.amount);
|
|
620
|
+
totalsBeforeVoid.transactionTotalTendered = this.convertAmountToAccountingCurrency((_z = totalsBeforeVoid.transactionTotalTendered) === null || _z === void 0 ? void 0 : _z.amount);
|
|
621
|
+
totalsBeforeVoid.transactionTotalExcludingTax = this.convertAmountToAccountingCurrency((_0 = totalsBeforeVoid.transactionTotalExcludingTax) === null || _0 === void 0 ? void 0 : _0.amount);
|
|
622
|
+
}
|
|
623
|
+
newTransaction._totalsBeforeVoid = totalsBeforeVoid;
|
|
624
|
+
return newTransaction;
|
|
625
|
+
}
|
|
626
|
+
assignSalesperson(salesperson) {
|
|
627
|
+
const newTransaction = this.clone();
|
|
628
|
+
newTransaction._salesperson = salesperson;
|
|
629
|
+
return newTransaction;
|
|
630
|
+
}
|
|
631
|
+
removeSalesperson() {
|
|
632
|
+
const newTransaction = this.clone();
|
|
633
|
+
newTransaction._salesperson = undefined;
|
|
634
|
+
return newTransaction;
|
|
635
|
+
}
|
|
636
|
+
assignEmployeeCustomer(employeeCustomer) {
|
|
637
|
+
const newTransaction = this.clone();
|
|
638
|
+
newTransaction._employeeCustomer = employeeCustomer;
|
|
639
|
+
return newTransaction;
|
|
640
|
+
}
|
|
641
|
+
removeEmployeeCustomer() {
|
|
642
|
+
const newTransaction = this.clone();
|
|
643
|
+
newTransaction._employeeCustomer = undefined;
|
|
644
|
+
return newTransaction;
|
|
645
|
+
}
|
|
646
|
+
assignInvoiceNumber(invoiceNumber) {
|
|
647
|
+
const newTransaction = this.clone();
|
|
648
|
+
newTransaction._invoiceNumber = invoiceNumber;
|
|
649
|
+
return newTransaction;
|
|
650
|
+
}
|
|
651
|
+
assignInvoiceSequenceNumber(invoiceSequenceNumber, invoiceSequenceNumberGenerator) {
|
|
652
|
+
const newTransaction = this.clone();
|
|
653
|
+
newTransaction._invoiceSequenceNumber = invoiceSequenceNumber;
|
|
654
|
+
newTransaction._invoiceSequenceNumberGenerator = invoiceSequenceNumberGenerator;
|
|
655
|
+
return newTransaction;
|
|
656
|
+
}
|
|
657
|
+
assignFiscalTransactionNumber(fiscalTransactionNumber) {
|
|
658
|
+
const newTransaction = this.clone();
|
|
659
|
+
newTransaction._fiscalTransactionNumber = fiscalTransactionNumber;
|
|
660
|
+
return newTransaction;
|
|
661
|
+
}
|
|
662
|
+
assignFiscalTypeCode(fiscalTypeCode) {
|
|
663
|
+
const newTransaction = this.clone();
|
|
664
|
+
newTransaction._fiscalTypeCode = fiscalTypeCode;
|
|
665
|
+
return newTransaction;
|
|
666
|
+
}
|
|
667
|
+
assignFiscalTransactionSequenceNumber(fiscalTransactionSequenceNumber, fiscalTransactionSequenceNumberGenerator) {
|
|
668
|
+
const newTransaction = this.clone();
|
|
669
|
+
newTransaction._fiscalTransactionSequenceNumber = fiscalTransactionSequenceNumber;
|
|
670
|
+
newTransaction._fiscalTransactionSequenceNumberGenerator = fiscalTransactionSequenceNumberGenerator;
|
|
671
|
+
return newTransaction;
|
|
672
|
+
}
|
|
673
|
+
assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber, orderReferenceSequenceNumberGenerator) {
|
|
674
|
+
const newTransaction = this.clone();
|
|
675
|
+
newTransaction._orderReferenceSequenceNumber = orderReferenceSequenceNumber;
|
|
676
|
+
newTransaction._orderReferenceSequenceNumberGenerator = orderReferenceSequenceNumberGenerator;
|
|
677
|
+
return newTransaction;
|
|
678
|
+
}
|
|
679
|
+
assignInvoiceFiscalTransactionNumber(invoiceTransactionNumber, invoiceFiscalTransactionNumber) {
|
|
680
|
+
const newTransaction = this.clone();
|
|
681
|
+
newTransaction._invoiceFiscalTransactionNumber = invoiceFiscalTransactionNumber;
|
|
682
|
+
newTransaction._invoiceTransactionNumber = invoiceTransactionNumber;
|
|
683
|
+
return newTransaction;
|
|
684
|
+
}
|
|
685
|
+
assignTaxlotteryNumber(taxLotteryNumber) {
|
|
686
|
+
const newTransaction = this.clone();
|
|
687
|
+
newTransaction._taxLotteryNumber = taxLotteryNumber;
|
|
688
|
+
return newTransaction;
|
|
689
|
+
}
|
|
690
|
+
assignCustomerLotteryCode(taxLotteryCustomerCode) {
|
|
691
|
+
const newTransaction = this.clone();
|
|
692
|
+
newTransaction._taxLotteryCustomerCode = taxLotteryCustomerCode;
|
|
693
|
+
return newTransaction;
|
|
694
|
+
}
|
|
695
|
+
removeCustomerLotteryCode() {
|
|
696
|
+
const newTransaction = this.clone();
|
|
697
|
+
newTransaction._taxLotteryCustomerCode = undefined;
|
|
698
|
+
return newTransaction;
|
|
699
|
+
}
|
|
700
|
+
assignTaxScanCodeData(taxScanCodeData) {
|
|
701
|
+
const newTransaction = this.clone();
|
|
702
|
+
newTransaction._taxScanCodeData = taxScanCodeData;
|
|
703
|
+
return newTransaction;
|
|
704
|
+
}
|
|
705
|
+
assignFiscalSignature(signatureData) {
|
|
706
|
+
const newTransaction = this.clone();
|
|
707
|
+
newTransaction._fiscalSignature = signatureData;
|
|
708
|
+
return newTransaction;
|
|
709
|
+
}
|
|
710
|
+
assignDigestValue(digestValue) {
|
|
711
|
+
const newTransaction = this.clone();
|
|
712
|
+
newTransaction._digestValue = digestValue;
|
|
713
|
+
return newTransaction;
|
|
714
|
+
}
|
|
715
|
+
assignEInvoiceReference(eInvoiceReference) {
|
|
716
|
+
const newTransaction = this.clone();
|
|
717
|
+
newTransaction._eInvoiceReference = eInvoiceReference;
|
|
718
|
+
return newTransaction;
|
|
719
|
+
}
|
|
720
|
+
setFatalVoidableError() {
|
|
721
|
+
const newTransaction = this.clone();
|
|
722
|
+
newTransaction._requiresVoid = true;
|
|
723
|
+
return newTransaction;
|
|
724
|
+
}
|
|
725
|
+
get shouldUpdatePricing() {
|
|
726
|
+
return this._shouldUpdatePricing;
|
|
727
|
+
}
|
|
728
|
+
get shouldUpdateTaxation() {
|
|
729
|
+
return this._shouldUpdateTaxation;
|
|
730
|
+
}
|
|
731
|
+
get giftReceiptMode() {
|
|
732
|
+
return this._giftReceiptMode;
|
|
733
|
+
}
|
|
734
|
+
get giftReceipt() {
|
|
735
|
+
return this._giftReceipt;
|
|
736
|
+
}
|
|
737
|
+
// Calculated totals
|
|
738
|
+
get transactionTotal() {
|
|
739
|
+
return this.getTransactionTotal(this.transactionTax, this.transactionSubTotal);
|
|
740
|
+
}
|
|
741
|
+
get transactionTotalExcludingPreviouslyCollected() {
|
|
742
|
+
return this.getTransactionTotal(this.transactionTotalTaxExcludingPreviouslyCollected, this.transactionSubTotalExcludingPreviouslyCollected);
|
|
743
|
+
}
|
|
744
|
+
get transactionBalanceDue() {
|
|
745
|
+
return this.getTransactionBalanceDue(this.transactionTotal, this.transactionTotalTendered, true);
|
|
746
|
+
}
|
|
747
|
+
get transactionBalanceDueExcludingPreviouslyCollected() {
|
|
748
|
+
return this.getTransactionBalanceDue(this.transactionTotalExcludingPreviouslyCollected, this.transactionTotalTenderedExcludingPreviouslyCollected, true);
|
|
749
|
+
}
|
|
750
|
+
get transactionChangeDue() {
|
|
751
|
+
const transactionChangeDue = this.transactionTotalTendered
|
|
752
|
+
.plus(this.denominationRounding)
|
|
753
|
+
.minus(this.transactionTotal);
|
|
754
|
+
if (transactionChangeDue.isPositive() && this.transactionTotal.isPositive()) {
|
|
755
|
+
return transactionChangeDue;
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
return new scp_component_business_core_1.Money(0, this._accountingCurrency);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
get returnTotal() {
|
|
762
|
+
const transactionTax = this.transactionTaxes && _.first(this.transactionTaxes);
|
|
763
|
+
const taxAuthority = transactionTax && transactionTax.taxAuthorities && _.first(transactionTax.taxAuthorities);
|
|
764
|
+
if (taxAuthority &&
|
|
765
|
+
taxAuthority.taxByRule &&
|
|
766
|
+
taxAuthority.taxByRule.find((rule) => rule.taxIncludedInPrice)) {
|
|
767
|
+
// For VAT taxes, tax is already included in subtotal
|
|
768
|
+
let returnSubTotal = this.returnSubTotal;
|
|
769
|
+
if (this.transactionTaxExemptAmount) {
|
|
770
|
+
returnSubTotal = returnSubTotal.minus(this.transactionTaxExemptAmount);
|
|
771
|
+
}
|
|
772
|
+
if (this.transactionTaxAdjustmentAmount) {
|
|
773
|
+
returnSubTotal = returnSubTotal.minus(this.transactionTaxAdjustmentAmount);
|
|
774
|
+
}
|
|
775
|
+
return returnSubTotal;
|
|
776
|
+
}
|
|
777
|
+
return this.returnSubTotal.plus(this.returnTax);
|
|
778
|
+
}
|
|
779
|
+
// End of totals
|
|
780
|
+
get transactionStateValues() {
|
|
781
|
+
return new Map([
|
|
782
|
+
...super.transactionStateValues.entries(),
|
|
783
|
+
["transaction.referenceNumber", this._referenceNumber],
|
|
784
|
+
["transaction.accountingCurrency", this._accountingCurrency],
|
|
785
|
+
["transaction.deliveryFee", this._transactionTotalDeliveryFee],
|
|
786
|
+
["transaction.bagFee", this._transactionTotalBagFee],
|
|
787
|
+
["transaction.publicImprovementFee", this._transactionTotalPublicImprovementFee],
|
|
788
|
+
["transaction.customFeeByType", this._transactionTotalCustomFeeByType],
|
|
789
|
+
["transaction.shippingFee", this._transactionTotalShippingFee],
|
|
790
|
+
["transaction.subTotal", this._transactionSubTotal],
|
|
791
|
+
["transaction.transactionSubTotalAfterTaxAdjustment", this._transactionSubTotalAfterTaxAdjustment],
|
|
792
|
+
["transaction.subTotalExcludingTax", this._transactionSubTotalExcludingTax],
|
|
793
|
+
["transaction.subTotalIncludingTax", this._transactionSubTotalIncludingTax],
|
|
794
|
+
["transaction.orderGrandTotal", this._transactionOrderGrandTotal],
|
|
795
|
+
["transaction.tax", this._transactionTax],
|
|
796
|
+
["transaction.taxableAmount", this._transactionTaxableAmount],
|
|
797
|
+
["transaction.taxes", this._transactionTaxes],
|
|
798
|
+
["transaction.total", this.transactionTotal],
|
|
799
|
+
["transaction.totalSavings", this.transactionTotalSavings],
|
|
800
|
+
["transaction.transactionTotalTransactionDiscounts", this.transactionTotalTransactionDiscounts],
|
|
801
|
+
["transaction.totalTendered", this.transactionTotalTendered],
|
|
802
|
+
[
|
|
803
|
+
"transaction.totalTenderedExcludingPreviouslyCollected",
|
|
804
|
+
this.transactionTotalTenderedExcludingPreviouslyCollected,
|
|
805
|
+
],
|
|
806
|
+
["transaction.totalPreviouslyCollectedTenders", this.transactionTotalPreviouslyCollectedTenders],
|
|
807
|
+
["transaction.totalTenderedOnOrderCreate", this.transactionTotalTenderedOnOrderCreate],
|
|
808
|
+
["transaction.totalChangeTendered", this.transactionTotalChangeTendered],
|
|
809
|
+
["transaction.nonTaxableFee", this.transactionNonTaxableFee],
|
|
810
|
+
["transaction.donation", this.transactionTotalDonations],
|
|
811
|
+
["transaction.feeExcludingTax", this.transactionFeeExcludingTax],
|
|
812
|
+
["transaction.feeTax", this.transactionFeeTax],
|
|
813
|
+
["transaction.totalFee", this.transactionTotalFee],
|
|
814
|
+
["transaction.transactionTotalFeeAfterTaxAdjustment", this._transactionTotalFeeAfterTaxAdjustment],
|
|
815
|
+
["transaction.returnSubTotal", this._returnSubTotal],
|
|
816
|
+
["transaction.returnSubTotalExcludingTax", this._returnSubTotalExcludingTax],
|
|
817
|
+
["transaction.returnSubTotalIncludingTax", this._returnSubTotalIncludingTax],
|
|
818
|
+
["transaction.returnTax", this._returnTax],
|
|
819
|
+
["transaction.returnTotalSavings", this.returnTotalSavings],
|
|
820
|
+
["transaction.returnTotal", this.returnTotal],
|
|
821
|
+
["transaction.saleTotalQuantity", this.saleTotalQuantity],
|
|
822
|
+
["transaction.returnTotalQuantity", this.returnTotalQuantity],
|
|
823
|
+
["transaction.balanceDue", this.transactionBalanceDue],
|
|
824
|
+
["transaction.changeDue", this.transactionChangeDue],
|
|
825
|
+
["transaction.customer", this._customer],
|
|
826
|
+
["transaction.taxCustomer", this._taxCustomer],
|
|
827
|
+
["transaction.transactionTradeType", this._transactionTradeType],
|
|
828
|
+
["transaction.giftReceipt", this.giftReceipt],
|
|
829
|
+
["transaction.giftReceiptMode", this.giftReceiptMode],
|
|
830
|
+
["transaction.salesperson", this._salesperson],
|
|
831
|
+
["transaction.totalsBeforeVoid", this._totalsBeforeVoid],
|
|
832
|
+
["transaction.unusedCoupons", this._unusedCoupons],
|
|
833
|
+
["transaction.transactionLevelSavings", this._transactionLevelSavings],
|
|
834
|
+
[
|
|
835
|
+
"transaction.subTotalExcludingTransactionDiscounts",
|
|
836
|
+
this._transactionSubTotalExcludingTransactionDiscounts,
|
|
837
|
+
],
|
|
838
|
+
["transaction.employeeCustomer", this._employeeCustomer],
|
|
839
|
+
["transaction.invoiceNumber", this._invoiceNumber],
|
|
840
|
+
["transaction.taxExemptAmount", this._transactionTaxExemptAmount],
|
|
841
|
+
["transaction.transactionTaxAdjustmentAmount", this._transactionTaxAdjustmentAmount],
|
|
842
|
+
["transaction.tradeType", this._tradeType],
|
|
843
|
+
["transaction.signatureCollected", this.signatureCollected],
|
|
844
|
+
["transaction.itemPickupSignatureCollected", this.itemPickupSignatureCollected],
|
|
845
|
+
["transaction.isPickingUpItems", this.isPickingUpItems],
|
|
846
|
+
["transaction.taxLotteryNumber", this._taxLotteryNumber],
|
|
847
|
+
["transaction.denominationRounding", this.denominationRounding],
|
|
848
|
+
["transaction.order", this._order],
|
|
849
|
+
["transaction.taxLotteryCustomerCode", this._taxLotteryCustomerCode],
|
|
850
|
+
["transaction.taxScanCodeData", this._taxScanCodeData],
|
|
851
|
+
["transaction.inventoryReservationStatus", this.inventoryReservationStatus],
|
|
852
|
+
["transaction.requiresVoid", this.requiresVoid],
|
|
853
|
+
["transaction.prepaidTendersToApply", _.cloneDeep(this._prepaidTendersToApply)],
|
|
854
|
+
[
|
|
855
|
+
"transaction.transactionSubTotalExcludingPreviouslyCollected",
|
|
856
|
+
this._transactionSubTotalExcludingPreviouslyCollected,
|
|
857
|
+
],
|
|
858
|
+
[
|
|
859
|
+
"transaction.transactionTotalSavingsExcludingPreviouslyCollected",
|
|
860
|
+
this._transactionTotalSavingsExcludingPreviouslyCollected,
|
|
861
|
+
],
|
|
862
|
+
[
|
|
863
|
+
"transaction.transactionTotalTaxExcludingPreviouslyCollected",
|
|
864
|
+
this._transactionTotalTaxExcludingPreviouslyCollected,
|
|
865
|
+
],
|
|
866
|
+
[
|
|
867
|
+
"transaction.balanceDueExcludingPreviouslyCollected",
|
|
868
|
+
this.transactionBalanceDueExcludingPreviouslyCollected,
|
|
869
|
+
],
|
|
870
|
+
[
|
|
871
|
+
"transaction.transactionTotalExcludingPreviouslyCollected",
|
|
872
|
+
this.transactionTotalExcludingPreviouslyCollected,
|
|
873
|
+
],
|
|
874
|
+
["transaction.totalTenderedPreviouslyCollected", this.transactionTotalTenderedPreviouslyCollected],
|
|
875
|
+
[
|
|
876
|
+
"transaction.transactionSubTotalExcludingPreviouslyCollectedExcludingTax",
|
|
877
|
+
this.transactionSubTotalExcludingPreviouslyCollectedExcludingTax,
|
|
878
|
+
],
|
|
879
|
+
["transaction.transactionTaxAdjustmentAmount", this.transactionTaxAdjustmentAmount],
|
|
880
|
+
]);
|
|
881
|
+
}
|
|
882
|
+
//Any new property needs to added here as well.
|
|
883
|
+
//Overridden toJSON to ensure that circular reference does not fail the transaction
|
|
884
|
+
//when storing in local memory and loading back as json object
|
|
885
|
+
toJSON() {
|
|
886
|
+
return {
|
|
887
|
+
_transactionId: super.transactionId,
|
|
888
|
+
_deviceIdentity: super.deviceIdentity,
|
|
889
|
+
_businessDayDate: super.businessDayDate,
|
|
890
|
+
_transactionNumber: super.transactionNumber,
|
|
891
|
+
_transactionType: super.transactionType,
|
|
892
|
+
_performingUser: super.performingUser,
|
|
893
|
+
_startDateTime: super.startDateTime,
|
|
894
|
+
_endDateTime: super.endDateTime,
|
|
895
|
+
_timezoneOffsetInMinutes: super.timezoneOffsetInMinutes,
|
|
896
|
+
_lines: super.lines,
|
|
897
|
+
_state: super.state,
|
|
898
|
+
_voided: super.voided,
|
|
899
|
+
_closingState: super.closingState,
|
|
900
|
+
_resumeToken: super.resumeToken,
|
|
901
|
+
_cashDrawerKey: super.cashDrawerKey,
|
|
902
|
+
_cashDrawerInputSource: super.cashDrawerInputSource,
|
|
903
|
+
_taxFreeFormKey: super.taxFreeFormKey,
|
|
904
|
+
_taxFreeInvoiceNumber: super.taxFreeInvoiceNumber,
|
|
905
|
+
_taxFreeInvoiceSequenceNumber: super.taxFreeInvoiceSequenceNumber,
|
|
906
|
+
_taxFreeInvoiceSequenceNumberGenerator: super.taxFreeInvoiceSequenceNumberGenerator,
|
|
907
|
+
_taxFreeCreditNoteNumber: super.taxFreeCreditNoteNumber,
|
|
908
|
+
_taxFreeCreditNoteSequenceNumber: super.taxFreeCreditNoteSequenceNumber,
|
|
909
|
+
_taxFreeCreditNoteSequenceNumberGenerator: super.taxFreeCreditNoteSequenceNumberGenerator,
|
|
910
|
+
_tillKey: super.tillKey,
|
|
911
|
+
_accountingCurrency: this.accountingCurrency,
|
|
912
|
+
_transactionTotalDeliveryFee: this.transactionTotalDeliveryFee,
|
|
913
|
+
_transactionTotalBagFee: this._transactionTotalBagFee,
|
|
914
|
+
_transactionTotalPublicImprovementFee: this._transactionTotalPublicImprovementFee,
|
|
915
|
+
_transactionTotalCustomFeeByType: this._transactionTotalCustomFeeByType,
|
|
916
|
+
_transactionTotalShippingFee: this._transactionTotalShippingFee,
|
|
917
|
+
_transactionSubTotal: this.transactionSubTotal,
|
|
918
|
+
_transactionSubTotalExcludingTax: this.transactionSubTotalExcludingTax,
|
|
919
|
+
_transactionSubTotalIncludingTax: this.transactionSubTotalIncludingTax,
|
|
920
|
+
_transactionOrderGrandTotal: this.transactionOrderGrandTotal,
|
|
921
|
+
_transactionTax: this.transactionTax,
|
|
922
|
+
_transactionTaxableAmount: this.transactionTaxableAmount,
|
|
923
|
+
_transactionTaxes: this.transactionTaxes,
|
|
924
|
+
_transactionTotalSavings: this.transactionTotalSavings,
|
|
925
|
+
_transactionTotalTransactionDiscounts: this.transactionTotalTransactionDiscounts,
|
|
926
|
+
_transactionTotalTendered: this.transactionTotalTendered,
|
|
927
|
+
_transactionTotalTenderedPreviouslyCollected: this.transactionTotalTenderedPreviouslyCollected,
|
|
928
|
+
_transactionTotalTenderedExcludingPreviouslyCollected: this.transactionTotalTenderedExcludingPreviouslyCollected,
|
|
929
|
+
_transactionTotalPreviouslyCollectedTenders: this.transactionTotalPreviouslyCollectedTenders,
|
|
930
|
+
_transactionTotalTenderedOnOrderCreate: this.transactionTotalTenderedOnOrderCreate,
|
|
931
|
+
_transactionTotalChangeTendered: this._transactionTotalChangeTendered,
|
|
932
|
+
_transactionNonTaxableFee: this.transactionNonTaxableFee,
|
|
933
|
+
_transactionTotalDonations: this.transactionTotalDonations,
|
|
934
|
+
_transactionFeeExcludingTax: this.transactionFeeExcludingTax,
|
|
935
|
+
_transactionFeeTax: this.transactionFeeTax,
|
|
936
|
+
_transactionTotalFee: this.transactionTotalFee,
|
|
937
|
+
_returnSubTotal: this.returnSubTotal,
|
|
938
|
+
_returnSubTotalExcludingTax: this.returnSubTotalExcludingTax,
|
|
939
|
+
_returnSubTotalIncludingTax: this.returnSubTotalIncludingTax,
|
|
940
|
+
_returnTax: this.returnTax,
|
|
941
|
+
_returnTotalSavings: this.returnTotalSavings,
|
|
942
|
+
_saleTotalQuantity: this.saleTotalQuantity,
|
|
943
|
+
_returnTotalQuantity: this.returnTotalQuantity,
|
|
944
|
+
_customer: this.customer,
|
|
945
|
+
_taxCustomer: this.taxCustomer,
|
|
946
|
+
_transactionTradeType: this.transactionTradeType,
|
|
947
|
+
_shouldUpdatePricing: this.shouldUpdatePricing,
|
|
948
|
+
_shouldUpdateTaxation: this.shouldUpdateTaxation,
|
|
949
|
+
_referenceNumber: this.referenceNumber,
|
|
950
|
+
_giftReceiptMode: this.giftReceiptMode,
|
|
951
|
+
_giftReceipt: this.giftReceipt,
|
|
952
|
+
_salesperson: this.salesperson,
|
|
953
|
+
_totalsBeforeVoid: this.transactionTotalsBeforeVoid,
|
|
954
|
+
_unusedCoupons: this.unusedCoupons,
|
|
955
|
+
_transactionSubTotalExcludingTransactionDiscounts: this.transactionSubTotalExcludingTransactionDiscounts,
|
|
956
|
+
_transactionLevelSavings: this.transactionLevelSavings,
|
|
957
|
+
_governmentIssuedIds: this._governmentIssuedIds,
|
|
958
|
+
_employeeCustomer: this._employeeCustomer,
|
|
959
|
+
_invoiceNumber: this._invoiceNumber,
|
|
960
|
+
_invoiceSequenceNumber: this._invoiceSequenceNumber,
|
|
961
|
+
_invoiceSequenceNumberGenerator: this._invoiceSequenceNumberGenerator,
|
|
962
|
+
_transactionTaxExemptAmount: this._transactionTaxExemptAmount,
|
|
963
|
+
_transactionTaxAdjustmentAmount: this._transactionTaxAdjustmentAmount,
|
|
964
|
+
_transactionSubTotalAfterTaxAdjustment: this._transactionSubTotalAfterTaxAdjustment,
|
|
965
|
+
_transactionTotalFeeAfterTaxAdjustment: this._transactionTotalFeeAfterTaxAdjustment,
|
|
966
|
+
_tradeType: this._tradeType,
|
|
967
|
+
_taxLotteryNumber: this._taxLotteryNumber,
|
|
968
|
+
_denominationRounding: this._denominationRounding,
|
|
969
|
+
_order: this.order,
|
|
970
|
+
_orderReferenceSequenceNumber: this._orderReferenceSequenceNumber,
|
|
971
|
+
_orderReferenceSequenceNumberGenerator: this._orderReferenceSequenceNumberGenerator,
|
|
972
|
+
_taxLotteryCustomerCode: this._taxLotteryCustomerCode,
|
|
973
|
+
_taxScanCodeData: this._taxScanCodeData,
|
|
974
|
+
_fiscalSignature: this.fiscalSignature,
|
|
975
|
+
_requiresVoid: this._requiresVoid,
|
|
976
|
+
_fiscalTransactionNumber: this._fiscalTransactionNumber,
|
|
977
|
+
_fiscalTypeCode: this._fiscalTypeCode,
|
|
978
|
+
_fiscalTransactionSequenceNumber: this._fiscalTransactionSequenceNumber,
|
|
979
|
+
_fiscalTransactionSequenceNumberGenerator: this._fiscalTransactionSequenceNumberGenerator,
|
|
980
|
+
_invoiceFiscalTransactionNumber: this._invoiceFiscalTransactionNumber,
|
|
981
|
+
_invoiceTransactionNumber: this._invoiceTransactionNumber,
|
|
982
|
+
_eInvoiceReference: this._eInvoiceReference,
|
|
983
|
+
_digestValue: this._digestValue,
|
|
984
|
+
_prepaidTendersToApply: this.prepaidTendersToApply,
|
|
985
|
+
_transactionSubTotalExcludingPreviouslyCollected: this.transactionSubTotalExcludingPreviouslyCollected,
|
|
986
|
+
_transactionTotalSavingsExcludingPreviouslyCollected: this.transactionTotalSavingsExcludingPreviouslyCollected,
|
|
987
|
+
_transactionTotalTaxExcludingPreviouslyCollected: this.transactionTotalTaxExcludingPreviouslyCollected,
|
|
988
|
+
_balanceDueExcludingPreviouslyCollected: this.transactionBalanceDueExcludingPreviouslyCollected,
|
|
989
|
+
_transactionTotalExcludingPreviouslyCollected: this.transactionTotalExcludingPreviouslyCollected,
|
|
990
|
+
_transactionSubTotalExcludingPreviouslyCollectedExcludingTax: this.transactionSubTotalExcludingPreviouslyCollectedExcludingTax,
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
newTransaction() {
|
|
994
|
+
return new MerchandiseTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this._accountingCurrency, this._transactionReferenceFormatter, this._governmentIssuedIds, this.performingUser, this.transactionId, undefined, undefined, undefined, undefined, this._employeeCustomer, this._invoiceNumber, this._invoiceSequenceNumber, this._taxLotteryNumber, this.order, this._invoiceSequenceNumberGenerator, this._taxLotteryCustomerCode, this.taxScanCodeData, this._fiscalSignature, this._requiresVoid, this._eInvoiceReference, this.prepaidTendersToApply, this._digestValue);
|
|
995
|
+
}
|
|
996
|
+
// eslint-disable-next-line complexity
|
|
997
|
+
loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
|
|
998
|
+
super.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
|
|
999
|
+
this._transactionTotalDeliveryFee =
|
|
1000
|
+
transactionJsonObj._transactionTotalDeliveryFee &&
|
|
1001
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalDeliveryFee);
|
|
1002
|
+
this._transactionTotalBagFee =
|
|
1003
|
+
transactionJsonObj._transactionTotalBagFee && new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalBagFee);
|
|
1004
|
+
this._transactionTotalPublicImprovementFee =
|
|
1005
|
+
transactionJsonObj._transactionTotalPublicImprovementFee &&
|
|
1006
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalPublicImprovementFee);
|
|
1007
|
+
this._transactionTotalCustomFeeByType = transactionJsonObj._transactionTotalCustomFeeByType;
|
|
1008
|
+
this._transactionTotalShippingFee =
|
|
1009
|
+
transactionJsonObj._transactionTotalShippingFee &&
|
|
1010
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalShippingFee);
|
|
1011
|
+
this._transactionSubTotal =
|
|
1012
|
+
transactionJsonObj._transactionSubTotal && new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotal);
|
|
1013
|
+
this._transactionSubTotalAfterTaxAdjustment =
|
|
1014
|
+
transactionJsonObj._transactionSubTotalAfterTaxAdjustment &&
|
|
1015
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalAfterTaxAdjustment);
|
|
1016
|
+
this._transactionSubTotalExcludingTax =
|
|
1017
|
+
transactionJsonObj._transactionSubTotalExcludingTax &&
|
|
1018
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcludingTax);
|
|
1019
|
+
this._transactionSubTotalIncludingTax =
|
|
1020
|
+
transactionJsonObj._transactionSubTotalIncludingTax &&
|
|
1021
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalIncludingTax);
|
|
1022
|
+
this._transactionOrderGrandTotal =
|
|
1023
|
+
transactionJsonObj._transactionOrderGrandTotal &&
|
|
1024
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionOrderGrandTotal);
|
|
1025
|
+
this._transactionTax =
|
|
1026
|
+
transactionJsonObj._transactionTax && new scp_component_business_core_1.Money(transactionJsonObj._transactionTax);
|
|
1027
|
+
this._transactionTaxableAmount =
|
|
1028
|
+
transactionJsonObj._transactionTaxableAmount && new scp_component_business_core_1.Money(transactionJsonObj._transactionTaxableAmount);
|
|
1029
|
+
this._transactionTotalTransactionDiscounts =
|
|
1030
|
+
transactionJsonObj._transactionTotalTransactionDiscounts &&
|
|
1031
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTransactionDiscounts);
|
|
1032
|
+
this._transactionTaxes = transactionJsonObj._transactionTaxes;
|
|
1033
|
+
this._transactionTotalSavings =
|
|
1034
|
+
transactionJsonObj._transactionTotalSavings && new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalSavings);
|
|
1035
|
+
this._transactionTotalTendered =
|
|
1036
|
+
transactionJsonObj._transactionTotalTendered && new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTendered);
|
|
1037
|
+
this._transactionTotalTenderedPreviouslyCollected =
|
|
1038
|
+
transactionJsonObj._transactionTotalTenderedPreviouslyCollected &&
|
|
1039
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTenderedPreviouslyCollected);
|
|
1040
|
+
this._transactionTotalTenderedExcludingPreviouslyCollected =
|
|
1041
|
+
transactionJsonObj._transactionTotalTenderedExcludingPreviouslyCollected &&
|
|
1042
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTenderedExcludingPreviouslyCollected);
|
|
1043
|
+
this._transactionTotalPreviouslyCollectedTenders =
|
|
1044
|
+
transactionJsonObj._transactionTotalPreviouslyCollectedTenders &&
|
|
1045
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalPreviouslyCollectedTenders);
|
|
1046
|
+
this._transactionTotalTenderedOnOrderCreate =
|
|
1047
|
+
transactionJsonObj._transactionTotalTenderedOnOrderCreate &&
|
|
1048
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTenderedOnOrderCreate);
|
|
1049
|
+
this._transactionTotalChangeTendered =
|
|
1050
|
+
transactionJsonObj._transactionTotalChangeTendered &&
|
|
1051
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalChangeTendered);
|
|
1052
|
+
this._transactionNonTaxableFee =
|
|
1053
|
+
transactionJsonObj._transactionNonTaxableFee && new scp_component_business_core_1.Money(transactionJsonObj._transactionNonTaxableFee);
|
|
1054
|
+
this._transactionFeeExcludingTax =
|
|
1055
|
+
transactionJsonObj._transactionFeeExcludingTax &&
|
|
1056
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionFeeExcludingTax);
|
|
1057
|
+
this._transactionFeeTax =
|
|
1058
|
+
transactionJsonObj._transactionFeeTax && new scp_component_business_core_1.Money(transactionJsonObj._transactionFeeTax);
|
|
1059
|
+
this._transactionTotalFee =
|
|
1060
|
+
transactionJsonObj._transactionTotalFee && new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalFee);
|
|
1061
|
+
this._transactionTotalFeeAfterTaxAdjustment =
|
|
1062
|
+
transactionJsonObj._transactionTotalFeeAfterTaxAdjustment &&
|
|
1063
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalFeeAfterTaxAdjustment);
|
|
1064
|
+
this._transactionTotalDonations =
|
|
1065
|
+
transactionJsonObj._transactionTotalDonations &&
|
|
1066
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalDonations);
|
|
1067
|
+
this._returnSubTotal =
|
|
1068
|
+
transactionJsonObj._returnSubTotal && new scp_component_business_core_1.Money(transactionJsonObj._returnSubTotal);
|
|
1069
|
+
this._returnSubTotalExcludingTax =
|
|
1070
|
+
transactionJsonObj._returnSubTotalExcludingTax &&
|
|
1071
|
+
new scp_component_business_core_1.Money(transactionJsonObj._returnSubTotalExcludingTax);
|
|
1072
|
+
this._returnSubTotalIncludingTax =
|
|
1073
|
+
transactionJsonObj._returnSubTotalIncludingTax &&
|
|
1074
|
+
new scp_component_business_core_1.Money(transactionJsonObj._returnSubTotalIncludingTax);
|
|
1075
|
+
this._returnTax = transactionJsonObj._returnTax && new scp_component_business_core_1.Money(transactionJsonObj._returnTax);
|
|
1076
|
+
this._returnTotalSavings =
|
|
1077
|
+
transactionJsonObj._returnTotalSavings && new scp_component_business_core_1.Money(transactionJsonObj._returnTotalSavings);
|
|
1078
|
+
this._saleTotalQuantity = transactionJsonObj._saleTotalQuantity;
|
|
1079
|
+
this._returnTotalQuantity = transactionJsonObj._returnTotalQuantity;
|
|
1080
|
+
this._customer = Customer_1.Customer.createFromJsonObject(transactionJsonObj._customer);
|
|
1081
|
+
this._taxCustomer = TaxCustomerLine_1.TaxCustomerLine.createFromJsonObject(transactionJsonObj._taxCustomer);
|
|
1082
|
+
this._transactionTradeType = utils_1.getTradeType(transactionJsonObj);
|
|
1083
|
+
this._shouldUpdatePricing = transactionJsonObj._shouldUpdatePricing;
|
|
1084
|
+
this._shouldUpdateTaxation = transactionJsonObj._shouldUpdateTaxation;
|
|
1085
|
+
this._referenceNumber = transactionJsonObj._referenceNumber;
|
|
1086
|
+
this._giftReceiptMode = transactionJsonObj._giftReceiptMode;
|
|
1087
|
+
this._giftReceipt = transactionJsonObj._giftReceipt;
|
|
1088
|
+
this._salesperson = Employee_1.Employee.createFromJsonObject(transactionJsonObj._salesperson);
|
|
1089
|
+
this._unusedCoupons = transactionJsonObj._unusedCoupons;
|
|
1090
|
+
this._employeeCustomer = Employee_1.Employee.createFromJsonObject(transactionJsonObj._employeeCustomer);
|
|
1091
|
+
this._transactionSubTotalExcludingTransactionDiscounts =
|
|
1092
|
+
transactionJsonObj._transactionSubTotalExcludingTransactionDiscounts &&
|
|
1093
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcludingTransactionDiscounts);
|
|
1094
|
+
this._transactionLevelSavings =
|
|
1095
|
+
transactionJsonObj._transactionLevelSavings && new scp_component_business_core_1.Money(transactionJsonObj._transactionLevelSavings);
|
|
1096
|
+
this._governmentIssuedIds = transactionJsonObj._governmentIssuedIds;
|
|
1097
|
+
this._totalsBeforeVoid = this.getTotalsBeforeVoid(transactionJsonObj);
|
|
1098
|
+
this._invoiceNumber = transactionJsonObj._invoiceNumber;
|
|
1099
|
+
this._invoiceSequenceNumber = transactionJsonObj._invoiceSequenceNumber;
|
|
1100
|
+
this._transactionTaxExemptAmount = transactionJsonObj._transactionTaxExemptAmount
|
|
1101
|
+
? new scp_component_business_core_1.Money(transactionJsonObj._transactionTaxExemptAmount)
|
|
1102
|
+
: undefined;
|
|
1103
|
+
this._transactionTaxAdjustmentAmount = transactionJsonObj._transactionTaxAdjustmentAmount
|
|
1104
|
+
? new scp_component_business_core_1.Money(transactionJsonObj._transactionTaxAdjustmentAmount)
|
|
1105
|
+
: undefined;
|
|
1106
|
+
this._tradeType = findMerchandiseTransactionTradeType(transactionJsonObj._tradeType);
|
|
1107
|
+
this._taxLotteryNumber = transactionJsonObj._taxLotteryNumber;
|
|
1108
|
+
this._denominationRounding =
|
|
1109
|
+
transactionJsonObj._denominationRounding && new scp_component_business_core_1.Money(transactionJsonObj._denominationRounding);
|
|
1110
|
+
this._order = Order_1.Order.createFromJsonObject(transactionJsonObj._order);
|
|
1111
|
+
this._invoiceSequenceNumberGenerator = transactionJsonObj._invoiceSequenceNumberGenerator;
|
|
1112
|
+
this._orderReferenceSequenceNumber = transactionJsonObj._orderReferenceSequenceNumber;
|
|
1113
|
+
this._orderReferenceSequenceNumberGenerator = transactionJsonObj._orderReferenceSequenceNumberGenerator;
|
|
1114
|
+
this._taxLotteryCustomerCode = transactionJsonObj._taxLotteryCustomerCode;
|
|
1115
|
+
this._taxScanCodeData = transactionJsonObj._taxScanCodeData;
|
|
1116
|
+
this._fiscalSignature = transactionJsonObj._fiscalSignature;
|
|
1117
|
+
this._requiresVoid = transactionJsonObj._requiresVoid;
|
|
1118
|
+
this._fiscalTransactionNumber = transactionJsonObj._fiscalTransactionNumber;
|
|
1119
|
+
this._fiscalTypeCode = transactionJsonObj._fiscalTypeCode;
|
|
1120
|
+
this._fiscalTransactionSequenceNumber = transactionJsonObj._fiscalTransactionSequenceNumber;
|
|
1121
|
+
this._fiscalTransactionSequenceNumberGenerator =
|
|
1122
|
+
transactionJsonObj._fiscalTransactionSequenceNumberGenerator;
|
|
1123
|
+
this._invoiceFiscalTransactionNumber = transactionJsonObj._invoiceFiscalTransactionNumber;
|
|
1124
|
+
this._invoiceTransactionNumber = transactionJsonObj._invoiceTransactionNumber;
|
|
1125
|
+
this._eInvoiceReference = transactionJsonObj._eInvoiceReference;
|
|
1126
|
+
this._digestValue = transactionJsonObj._digestValue;
|
|
1127
|
+
this._prepaidTendersToApply = transactionJsonObj._prepaidTendersToApply;
|
|
1128
|
+
this._transactionSubTotalExcludingPreviouslyCollected =
|
|
1129
|
+
transactionJsonObj._transactionSubTotalExcludingPreviouslyCollected &&
|
|
1130
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcludingPreviouslyCollected);
|
|
1131
|
+
this._transactionTotalSavingsExcludingPreviouslyCollected =
|
|
1132
|
+
transactionJsonObj._transactionTotalSavingsExcludingPreviouslyCollected &&
|
|
1133
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalSavingsExcludingPreviouslyCollected);
|
|
1134
|
+
this._transactionTotalTaxExcludingPreviouslyCollected =
|
|
1135
|
+
transactionJsonObj._transactionTotalTaxExcludingPreviouslyCollected &&
|
|
1136
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalTaxExcludingPreviouslyCollected);
|
|
1137
|
+
this._balanceDueExcludingPreviouslyCollected =
|
|
1138
|
+
transactionJsonObj._balanceDueExcludingPreviouslyCollected &&
|
|
1139
|
+
new scp_component_business_core_1.Money(transactionJsonObj._balanceDueExcludingPreviouslyCollected);
|
|
1140
|
+
this._transactionTotalExcludingPreviouslyCollected =
|
|
1141
|
+
transactionJsonObj._transactionTotalExcludingPreviouslyCollected &&
|
|
1142
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalExcludingPreviouslyCollected);
|
|
1143
|
+
this._transactionSubTotalExcludingPreviouslyCollectedExcludingTax =
|
|
1144
|
+
transactionJsonObj._transactionSubTotalExcludingPreviouslyCollectedExcludingTax &&
|
|
1145
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcludingPreviouslyCollectedExcludingTax);
|
|
1146
|
+
}
|
|
1147
|
+
getTotalsBeforeVoid(transactionJsonObj) {
|
|
1148
|
+
return (transactionJsonObj._totalsBeforeVoid && {
|
|
1149
|
+
transactionTotalSavings: transactionJsonObj._totalsBeforeVoid.transactionTotalSavings &&
|
|
1150
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalSavings),
|
|
1151
|
+
transactionTotalTransactionDiscounts: transactionJsonObj._totalsBeforeVoid.transactionTotalTransactionDiscounts &&
|
|
1152
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalTransactionDiscounts),
|
|
1153
|
+
transactionSubTotal: transactionJsonObj._totalsBeforeVoid.transactionSubTotal &&
|
|
1154
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotal),
|
|
1155
|
+
transactionSubTotalExcludingTax: transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingTax &&
|
|
1156
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingTax),
|
|
1157
|
+
transactionSubTotalIncludingTax: transactionJsonObj._totalsBeforeVoid.transactionSubTotalIncludingTax &&
|
|
1158
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotalIncludingTax),
|
|
1159
|
+
transactionOrderGrandTotal: transactionJsonObj._totalsBeforeVoid.transactionOrderGrandTotal &&
|
|
1160
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionOrderGrandTotal),
|
|
1161
|
+
transactionTax: transactionJsonObj._totalsBeforeVoid.transactionTax &&
|
|
1162
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTax),
|
|
1163
|
+
transactionSubTotalExcludingTransactionDiscounts: transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingTransactionDiscounts &&
|
|
1164
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingTransactionDiscounts),
|
|
1165
|
+
transactionTotal: transactionJsonObj._totalsBeforeVoid.transactionTotal &&
|
|
1166
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotal),
|
|
1167
|
+
transactionTotalTendered: transactionJsonObj._totalsBeforeVoid.transactionTotalTendered &&
|
|
1168
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalTendered),
|
|
1169
|
+
transactionTotalTenderedExcludingPreviouslyCollected: transactionJsonObj._totalsBeforeVoid.transactionTotalTenderedExcludingPreviouslyCollected &&
|
|
1170
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalTenderedExcludingPreviouslyCollected),
|
|
1171
|
+
transactionTotalPreviouslyCollectedTenders: transactionJsonObj._totalsBeforeVoid.transactionTotalPreviouslyCollectedTenders &&
|
|
1172
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalPreviouslyCollectedTenders),
|
|
1173
|
+
transactionTotalTenderedOnOrderCreate: transactionJsonObj._totalsBeforeVoid.transactionTotalTenderedOnOrderCreate &&
|
|
1174
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalTenderedOnOrderCreate),
|
|
1175
|
+
transactionNonTaxableFee: transactionJsonObj._totalsBeforeVoid.transactionNonTaxableFee &&
|
|
1176
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionNonTaxableFee),
|
|
1177
|
+
transactionTotalDonations: transactionJsonObj._totalsBeforeVoid.transactionTotalDonations &&
|
|
1178
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalDonations),
|
|
1179
|
+
transactionFeeExcludingTax: transactionJsonObj._totalsBeforeVoid.transactionFeeExcludingTax &&
|
|
1180
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionFeeExcludingTax),
|
|
1181
|
+
transactionFeeTax: transactionJsonObj._totalsBeforeVoid.transactionFeeTax &&
|
|
1182
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionFeeTax),
|
|
1183
|
+
transactionTotalFee: transactionJsonObj._totalsBeforeVoid.transactionTotalFee &&
|
|
1184
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalFee),
|
|
1185
|
+
transactionTaxableAmount: transactionJsonObj._totalsBeforeVoid.transactionTaxableAmount &&
|
|
1186
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTaxableAmount),
|
|
1187
|
+
transactionTotalExcludingTax: transactionJsonObj._totalsBeforeVoid.transactionTotalExcludingTax &&
|
|
1188
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalExcludingTax),
|
|
1189
|
+
transactionTaxExemptAmount: transactionJsonObj._totalsBeforeVoid.transactionTaxExemptAmount &&
|
|
1190
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTaxExemptAmount),
|
|
1191
|
+
transactionTaxAdjustmentAmount: transactionJsonObj._totalsBeforeVoid.transactionTaxAdjustmentAmount &&
|
|
1192
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTaxAdjustmentAmount),
|
|
1193
|
+
transactionSubTotalAfterTaxAdjustment: transactionJsonObj._totalsBeforeVoid.transactionSubTotalAfterTaxAdjustment &&
|
|
1194
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotalAfterTaxAdjustment),
|
|
1195
|
+
transactionTotalFeeAfterTaxAdjustment: transactionJsonObj._totalsBeforeVoid.transactionTotalFeeAfterTaxAdjustment &&
|
|
1196
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalFeeAfterTaxAdjustment),
|
|
1197
|
+
transactionTotalDeliveryFee: transactionJsonObj._totalsBeforeVoid.transactionTotalDeliveryFee &&
|
|
1198
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalDeliveryFee),
|
|
1199
|
+
transactionTotalBagFee: transactionJsonObj._totalsBeforeVoid.transactionTotalBagFee &&
|
|
1200
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalBagFee),
|
|
1201
|
+
transactionTotalPublicImprovementFee: transactionJsonObj._totalsBeforeVoid.transactionTotalPublicImprovementFee &&
|
|
1202
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalPublicImprovementFee),
|
|
1203
|
+
transactionTotalCustomFeeByType: transactionJsonObj._totalsBeforeVoid.transactionTotalCustomFeeByType,
|
|
1204
|
+
transactionTotalShippingFee: transactionJsonObj._totalsBeforeVoid.transactionTotalShippingFee &&
|
|
1205
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionTotalShippingFee),
|
|
1206
|
+
transactionSubTotalExcludingPreviouslyCollectedExcludingTax: transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingPreviouslyCollectedExcludingTax &&
|
|
1207
|
+
new scp_component_business_core_1.Money(transactionJsonObj._totalsBeforeVoid.transactionSubTotalExcludingPreviouslyCollectedExcludingTax),
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
taxIncludedInPrice() {
|
|
1211
|
+
const transactionTax = this.transactionTaxes && _.first(this.transactionTaxes);
|
|
1212
|
+
const taxAuthority = transactionTax && transactionTax.taxAuthorities && _.first(transactionTax.taxAuthorities);
|
|
1213
|
+
if (taxAuthority &&
|
|
1214
|
+
taxAuthority.taxByRule &&
|
|
1215
|
+
taxAuthority.taxByRule.find((rule) => rule.taxIncludedInPrice)) {
|
|
1216
|
+
return true;
|
|
1217
|
+
}
|
|
1218
|
+
return false;
|
|
1219
|
+
}
|
|
1220
|
+
convertAmountToAccountingCurrency(amount) {
|
|
1221
|
+
if (amount === undefined || isNaN(+amount)) {
|
|
1222
|
+
return new scp_component_business_core_1.Money("0", this.accountingCurrency);
|
|
1223
|
+
}
|
|
1224
|
+
else {
|
|
1225
|
+
return new scp_component_business_core_1.Money(amount, this.accountingCurrency);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
getTransactionTotal(taxAmount, subTotalAmount) {
|
|
1229
|
+
let taxToAddToTotal = taxAmount;
|
|
1230
|
+
if (this.taxIncludedInPrice()) {
|
|
1231
|
+
taxToAddToTotal = new scp_component_business_core_1.Money("0", this._accountingCurrency);
|
|
1232
|
+
if (this.transactionTaxExemptAmount) {
|
|
1233
|
+
taxToAddToTotal = taxToAddToTotal.minus(this.transactionTaxExemptAmount);
|
|
1234
|
+
}
|
|
1235
|
+
if (this.transactionTaxAdjustmentAmount) {
|
|
1236
|
+
taxToAddToTotal = taxToAddToTotal.minus(this.transactionTaxAdjustmentAmount);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
return subTotalAmount
|
|
1240
|
+
.plus(taxToAddToTotal)
|
|
1241
|
+
.plus(this.transactionTotalFee)
|
|
1242
|
+
.plus(this.transactionTotalDonations);
|
|
1243
|
+
}
|
|
1244
|
+
getTransactionBalanceDue(totalAmount, totalTendered, removeTotalTendered) {
|
|
1245
|
+
let balanceDue = totalAmount;
|
|
1246
|
+
if (removeTotalTendered) {
|
|
1247
|
+
balanceDue = balanceDue.minus(totalTendered.plus(this.denominationRounding));
|
|
1248
|
+
}
|
|
1249
|
+
if ((totalAmount.isPositive() && balanceDue.isPositive()) ||
|
|
1250
|
+
(totalAmount.isNegative() && balanceDue.isNegative())) {
|
|
1251
|
+
return balanceDue;
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
return new scp_component_business_core_1.Money(0, this._accountingCurrency);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
generateTransactionReferenceNumber(transaction) {
|
|
1258
|
+
this._referenceNumber = this._transactionReferenceFormatter.generateTransactionReference(transaction);
|
|
1259
|
+
}
|
|
1260
|
+
findSignatureLine() {
|
|
1261
|
+
return !!this.lines.find((line) => line.lineType && line.lineType === scp_types_commerce_transaction_1.LineType.Signature);
|
|
1262
|
+
}
|
|
1263
|
+
findItemPickupSignatureLine() {
|
|
1264
|
+
return !!this.lines.find((line) => line.lineType && line.lineType === scp_types_commerce_transaction_1.LineType.ItemPickupSignature);
|
|
1265
|
+
}
|
|
1266
|
+
findItemPickupLine() {
|
|
1267
|
+
const hasFulfilledLines = !!this.lines.find((line) => line.lineType &&
|
|
1268
|
+
line.lineType === scp_types_commerce_transaction_1.LineType.ItemSale &&
|
|
1269
|
+
item_1.isItemPickupOrDeliveryLine(line) &&
|
|
1270
|
+
!line.voided);
|
|
1271
|
+
const hasItemFulfillmentLine = !!this.lines.find((line) => line.lineType && line.lineType === scp_types_commerce_transaction_1.LineType.ItemFulfillment);
|
|
1272
|
+
return !!hasFulfilledLines && !!hasItemFulfillmentLine;
|
|
1273
|
+
}
|
|
1274
|
+
isPartialReserve() {
|
|
1275
|
+
let partialReserve = false;
|
|
1276
|
+
super.lines.forEach((line) => {
|
|
1277
|
+
if (line instanceof item_1.ItemLineReserveInventoryDecorator) {
|
|
1278
|
+
if (!line.voided && line.quantity.amount !== line.reservedQuantity) {
|
|
1279
|
+
partialReserve = true;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
return partialReserve;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
exports.MerchandiseTransaction = MerchandiseTransaction;
|
|
1287
|
+
function findMerchandiseTransactionTradeType(state) {
|
|
1288
|
+
switch (state) {
|
|
1289
|
+
case "Sale":
|
|
1290
|
+
return scp_types_commerce_transaction_1.MerchandiseTransactionTradeType.Sale;
|
|
1291
|
+
case "Return":
|
|
1292
|
+
return scp_types_commerce_transaction_1.MerchandiseTransactionTradeType.Return;
|
|
1293
|
+
case "Exchange":
|
|
1294
|
+
return scp_types_commerce_transaction_1.MerchandiseTransactionTradeType.Exchange;
|
|
1295
|
+
default:
|
|
1296
|
+
return undefined;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
//# sourceMappingURL=MerchandiseTransaction.js.map
|