@pmcretail/mapper-library 0.0.39 → 0.0.43
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/README.md +24 -24
- package/esm2022/lib/RJ-mapper.class.mjs +875 -0
- package/esm2022/lib/TransactionDocumentBuilder.mjs +1240 -0
- package/esm2022/lib/WebReturn-mapper.class.mjs +324 -0
- package/esm2022/lib/WebReturnSalesforceMapper.class.mjs +410 -0
- package/esm2022/lib/basket.service.mjs +516 -0
- package/esm2022/lib/mapper-library.component.mjs +22 -0
- package/esm2022/lib/mapper-library.model.mjs +39 -0
- package/esm2022/lib/mapper-library.module.mjs +21 -0
- package/esm2022/lib/number-util.service.mjs +40 -0
- package/esm2022/pmcretail-mapper-library.mjs +5 -0
- package/esm2022/public-api.mjs +9 -0
- package/fesm2022/pmcretail-mapper-library.mjs +3482 -0
- package/fesm2022/pmcretail-mapper-library.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/RJ-mapper.class.d.ts +80 -79
- package/lib/RJ-mapper.class.d.ts.map +1 -0
- package/lib/TransactionDocumentBuilder.d.ts +271 -270
- package/lib/TransactionDocumentBuilder.d.ts.map +1 -0
- package/lib/WebReturn-mapper.class.d.ts +27 -26
- package/lib/WebReturn-mapper.class.d.ts.map +1 -0
- package/lib/WebReturnSalesforceMapper.class.d.ts +35 -34
- package/lib/WebReturnSalesforceMapper.class.d.ts.map +1 -0
- package/lib/basket.service.d.ts +105 -103
- package/lib/basket.service.d.ts.map +1 -0
- package/lib/mapper-library.component.d.ts +9 -5
- package/lib/mapper-library.component.d.ts.map +1 -0
- package/lib/mapper-library.model.d.ts +694 -693
- package/lib/mapper-library.model.d.ts.map +1 -0
- package/lib/mapper-library.module.d.ts +8 -2
- package/lib/mapper-library.module.d.ts.map +1 -0
- package/lib/number-util.service.d.ts +13 -9
- package/lib/number-util.service.d.ts.map +1 -0
- package/package.json +21 -17
- package/pmcretail-mapper-library.d.ts.map +1 -0
- package/public-api.d.ts +6 -5
- package/public-api.d.ts.map +1 -0
- package/bundles/pmcretail-mapper-library.umd.js +0 -8542
- package/bundles/pmcretail-mapper-library.umd.js.map +0 -1
- package/bundles/pmcretail-mapper-library.umd.min.js +0 -16
- package/bundles/pmcretail-mapper-library.umd.min.js.map +0 -1
- package/esm2015/lib/RJ-mapper.class.js +0 -1464
- package/esm2015/lib/TransactionDocumentBuilder.js +0 -1535
- package/esm2015/lib/WebReturn-mapper.class.js +0 -501
- package/esm2015/lib/WebReturnSalesforceMapper.class.js +0 -683
- package/esm2015/lib/basket.service.js +0 -851
- package/esm2015/lib/mapper-library.component.js +0 -27
- package/esm2015/lib/mapper-library.model.js +0 -1442
- package/esm2015/lib/mapper-library.module.js +0 -21
- package/esm2015/lib/number-util.service.js +0 -78
- package/esm2015/pmcretail-mapper-library.js +0 -10
- package/esm2015/public-api.js +0 -14
- package/esm5/lib/RJ-mapper.class.js +0 -1762
- package/esm5/lib/TransactionDocumentBuilder.js +0 -2469
- package/esm5/lib/WebReturn-mapper.class.js +0 -592
- package/esm5/lib/WebReturnSalesforceMapper.class.js +0 -857
- package/esm5/lib/basket.service.js +0 -1076
- package/esm5/lib/mapper-library.component.js +0 -29
- package/esm5/lib/mapper-library.model.js +0 -1442
- package/esm5/lib/mapper-library.module.js +0 -25
- package/esm5/lib/number-util.service.js +0 -95
- package/esm5/pmcretail-mapper-library.js +0 -10
- package/esm5/public-api.js +0 -14
- package/fesm2015/pmcretail-mapper-library.js +0 -6594
- package/fesm2015/pmcretail-mapper-library.js.map +0 -1
- package/fesm5/pmcretail-mapper-library.js +0 -8326
- package/fesm5/pmcretail-mapper-library.js.map +0 -1
- package/pmcretail-mapper-library.d.ts +0 -5
- package/pmcretail-mapper-library.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmcretail-mapper-library.mjs","sources":["../../../projects/mapper-library/src/lib/mapper-library.component.ts","../../../projects/mapper-library/src/lib/mapper-library.module.ts","../../../projects/mapper-library/src/lib/mapper-library.model.ts","../../../projects/mapper-library/src/lib/basket.service.ts","../../../projects/mapper-library/src/lib/number-util.service.ts","../../../projects/mapper-library/src/lib/TransactionDocumentBuilder.ts","../../../projects/mapper-library/src/lib/RJ-mapper.class.ts","../../../projects/mapper-library/src/lib/WebReturn-mapper.class.ts","../../../projects/mapper-library/src/lib/WebReturnSalesforceMapper.class.ts","../../../projects/mapper-library/src/public-api.ts","../../../projects/mapper-library/src/pmcretail-mapper-library.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'lib-mapper-library',\n template: `\n <p>\n mapper-library works!\n </p>\n `,\n styles: [\n ]\n})\nexport class MapperLibraryComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { MapperLibraryComponent } from './mapper-library.component';\n\n\n\n@NgModule({\n declarations: [\n MapperLibraryComponent\n ],\n imports: [\n ],\n exports: [\n MapperLibraryComponent\n ]\n})\nexport class MapperLibraryModule { }\n","\n\nexport enum TRANSACTION_TYPE {\n SALE = \"SALE\",\n REFUND = \"REFUND\",\n SALE_REFUND = \"SALE_REFUND\",\n SALE_EXCHANGE = \"SALE_EXCHANGE\",\n VOID = \"VOID\",\n WEB_RETURNS = \"WEB_RETURNS\"\n}\n\nexport interface ItemDiscount {\n trnDiscountsPortion: number;\n trnPromotionsPortion: number;\n refundPortion: number;\n currentRefundPortion?: number;\n}\n\nexport enum DELIVERY_METHODS {\n DELIVERY = 1,\n DROP_SHIP = 2,\n COLLECT_FROM_STORE = 3,\n SHIP_TO_STORE = 4\n}\n\nexport interface ProductChange {\n itemLineId?: number;\n SKU: string;\n quantity: number;\n selectedPrice?: number;\n lineDiscount?: LineDiscount;\n linePromotions?: LinePromotions;\n exchange?: Exchange;\n refundedQuantity?: number; // contains quantity of both full priced and promotional quantities\n refundPromotionalQuantity?: number; // promotional quantity\n refunded?: boolean;\n refundedTotal?: number;\n refundedReason?: string;\n refundedReasonDescription?: string;\n isChecked?: boolean;\n sealed?: boolean;\n isLastExchanged?: boolean;\n}\n\n/**\n * Product\n */\nexport interface Product extends ProductChange {\n itemLineId?: number;\n status: number;\n subGroup: number;\n brand: string;\n currency: string;\n category: string;\n countryofOrigin: string;\n productId: string;\n productType: number;\n name?: string;\n imageUrls: [string];\n isImageFailToLoad?: boolean;\n size: string;\n type: string;\n season: number;\n productGroup: number;\n styleCode: string;\n nodeStructure: NodeStructure[];\n barcode: string;\n price: Price[];\n colour: string;\n description: string;\n totalLinePrice: number;\n total: number;\n addedInBasket?: boolean;\n selectedVAT?: number;\n selectedVATCode?: string;\n selectedRRPPrice?: number;\n lineDiscount?: LineDiscount;\n exchange?: Exchange;\n // refundedQuantity?: number;\n // refunded?: boolean;\n // refundedTotal?: number;\n // refundedReasonDescription?:string;\n // isChecked?:boolean;\n refundPromotionalQuantity?: number; // promotional quantity\n exchangeReason?: string;\n exchangeQuantity?: number;\n itemDiscounts: ItemDiscount;\n\n giftCardNumberIssued?: string;\n giftCardAmount?: number;\n giftCardRecipientEmail?: string;\n giftCardExpiryDate?: string;\n giftCardRecipientName?: string;\n giftCard?: boolean;\n\n discountable: boolean;\n // sealed?:boolean;\n excludePromotion: boolean;\n categories: Categories[];\n descriptions: Descriptions[];\n barcodes: string[];\n\n //New Feilds\n externalId: string;\n createdDate: string;\n updatedDate: string;\n createdBy: string;\n updatedBy: string;\n attributes: CoreAttribute[];\n id: string;\n long_description: string;\n\n // Mixed Sales fields\n isWebOrder?: boolean,\n fullfilmentId: string,\n fullfilmentLocationName?: string,\n deliveryMethod?: string,\n deliveryGroup?: string,\n selectedInventory?: InventoryInfo;\n leadTime?: leadTime\n}\nexport interface leadTime {\n type: string,\n value: string\n}\n\nexport interface Exchange {\n exchangeId: number,\n lineItemId: number,\n reason: string,\n quantity: number,\n newItems: Product[];\n}\n\nexport interface Categories {\n id: string;\n parentId: string;\n name: string;\n categoryId: string;\n status: boolean;\n}\n\nexport interface Descriptions {\n name: string;\n countryCode: string;\n value: string;\n}\n\nexport interface CoreAttribute {\n name: string;\n value: string;\n searchable: boolean;\n countryCode: string;\n}\n\n/**\n * Basket\n */\n\nexport interface Basket {\n subsidiaryId?: string;\n products: Product[];\n transactionDiscount: any[];\n quantity: number;\n total: number;\n saleTotal: number;\n discountTotal?: number;\n transactionId?: string;\n offlineTransactionId?: string;\n baseCurrency: string;\n basketTotal?: number;\n refundTotal?: number;\n transactionPromotion?: TransactionPromotion[];\n customer?: any;\n exchange?: Exchange[];\n inStoreFlag?: boolean\n}\n\n\n\n/**\n * Price\n */\nexport interface Price {\n VAT: number;\n VATCode: string;\n salesPrice: number;\n currencyCode: string;\n RRPPrice: number;\n}\n\n/**\n * Node structure\n */\ninterface NodeStructure {\n status: boolean;\n name: string;\n nodeType: string;\n isOverride: boolean;\n nodeId: string;\n parentId: string;\n}\n\n/**\n * Line Discount\n */\nexport interface LineDiscount {\n itemLineId: string,\n discountAmount: number,\n discountType: string,\n // reasonCode: string,\n name?: string,\n unitPrice: number,\n discountedLinePrice?: number,\n priceManagerOverride?: UserOverride,\n priceOverrideReasonCode?: string,\n priceOverrideReasonName?: string,\n priceOverrideAmount?: number,\n percentageDiscountManagerOverride?: UserOverride,\n percentageDiscountReasonCode?: string,\n percentageDiscountReasonName?: string,\n percentageDiscountValue?: number\n}\n\n/**\n * User Override\n */\nexport interface UserOverride {\n userId: string,\n automaticApprove: string,\n originalUserId: string\n}\n\n/**\n* line Promotions\n*/\nexport interface LinePromotions {\n\n trigger: Trigger[],\n itemLineId: number,\n promotionId: string,\n displayText: string,\n promotionType: string,\n promotionAmount: number,\n name: string,\n promotionInfo: string,\n promotionLinePrice: number\n refunded?: boolean;\n}\n\n/**\n* trigger\n*/\nexport interface Trigger {\n itemLineId: string;\n quantity?: number;\n totalQuantity?: number;\n linePromotionAmount?:number; // promotion amount applied accross the line\n promotionAmount?:number; // promotion amount applied on 1 unit\n refundedReason?: string;\n refundedReasonDescription?:string;\n promotionId?:string;\n}\n\n/**\n* Transaction Promotion\n*/\nexport interface TransactionPromotion {\n displayText: string;\n name: string;\n promotionAmount: number;\n promotionId: string;\n promotionInfo: string;\n promotionType: string;\n itemLineIds: number[];\n type?:string;\n subLevelType?:PROMOTION_LEVEL\n trigger?:Trigger[];\n couponCode?:string;\n}\n\nexport interface RefundProductChange {\n itemLineId?: number;\n refundedQuantity?: number;\n refundedPromotionalQuantity?: number;\n refundTotal?: number;\n refundedReason?: string;\n refundedReasonDescription?: string;\n refundWithPromotion: boolean;\n isLastExchanged?: boolean;\n}\n\nexport interface InventoryInfo {\n storeName: string,\n storeId: string,\n quantityAvailable: number,\n quantityRequired: number\n}\n\nexport interface InventoryRequestInfo extends InventoryInfo {\n requestedQuantity: number,\n requestedAction: DELIVERY_METHODS\n}\n\nexport interface DeliveryInfo {\n groups: DeliveryGroupInfo[]\n}\n\nexport interface DeliveryGroupInfo {\n groupNumber: number;\n items: Product[];\n estimate?: Estimate;\n}\n\nexport interface Estimate {\n type: string,\n value: string\n}\n\nexport interface TransactionDocument {\n transactionId?: string;\n subsidiaryId?: string;\n offlineTransactionId?:string;\n transactionRef?: string;\n dateTime?: string;\n orgCode: string;\n storeId: string;\n storeNodeId:string;\n storeNodeStructure:string;\n deviceId: string;\n terminalId:string;\n initiatingModule :string;\n export:boolean;\n userId?: string;\n userName?:string;\n customer?: Customer;\n basket: any;\n basketSummary: BasketSummary;\n // lineDiscount: LineDiscount[];\n baseCurrency: string;\n splitPayment?:boolean;\n isPaymentCompleted?:boolean;\n paymentDetails?: any;\n type?: string;\n operationStatus?: string;\n createdAt?: string;\n updatedAt?: string;\n transCompletedAt?: string;\n id?: string;\n saleTotal?: number;\n reasonCode?: string;\n reasonDescription?: string;\n override?: UserOverride;\n originalTransId?:string;\n originalExternalId?: string;\n apiResponse?: APIResponse; // TODO add handler as per export provider\n unreferencedRefund?:boolean;\n giftedReceipt?:boolean;\n currentTransactionDetails?:any;\n isChecked?:boolean;\n externalTransactionDetails?: externalTransactionDetails[];\n refundRequest?: any[];\n isInStoreOrder?: boolean; \n}\n\nexport interface APIResponse\n{\n internalId?:number;\n tranid?:string\n}\n\nexport interface CurrentTransactionDetails{\n products: Product[];\n lineDiscount?:LineDiscount[];\n linePromotion?:LinePromotions[];\n transactionPromotion?:TransactionPromotion[];\n transactionDiscount?:TransactionDiscount[];\n basketSummary?:BasketSummary; \n taxBreakdown?:TaxBreakdown; \n totalTaxSummary?:TotalTaxSummary[];\n}\nexport interface BasketSummary {\n totalItems?: number;\n saleTotal?: number;\n VATTotal?: number;\n discountTotal?: number;\n basketTotal?: number;\n refundTotal?:number;\n shippingTotal?: number;\n basketTotalWithShippingTotal?: number;\n inStore?: BasketSummaryDetails;\n webOrder?: BasketSummaryDetails;\n cnc?: BasketSummaryDetails;\n}\n\nexport interface BasketSummaryDetails {\n totalItems?: number;\n saleTotal?: number;\n VATTotal?: number;\n discountTotal?: number;\n basketTotal?: number;\n refundTotal?:number;\n shippingTotal?: number;\n basketTotalWithShippingTotal?: number;\n}\n\nexport interface TransactionDiscount{\n discountAmount:number;\n discountType:String;\n reasonCode:string;\n override?: UserOverride;\n itemLineIds?:number[];\n}\n\nexport interface TBasket {\n products: TProduct[];\n lineDiscount:LineDiscount[];\n exchange:Exchange[];\n linePromotion:LinePromotions[];\n transactionPromotion?:TransactionPromotion[];\n transactionDiscount?:TransactionDiscount[];\n taxBreakdown?:TaxBreakdown;\n totalTaxSummary?:TotalTaxSummary[];\n\n \n}\n\nexport interface TExchange{\n exchangeId?:number,\n lineItemId?: number,\n reason?: string,\n quantity?: number,\n newItems?:TNewItems[];\n }\n \n export interface TNewItems{\n lineItemId:number,\n Quantity:number\n }\n\nexport interface TProduct {\n itemLineId: string;\n SKU: string;\n description: string;\n imageUrls: [string];\n price: number;\n taxCode?: string;\n taxPercent?: string;\n quantity: number;\n refundedQuantity?: number;\n refundedPromotionalQuantity?:number;\n refunded?: boolean;\n refundedTotal?: number;\n refundedReason?:string;\n refundedReasonDescription?:string;\n selectedRRPPrice?: number;\n totalLinePrice: number;\n barCode?: string;\n barcodes?: string[];\n flagged?: boolean;\n exchange?:Exchange;\n excludePromotion:boolean;\n discountable?:boolean;\n\n itemDiscounts?:ItemDiscounts;\n isLastExchanged?: boolean;\n\n // Mixed Sales fields\n fullfilmentId:string,\n fullfilmentLocationName:string,\n deliveryMethod?:string,\n deliveryGroup?:string,\n giftCardNumberIssued?: string,\n giftCardAmount?: number,\n giftCardRecipientEmail?: string,\n giftCardExpiryDate?: string ,\n giftCardRecipientName?: string,\n giftCard?:boolean,\n currency?:string,\n isWebOrder?:boolean,\n leadTime?: leadTime\n \n // currenttransaction doc changes\n lineDiscount?:any\n\n attributes?:CoreAttribute[];\n}\n\nexport interface ItemDiscounts{\n trnDiscountsPortion:number;\n trnPromotionsPortion:number;\n refundPortion:number;\n}\n\n\n\nexport interface Customer {\n id: string;\n title?: string;\n firstName: string;\n lastName: string;\n email: string;\n postCode: string;\n telephone?: string;\n billingAddress?: Address | Address[];\n shippingAddress?: Address | Address[];\n shipmentDetails?: ShipmentDetails[];\n addressDetail?: string;\n noCustomerSelected?: boolean;\n externalId?: string; \n}\n\nexport interface Address \n{\n id?: string;\n countryCode?: string;\n address1?: string;\n address2?: string;\n address3?: string;\n city?: string;\n county?: string;\n postCode?: string;\n country?: string;\n }\n\n export interface ShipmentDetails {\n id?: string,\n deliveryGroup?: string,\n}\n\nexport interface PaymentDetails {\n cardNumber?: any;\n sqNo?:number;\n result?: string;\n currency: string;\n amount: string;\n authcode?: string;\n pan?: string;\n cardType?: string;\n transactionDate?: string;\n mid?: string;\n tid?: string;\n cvm?: string;\n hostReferenceId?: string;\n aid?: string;\n receiptNo?: string;\n expirydate?: string;\n transactionReference: string;\n applicationVersion?: string;\n entryMethod?:string;\n transactionType:string;\n totalamount:string;\n paymentType?:string;\n}\n\nexport interface TaxBreakdown\n{\n taxLines : TaxLine[],\n totalTaxableAmount: number;\n}\n\nexport interface TotalTaxSummary{\n VATCode:string,\n VAT : number;\n PreTaxSum: number\n TaxSum: number\n TXrateSum: number\n}\n\nexport interface TaxLine\n{\n itemLineId: number,\n taxableAmount: number,\n taxLineTotal: number,\n VAT: number,\n VATCode : string,\n PreTax: number\n}\n\nexport enum DISCOUNTTYPE {\n PERCENT = 'Percent',\n AMOUNT = 'AMOUNT'\n}\n\nexport interface TransactionInfo {\n shippingId?: string,\n externalShippingId?: string\n}\n\nexport interface externalTransactionDetails {\n uniqueId?: string,\n providerType?: string,\n details?: TransactionInfo\n}\n\nexport enum INITIATING_MODULE {\n EBASKET = \"eBasket\"\n}\n\nexport interface pendingMethod {\n _type?: string;\n type?: string;\n message?: string;\n path?: string;\n details?: ShipmentId;\n}\n\nexport interface ShipmentId {\n shipmentId?: string;\n}\n\nexport interface CustomerAddress {\n _type?: string;\n email?: string;\n address1?: string;\n city?: string;\n country_code?: string;\n first_name?: string;\n full_name?: string;\n id?: string;\n last_name?: string;\n phone?: string;\n salutation?: string;\n c_area?: string;\n c_email?: string;\n c_phoneWhatsApp?: string;\n c_strValue?: string;\n postal_code?: string;\n}\n\nexport interface CustomerInfo {\n _type?: string;\n customer_id?: string;\n email?: string;\n}\n\nexport interface GroupedTaxItem {\n _type?: string;\n tax_rate?: number;\n tax_value?: number;\n}\n\nexport interface additionalNotes {\n _type?: string;\n link?: string;\n}\n\nexport interface ProductItem {\n _type?: string;\n adjusted_tax?: number;\n base_price?: number;\n bonus_product_line_item?: boolean;\n gift?: boolean;\n item_id?: string;\n item_text?: string;\n price?: number;\n price_adjustments?: PriceAdjustment[];\n price_after_item_discount?: number;\n price_after_order_discount?: number;\n product_id?: string;\n product_name?: string;\n quantity?: number;\n shipment_id?: string;\n tax?: number;\n tax_basis?: number;\n tax_class_id?: string;\n tax_rate?: number;\n c_osuObjectData?:string;\n}\n\nexport interface ShippingMethod {\n _type?: string;\n description?: string;\n id?: string;\n name?: string;\n price?: number;\n c_approachingThresholdMessage?: string;\n c_estimatedArrivalTime?: string;\n c_isEmail?: boolean;\n c_storePickupEnabled?: boolean;\n c_thresholdValue?: number;\n} \n\nexport interface shipment {\n _type?: string;\n adjusted_merchandize_total_tax?: number;\n adjusted_shipping_total_tax?: number;\n gift?: boolean;\n merchandize_total_tax?: number;\n product_sub_total?: number;\n product_total?: number;\n shipment_id?: string;\n shipment_total?: number;\n shipping_address?: CustomerAddress;\n shipping_method?: ShippingMethod;\n shipping_status?: string;\n shipping_total?: number;\n shipping_total_tax?: number;\n tax_total?: number;\n c_fromStoreId?: string;\n}\n\nexport interface ShippingItem {\n _type?: string;\n adjusted_tax?: number;\n base_price?: number;\n item_id?: string;\n item_text?: string;\n price?: number;\n price_after_item_discount?: number;\n shipment_id?: string;\n tax?: number;\n tax_basis?: number;\n tax_class_id?: string;\n tax_rate?: number;\n}\n\nexport interface AppliedDiscount {\n _type?: string,\n amount?: number,\n percentage?: number,\n type?: string\n}\n\nexport interface PriceAdjustment {\n _type?: string,\n applied_discount?: AppliedDiscount,\n coupon_code?: string,\n creation_date?: string,\n custom?: boolean,\n item_text?: string,\n last_modified?: string,\n manual?: boolean,\n price?: number\n price_adjustment_id?: string,\n promotion_id?: string,\n promotion_link?: string\n}\n\nexport interface OrderDetails {\n _v?: string;\n _type?: string;\n _resource_state?: string;\n _flash?: pendingMethod[];\n adjusted_merchandize_total_tax?: number;\n adjusted_shipping_total_tax?: number;\n agent_basket?: boolean;\n basket_id?: string;\n billing_address?: CustomerAddress;\n channel_type?: string;\n creation_date?: string;\n currency?: string;\n customer_info?: CustomerInfo;\n grouped_tax_items?: GroupedTaxItem[];\n last_modified?: string;\n merchandize_total_tax?: number;\n notes?: additionalNotes;\n order_price_adjustments?: PriceAdjustment[],\n order_no?: string;\n order_total?: number;\n product_items?: ProductItem[];\n product_sub_total?: number;\n product_total?: number;\n shipments?: shipment[];\n shipping_items?: ShippingItem[];\n shipping_total?: number;\n shipping_total_tax?: number;\n taxation?: string;\n tax_rounded_at_group?: boolean;\n tax_total?: number;\n c_isInStoreOrder?: boolean;\n}\n\nexport enum PROVIDERS {\n SALESFORCE = \"Salesforce\"\n}\n\nexport enum PROMOTION_LEVEL\n{\n LINE=\"LINE\",\n TRANSACTION=\"TRANSACTION\"\n}\n\nexport enum PROMOTION_TYPE\n{\n COUPON=\"COUPON\"\n}\n\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { DELIVERY_METHODS } from './mapper-library.model';\nimport { Basket, DeliveryGroupInfo, DeliveryInfo, Product, TransactionPromotion } from './mapper-library.model';\nimport { TransactionDiscount } from './mapper-library.model';\nimport { NumberUtilService } from './number-util.service';\n\nexport class BasketService {\n currentBasket: Basket = {\n products: [],\n transactionDiscount: [],\n quantity: 0,\n total: 0,\n saleTotal: 0,\n baseCurrency: ''\n };\n\n private basketSource = new BehaviorSubject<any>(null);\n basket = this.basketSource.asObservable();\n\n private productSource = new BehaviorSubject<any>(null);\n product = this.productSource.asObservable();\n\n private peerSource = new BehaviorSubject<boolean>(false);\n peerSync = this.peerSource.asObservable();\n\n private scanSource = new BehaviorSubject<boolean>(false);\n scanner = this.scanSource.asObservable();\n\n private _isMixedBasketSales: boolean | undefined;\n public get isMixedBasketSales(): any {\n return this._isMixedBasketSales;\n }\n public set isMixedBasketSales(v: any) {\n this._isMixedBasketSales = v;\n }\n\n\n constructor(private numberUtilService: NumberUtilService) { }\n\n updateBasket(basket: Basket) {\n this.currentBasket = basket;\n this.isMixedBasketSales = this.filterProductListWithWebOrder(true).length > 0;\n this.basketSource.next(basket);\n }\n\n /**\n * calculates the total basket value and quantity\n * @param null\n * @returns void\n */\n updateBasketTotal(basketDetails: { quantity: number; total: number; products: any; transactionId: any; basketTotal: any; }, basketState: { updateBasket: (arg0: any) => void; }) {\n basketDetails.quantity = 0;\n basketDetails.total = 0;\n for (const p of basketDetails.products) {\n basketDetails.quantity = basketDetails.quantity + p.quantity;\n basketDetails.total =\n this.numberUtilService.trimTo2Decimal(basketDetails.total) +\n this.numberUtilService.trimTo2Decimal(p.total);\n }\n console.log(\n \"e:basket :basket service : basketDetails updated values for transaction id\",\n basketDetails.transactionId,\n JSON.stringify(basketDetails)\n );\n basketDetails.basketTotal = basketDetails.total;\n basketState.updateBasket(basketDetails);\n }\n\n /**\n * add Line promotion\n * @param null\n * @returns basketDetails\n */\n addlinePromotion(promotionList: { result: { linePromotions: string | any[]; }; }, basketDetails: { products: any; }) {\n console.log(\n \"e:basket :basket Service : promotionList and basketDetails for linePromotions\",\n JSON.stringify(promotionList),\n JSON.stringify(basketDetails)\n );\n if (\n promotionList &&\n promotionList.result &&\n promotionList.result.linePromotions &&\n promotionList.result.linePromotions.length > 0\n ) {\n for (var element of basketDetails.products) {\n for (var promotionelement of promotionList.result.linePromotions) {\n if (\n element.itemLineId.toString() ===\n promotionelement.itemLineId.toString()\n ) {\n element.linePromotions = promotionelement;\n }\n }\n }\n }\n return basketDetails;\n }\n\n /**\n * add Transaction promotion\n * @param null\n * @returns basketDetails\n */\n\n addTransactionPromotion(promotionList: { result: { transactionPromotion: any }; }, basketdetails: Basket) {\n console.log(\n \"e:basket :basket Service : promotionList and basketDetails for transactionPromotion\",\n JSON.stringify(promotionList),\n JSON.stringify(basketdetails),\n JSON.stringify(basketdetails.transactionPromotion)\n );\n if (\n promotionList &&\n promotionList.result &&\n promotionList.result.transactionPromotion &&\n promotionList.result.transactionPromotion.length > 0\n ) {\n promotionList.result.transactionPromotion.forEach((tPromotion: any) => {\n let transactionPromotionEntryUpdated: any = Object.assign(\n {},\n tPromotion\n );\n\n transactionPromotionEntryUpdated.itemLineIds = basketdetails.products.map(\n (product) => {\n return product.itemLineId;\n }\n );\n\n if (!basketdetails.transactionPromotion) {\n basketdetails.transactionPromotion = [];\n }\n basketdetails.transactionPromotion.push(\n transactionPromotionEntryUpdated\n );\n\n basketdetails = this.transactionPromotionProductPortionCalc(\n basketdetails,\n transactionPromotionEntryUpdated\n );\n });\n }\n console.log(\n \"basket details in refund calculation file\",\n JSON.stringify(basketdetails)\n );\n return basketdetails;\n }\n\n updateProductTotalForSummary(basketDetails: { total: string | number; quantity: string | number; products: any; }) {\n /*sale- product refundedQuantity = undefined\n partial refund - product refundedQuantity is > 0\n total refund - proudct refundedQuantity is > 0\n exchange - exchange product refundedQuantity is > 0 \n new product refundedQuantity = undefined \n old product without exchange refundedQuantity = 0\n unreference refund-product refundedQuantity is > 0 */\n\n basketDetails.total = 0;\n basketDetails.quantity = 0;\n for (var product of basketDetails.products) {\n if (product.linePromotions) {\n product.total = product.linePromotions.promotionLinePrice;\n } else if (product.lineDiscount && !product.linePromotions) {\n product.total = product.lineDiscount.discountedLinePrice;\n } else {\n product.total = product.totalLinePrice;\n }\n product.total =\n product.total -\n Math.abs(product.refundedTotal ? product.refundedTotal : 0);\n\n basketDetails.total += product.total;\n basketDetails.quantity =\n basketDetails.quantity +\n (product.quantity -\n (product.refundedQuantity ? product.refundedQuantity : 0));\n console.log(\n \"e-basket:ExchangeSummaryScreen:update basketdetails total :\" +\n basketDetails.total +\n \" Product line ID : \" +\n product.itemLineId +\n \" product total : \" +\n product.total,\n \"quantity : \" + basketDetails.quantity\n );\n }\n return this.updateBasketTotalForSummary(basketDetails);\n }\n\n updateBasketTotalForSummary(basketDetails: any) {\n basketDetails.basketTotal = basketDetails.total;\n console.info(\n \"ebasket : basket Service : update Basket Total for transaction transactionDiscount \",\n JSON.stringify(basketDetails.transactionDiscount)\n );\n\n console.info(\n \"ebasket : basket Service : update Basket Total for transaction transactionPromotion \",\n JSON.stringify(basketDetails.transactionPromotion)\n );\n\n basketDetails = this.updateTransactionPromotion(basketDetails);\n basketDetails = this.updateTransactionDiscount(basketDetails);\n basketDetails.basketTotal = Number(basketDetails.basketTotal.toFixed(2));\n\n console.info(\n \"ebasket : basket Service : update Basket Total: basketTotal after promotion applied for basketTotal\",\n basketDetails.basketTotal\n );\n return basketDetails;\n }\n\n updateTransactionDiscount(basketDetails: { transactionDiscount: any[]; basketTotal: number; }) {\n if (\n basketDetails.transactionDiscount &&\n basketDetails.transactionDiscount.length > 0\n ) {\n const discountTotal = basketDetails.transactionDiscount.reduce(\n (n: any, { discountAmount }: any) => n + discountAmount,\n 0\n );\n console.log(\"ebasket : basket Service : discountTotal \", discountTotal);\n basketDetails.basketTotal =\n basketDetails.basketTotal - Math.abs(discountTotal);\n }\n return basketDetails;\n }\n\n updateTransactionPromotion(basketDetails: { transactionPromotion: any[]; basketTotal: number; }) {\n if (\n basketDetails.transactionPromotion &&\n basketDetails.transactionPromotion.length > 0\n ) {\n const discountTotal = basketDetails.transactionPromotion.reduce(\n (n: any, { promotionAmount }: any) => n + promotionAmount,\n 0\n );\n basketDetails.basketTotal =\n basketDetails.basketTotal - Math.abs(discountTotal);\n }\n return basketDetails;\n }\n\n updateBasketTotalWithoutDiscount(basket: Basket): Basket {\n basket.total = 0;\n basket.quantity = 0;\n\n for (var product of basket.products) {\n if (product.linePromotions) {\n product.total = product.linePromotions.promotionLinePrice;\n } else if (product.lineDiscount && !product.linePromotions) {\n product.total = product.lineDiscount.discountedLinePrice || 0;\n } else {\n product.total = product.totalLinePrice;\n }\n\n product.total =\n product.total -\n Math.abs(product.refundedTotal ? product.refundedTotal : 0);\n basket.total += product.total;\n basket.quantity =\n basket.quantity +\n (product.quantity -\n (product.refundedQuantity ? product.refundedQuantity : 0));\n\n console.log(\n \"e-basket:basket service:update basketdetails total :\" +\n JSON.stringify(basket) +\n basket.total +\n \" Product line ID : \" +\n product.itemLineId +\n \" product total : \" +\n product.total\n );\n }\n\n basket.basketTotal = basket.total;\n return basket;\n }\n\n updateBasketTotalWithDiscounts(basket: any): Basket {\n console.log(\n \"e:basket :RefundBasketScreen : this.basketDetails new values\",\n basket,\n JSON.stringify(basket.basketTotal)\n );\n if (basket.transactionPromotion && basket.transactionPromotion.length > 0) {\n const discountTotal = basket.transactionPromotion.reduce(\n (n: any, { promotionAmount }: any) => n + promotionAmount,\n 0\n );\n basket.basketTotal = basket.basketTotal - discountTotal;\n }\n if (basket.transactionDiscount && basket.transactionDiscount.length > 0) {\n const discountTotal = basket.transactionDiscount.reduce(\n (n: any, { discountAmount }: any) => n + discountAmount,\n 0\n );\n\n basket.basketTotal = basket.basketTotal - discountTotal;\n }\n console.log(\n \"e:basket :RefundBasketScreen : basket new values\",\n JSON.stringify(basket)\n );\n\n return basket;\n }\n\n transactionDiscountAndPromotionProductortionCalculation(basket: Basket) {\n if (basket.transactionDiscount && basket.transactionDiscount.length > 0) {\n basket.transactionDiscount.forEach(\n (discount) =>\n (basket = this.transactionDiscountProductPortionCalc(\n basket,\n discount\n ))\n );\n }\n\n if (basket.transactionPromotion && basket.transactionPromotion.length > 0) {\n basket.transactionPromotion.forEach((promotion) => {\n basket = this.transactionPromotionProductPortionCalc(basket, promotion);\n });\n }\n console.log(\n \"ebasket: basket item discount protion calculation\",\n basket,\n basket.products\n );\n return basket;\n }\n\n transactionPromotionProductPortionCalc(\n basket: any,\n promotion: any\n ) {\n let total = 0;\n let percentage = 0;\n {\n basket.products.forEach((p:any) => {\n if (promotion.itemLineIds.includes(p.itemLineId)) {\n p = this.validateProductItemDiscount(p);\n const productContributionInTotal =\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.trnDiscountsPortion) +\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.trnPromotionsPortion) -\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.refundPortion);\n total += (p.total - this.numberUtilService.trimTo2Decimal2(productContributionInTotal));\n }\n });\n console.log(\n `ebasket: trnsactionPromotion: ${JSON.stringify(\n promotion\n )}, selected products total: ${total}`\n );\n basket.products.forEach((product: any) => {\n product = this.validateProductItemDiscount(product);\n\n const productContributionInTotal =\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnDiscountsPortion) +\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnPromotionsPortion) -\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.refundPortion);\n\n if (promotion.itemLineIds.includes(product.itemLineId)) {\n percentage = ((product.total - this.numberUtilService.trimTo2Decimal2(productContributionInTotal)) / total) * 100;\n product.itemDiscounts.trnPromotionsPortion +=\n (promotion.promotionAmount * percentage) / 100;\n product.itemDiscounts.trnPromotionsPortion = this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnPromotionsPortion);\n }\n });\n }\n return basket;\n }\n\n transactionDiscountProductPortionCalc(\n basket: any,\n discount: any\n ) {\n let total = 0;\n let percentage = 0;\n\n basket.products.forEach((p: any) => {\n if (discount.itemLineIds.includes(p.itemLineId)) {\n p = this.validateProductItemDiscount(p);\n const productContributionInTotal =\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.trnDiscountsPortion) +\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.trnPromotionsPortion) -\n this.numberUtilService.trimTo2Decimal2(p.itemDiscounts.refundPortion);\n\n\n total += (p.total - this.numberUtilService.trimTo2Decimal2(productContributionInTotal));\n }\n });\n\n console.log(\n `ebasket: trnsactionDiscount: ${JSON.stringify(\n discount\n )}, selected products total: ${total}`\n );\n\n basket.products.forEach((product:any) => {\n product = this.validateProductItemDiscount(product);\n console.log(product.discountable, \"ebasket : basket service : discountable in basket service\");\n\n const productContributionInTotal =\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnDiscountsPortion) +\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnPromotionsPortion) -\n this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.refundPortion);\n\n if (discount.itemLineIds.includes(product.itemLineId) && product.discountable == true) {\n percentage = ((product.total - this.numberUtilService.trimTo2Decimal2(productContributionInTotal)) / total) * 100;\n product.itemDiscounts.trnDiscountsPortion +=\n (discount.discountAmount * percentage) / 100;\n product.itemDiscounts.trnDiscountsPortion = this.numberUtilService.trimTo2Decimal2(product.itemDiscounts.trnDiscountsPortion)\n }\n });\n return basket;\n }\n\n public validateProductItemDiscount(product: Product) {\n if (!product.itemDiscounts) {\n product.itemDiscounts = {\n trnDiscountsPortion: 0,\n trnPromotionsPortion: 0,\n refundPortion: 0,\n };\n }\n return product;\n }\n\n markProduct(product: Product) {\n this.productSource.next(product);\n }\n stopPeerSyncProcess(peerSync: boolean) {\n this.peerSource.next(peerSync);\n }\n\n scanStart(isScanning: boolean) {\n this.scanSource.next(isScanning);\n }\n\n promotionRemainingCalculation(promotion: TransactionPromotion[]) {\n var promotionValue = 0;\n promotion.forEach((element) => {\n promotionValue += element.promotionAmount;\n });\n return promotionValue;\n }\n\n discountRemainingCalculation(discount: TransactionDiscount[]) {\n var discountValue = 0;\n discount.forEach((element) => {\n discountValue += element.discountAmount;\n });\n return discountValue;\n }\n\n discountRefundedCalculation(discount: TransactionDiscount[]) {\n var discountValue = 0;\n discount.forEach((element) => {\n if (element.discountAmount < 0) {\n discountValue += element.discountAmount;\n }\n });\n return discountValue;\n }\n\n generateNewItemLineId(products: Product[]) {\n let largestNumber: any = 0;\n\n if (products.length > 0) {\n let itemLineIdArray = products.map((product) => {\n return product.itemLineId;\n });\n\n largestNumber = itemLineIdArray.reduce((a :any, b:any) => Math.max(a, b));\n }\n\n return largestNumber + 1;\n }\n\n updateBasketProductDataAsPerQuantity(\n product: any,\n quantity: number\n ): Product {\n\n console.log(`ebasket: updateBasketProductDataAsPerQuantity : ${quantity} product: ${JSON.stringify(product)}`);\n product.quantity = quantity;\n if (product.hasOwnProperty(\"lineDiscount\")) {\n // && this.product.quantity !== this.productDetailForm.controls.quantity.value\n product.lineDiscount.discountedLinePrice = Number(\n this.numberUtilService.getFlooredFixed(\n product.lineDiscount.unitPrice * quantity,\n 2\n )\n );\n product.lineDiscount.discountAmount =\n product.totalLinePrice - product.lineDiscount.discountedLinePrice;\n } else {\n product.totalLinePrice =\n quantity * this.numberUtilService.trimTo2Decimal(product.selectedPrice);\n }\n if (product.lineDiscount) {\n product.total = product.lineDiscount.discountedLinePrice;\n } else {\n product.total = product.totalLinePrice;\n }\n console.log(`ebasket: updateBasketProductDataAsPerQuantity : ${quantity} product: ${JSON.stringify(product)}`);\n\n return product;\n }\n\n filterProductListWithWebOrder(isWebOrder: boolean): Product[] {\n console.log(\"ebasket: filterProductListWithWebOrder hit\", JSON.stringify(this.currentBasket.products));\n if (isWebOrder)\n return this.currentBasket.products.filter((x) => x.isWebOrder);\n else {\n return this.currentBasket.products.filter((x) => !x.isWebOrder);\n }\n }\n\n filterProductListWithDelivery(): Product[] {\n console.log(\"ebasket: filterProductListWithDelivery hit\", JSON.stringify(this.currentBasket.products));\n return this.currentBasket.products.filter((x) => x.deliveryMethod === DELIVERY_METHODS.DELIVERY.toString());\n }\n\n filterProductListWithDeliveryGroup(group: string, products: Product[]): Product[] {\n console.log(\"ebasket: filterProductListWithDeliveryGroup hit\", JSON.stringify(products));\n return products.filter((x) => x.deliveryGroup === group);\n }\n\n generateNewDeliveryGroupNumber(products: Product[]) {\n let largestNumber = 0;\n\n if (products.length > 0) {\n let deliveryGroupArr = products.map((product) => {\n if (product.deliveryGroup) {\n return parseInt(product.deliveryGroup);\n }\n return 0;\n });\n\n largestNumber = deliveryGroupArr.reduce((a, b) => Math.max(a, b));\n }\n\n return (largestNumber + 1).toString();\n }\n\n getDeliveryGroupNumbers(products: Product[]) {\n console.log(\"getDeliveryGroupNumbers initiating : \", JSON.stringify(products));\n\n let uniqueAndsortedResult: number[] = [];\n\n if (products.length > 0) {\n let deliveryGroupArr = products.map((product) => {\n if (product.deliveryGroup) {\n return parseInt(product.deliveryGroup);\n }\n else if (product.deliveryMethod === \"1\") {\n return 1;\n }\n return 0;\n });\n\n uniqueAndsortedResult = Array.from(new Set(deliveryGroupArr)).sort((a, b) => a - b);\n console.log(\"getDeliveryGroupNumbers : \", JSON.stringify(uniqueAndsortedResult));\n }\n return uniqueAndsortedResult;\n }\n\n updateProductsWithNewDeliveryGroupNumber(products: Product[]) {\n console.log(\"updateProductsWithNewDeliveryGroupNumber initiating : \", JSON.stringify(products));\n\n let newGroupNumber = this.generateNewDeliveryGroupNumber(this.currentBasket.products);\n if (products.length > 0) {\n this.currentBasket.products.forEach(cBProducts => {\n products.forEach(element => {\n if (cBProducts.itemLineId === element.itemLineId) {\n cBProducts.deliveryGroup = newGroupNumber;\n }\n\n });\n });\n\n }\n\n this.updateBasket(this.currentBasket);\n return;\n }\n\n calculateEstimatedTime(products: any[]) {\n try {\n let time;\n let estmatedTime: number = 0;\n let estimatedDays: string = \"Hours\";\n products.forEach((element: { leadTime: { type: string; value: any; }; }) => {\n\n if (element.leadTime.type.toLocaleLowerCase() === \"weeks\") {\n time = Number(element.leadTime.value) * 24 * 7;\n estmatedTime = Math.max(estmatedTime, time);\n estimatedDays = (estmatedTime === time) ? element.leadTime.type : estimatedDays\n console.log(\"week\", estmatedTime, estimatedDays);\n\n } else if (element.leadTime.type.toLocaleLowerCase() === \"days\") {\n time = Number(element.leadTime.value) * 24;\n estmatedTime = Math.max(estmatedTime, time);\n estimatedDays = (estmatedTime === time) ? element.leadTime.type : estimatedDays\n\n console.log(\"days\", estmatedTime, estimatedDays);\n\n }\n else if (element.leadTime.type.toLocaleLowerCase() === \"months\") {\n time = Number(element.leadTime.value) * 24 * 30;\n estmatedTime = Math.max(estmatedTime, time);\n estimatedDays = (estmatedTime === time) ? element.leadTime.type : estimatedDays\n\n console.log(\"months\", estmatedTime, estimatedDays);\n\n }\n else if (element.leadTime.type.toLocaleLowerCase() === \"years\") {\n time = Number(element.leadTime.value) * 24 * 365;\n estmatedTime = Math.max(estmatedTime, time);\n estimatedDays = (estmatedTime === time) ? element.leadTime.type : estimatedDays\n\n console.log(\"years\", estmatedTime, estimatedDays);\n\n } else {\n time = Number(element.leadTime.value);\n estmatedTime = Math.max(estmatedTime, time);\n estimatedDays = (estmatedTime === time) ? element.leadTime.type : estimatedDays;\n console.log(\"hours\", estmatedTime, estimatedDays);\n\n }\n });\n\n if (estimatedDays.toLocaleLowerCase() === \"days\") {\n estmatedTime = estmatedTime / 24;\n } else if (estimatedDays.toLocaleLowerCase() === \"weeks\") {\n estmatedTime = estmatedTime / (24 * 7);\n } else if (estimatedDays.toLocaleLowerCase() === \"months\") {\n estmatedTime = estmatedTime / (24 * 30);\n } else if (estimatedDays.toLocaleLowerCase() === \"years\") {\n estmatedTime = estmatedTime / (24 * 365);\n }\n\n let estimate = {\n value: estmatedTime.toString(),\n type: estimatedDays\n }\n return estimate;\n } catch (error) {\n console.log(\"error in calculateEstimatedTime\", error);\n }\n return 0;\n }\n\n updateProductsWithDeliveryGroupNumber(oldGroup: string, newGroup: string) {\n console.log(\"updateProductsWithDeliveryGroupNumber initiating\");\n\n this.currentBasket.products.forEach(cBProducts => {\n if (cBProducts.deliveryGroup === oldGroup) {\n cBProducts.deliveryGroup = newGroup;\n }\n\n });\n\n this.updateBasket(this.currentBasket);\n return;\n }\n\n getDeliveryInfo(): any {\n console.log(\"getDeliveryGroupInfor initiating\");\n try {\n let groupInfo: DeliveryInfo = {\n groups: []\n }\n\n this.getDeliveryGroupNumbers(this.currentBasket.products).forEach((groupNumber) => {\n let group: any = {\n groupNumber: groupNumber,\n items: [],\n estimate: {\n type: \"Hours\",\n value: \"0\"\n }\n }\n this.currentBasket.products.forEach(cBProducts => {\n if (cBProducts.deliveryGroup === groupNumber.toString()) {\n group.items.push(cBProducts);\n }\n });\n\n group.estimate = this.calculateEstimatedTime(group.items);\n\n groupInfo.groups.push(group);\n\n });\n\n return groupInfo;\n }\n catch (error) {\n console.log(\"error\", error);\n }\n }\n}\n","import { CurrencyPipe } from \"@angular/common\";\nimport { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class NumberUtilService {\n constructor( private cp: CurrencyPipe) {}\n\n trimTo2Decimal(no: number) {\n //return Math.floor(no * 100) / 100;\n return no;\n }\n\n trimTo2Decimal2(no: number) {\n // SEAM-11411 - Had to change 2nd param to 3 to fix rounding issue (FIXME - Needs a new story for refactoring)\n return Number(this.getFlooredFixed(no, 3));\n }\n\n getFlooredFixed(v, d) {\n return (Math.floor(v * Math.pow(10, d)) / Math.pow(10, d)).toFixed(d);\n }\n\n AppendWithCurrencySymbol(numValue: any, currencyCode: string): string {\n let returnValue: any = \"\";\n if (numValue) {\n const numb: number = parseFloat(numValue.toString().replace(',',''));\n returnValue = this.cp.transform(\n Number(numValue).toFixed(2),\n currencyCode.toLocaleUpperCase(),\n \"symbol\"\n );\n console.log(\"AppendWithCurrencySymbol :\" + returnValue);\n } else {\n returnValue = this.cp.transform(\n \"0.00\",\n currencyCode.toLocaleUpperCase(),\n \"symbol\"\n );\n }\n return returnValue;\n }\n}\n","import { CurrencyPipe } from \"@angular/common\";\nimport { BasketSummary, CurrentTransactionDetails, Customer, DELIVERY_METHODS, ItemDiscounts, TaxBreakdown, TaxLine, TBasket, TotalTaxSummary, TProduct, TransactionDocument } from \"./mapper-library.model\";\nimport { TRANSACTION_TYPE, Basket, LineDiscount, LinePromotions, Product, UserOverride } from \"./mapper-library.model\";\nimport { BasketService } from \"./basket.service\";\nimport { NumberUtilService } from \"./number-util.service\";\n\n/**\n * Transaction document builder\n */\nexport class TransactionDocumentBuilder {\n private transactionDocument: TransactionDocument;\n private numberUtilService: NumberUtilService;\n private storeInfo : any;\n \n constructor(\n transactionDoc?: TransactionDocument,\n private currencyPipe?: CurrencyPipe,\n private basketService?: BasketService | any,\n ) {\n this.numberUtilService = new NumberUtilService(currencyPipe);\n this.basketService = new BasketService(this.numberUtilService);\n this.storeInfo = JSON.parse(localStorage.getItem('storeInfo') || '{}');\n if (transactionDoc) {\n this.transactionDocument = transactionDoc;\n } else {\n this.transactionDocument = {\n transactionId: \"\",\n offlineTransactionId: \"\",\n transactionRef: \"\",\n dateTime: \"\",\n orgCode: \"\",\n storeId: \"\",\n storeNodeId: \"\",\n storeNodeStructure: \"\",\n deviceId: \"\",\n terminalId: \"\",\n userId: \"\",\n initiatingModule : \"eBasket\",\n export: false,\n basket: {} as TBasket,\n basketSummary: {} as BasketSummary,\n baseCurrency: \"\",\n type: \"\",\n operationStatus: \"\",\n createdAt: \"\",\n updatedAt: \"\",\n id: \"\",\n currentTransactionDetails: {} as CurrentTransactionDetails,\n saleTotal: 0,\n };\n }\n }\n\n /**\n * Transactions ref\n * @returns ref\n */\n transactionRef(): TransactionDocumentBuilder {\n const storeDetails = JSON.parse(localStorage.getItem('storeInfo') || '{}');\n const date = new Date();\n const random = (((1 + Math.random()) * 0x10000) | 0)\n .toString(16)\n .substring(1);\n this.transactionDocument.transactionRef =\n storeDetails.orgCode + storeDetails.storeId + date.toISOString() + random;\n console.log(\"ebasket: transaction ref created\", this.transactionDocument.transactionRef)\n return this;\n }\n\n /**\n * Transactions id\n * @param transactionID\n * @returns id\n */\n transactionId(transactionID: string, isOnline: boolean = true): TransactionDocumentBuilder {\n if (isOnline) {\n this.transactionDocument.transactionId = transactionID;\n }\n return this;\n }\n\n /**\n * Transactions id\n * @param transactionID\n * @returns id\n */\n offlineTransactionId(transactionID: string, isOnline: any): TransactionDocumentBuilder {\n if (!isOnline) {\n this.transactionDocument.offlineTransactionId = transactionID;\n }\n return this;\n }\n\n /**\n * storeNode Id\n * @param storeNodeId\n * @returns id\n */\n storeNodeId(storeNodeId: string): TransactionDocumentBuilder {\n this.transactionDocument.storeNodeId = storeNodeId;\n return this;\n }\n\n /**\n* storeNode structure\n* @param storeNodeStructure\n* @returns id\n*/\n storeNodeStructure(storeNodeStructure: string): TransactionDocumentBuilder {\n this.transactionDocument.storeNodeStructure = storeNodeStructure;\n return this;\n }\n\n /**\n * Orgs code\n * @param orgCode\n * @returns code\n */\n orgCode(orgCode: any): TransactionDocumentBuilder {\n this.transactionDocument.orgCode = orgCode;\n return this;\n }\n /**\n * Stores id\n * @param storeId\n * @returns id\n */\n storeId(storeId: any): TransactionDocumentBuilder {\n this.transactionDocument.storeId = storeId;\n return this;\n }\n /**\n * Dates time\n * @returns time\n */\n dateTime(): TransactionDocumentBuilder {\n const date = new Date();\n this.transactionDocument.dateTime = date.toISOString();\n return this;\n }\n /**\n * Devices id\n * @param deviceId\n * @returns id\n */\n deviceId(deviceId: any): TransactionDocumentBuilder {\n this.transactionDocument.deviceId = deviceId;\n\n return this;\n }\n\n /**\n * terminal id\n * @param terminalId\n * @returns id\n */\n terminalId(terminalId: any): TransactionDocumentBuilder {\n this.transactionDocument.terminalId = terminalId;\n return this;\n }\n\n\n\n\n\n /**\n * saleExport\n * @param saleExport\n * @returns id\n */\n export(saleExport: any): TransactionDocumentBuilder {\n this.transactionDocument.export = saleExport;\n return this;\n }\n\n\n\n /* customer(): TransactionDocumentBuilder {\n const user = JSON.parse(localStorage.getItem('userDetails'));\n this.transactionDocument.customer = user;\n return this;\n } */\n /**\n * Baskets transaction document builder\n * @param basketDetails\n * @returns basket\n */\n basket(basketDetails: Basket): TransactionDocumentBuilder {\n console.log(\"ebasket: basket details update in transaction document\", JSON.stringify(basketDetails));\n\n this.transactionDocument.subsidiaryId = basketDetails.subsidiaryId || (localStorage.getItem('subsidiaryId') || '');\n this.transactionDocument.basket.products = [] as TProduct[];\n this.transactionDocument.basket.lineDiscount = [];\n this.transactionDocument.basket.linePromotion = [];\n this.transactionDocument.basket.transactionPromotion = [];\n basketDetails.products.forEach((product: any, index) => {\n const p = {} as TProduct;\n p.itemDiscounts = {} as ItemDiscounts;\n p.SKU = product.SKU;\n p.excludePromotion = product.excludePromotion;\n p.barCode = product.barcode;\n p.barcodes = product.barcodes;\n p.description = product.description;\n p.itemLineId = product.itemLineId ? product.itemLineId.toString() : \"\" + (index + 1);\n p.price = product.selectedPrice;\n p.quantity = product.quantity;\n p.totalLinePrice = product.quantity * product.selectedPrice;\n p.imageUrls = product.imageUrls;\n p.selectedRRPPrice = product.selectedRRPPrice;\n\n //inventory fields\n \n p.fullfilmentId = product.fullfilmentId? product.fullfilmentId: this.storeInfo.storeId;\n\n p.fullfilmentLocationName = product.fullfilmentLocationName;\n p.deliveryGroup = product.deliveryGroup;\n p.leadTime = product.leadTime;\n p.deliveryMethod = product.deliveryMethod;\n\n p.giftCard = product.giftCard;\n p.giftCardExpiryDate = product.giftCardExpiryDate;\n p.giftCardNumberIssued = product.giftCardNumberIssued;\n p.giftCardRecipientEmail = product.giftCardRecipientEmail;\n p.giftCardRecipientName = product.giftCardRecipientName;\n\n if (product.refundedQuantity > 0) {\n p.refundedQuantity = product.refundedQuantity;\n p.refundedPromotionalQuantity = product.refundPromotionalQuantity;\n p.refunded = product.refunded;\n p.refundedReasonDescription = product.refundedReasonDescription;\n p.refundedReason = product.refundedReason;\n if (!p.refundedReasonDescription) {\n p.refundedReasonDescription = p.refundedReason;\n }\n p.refundedTotal = product.refundedTotal;\n p.isLastExchanged = product.isLastExchanged;\n }\n\n if (product.exchange) {\n p.exchange = product.exchange;\n }\n if (product.lineDiscount) {\n p.lineDiscount = product.lineDiscount;\n }\n p.itemDiscounts = product.itemDiscounts as ItemDiscounts;\n this.transactionDocument.basket.products.push(p);\n this.lineDiscount(basketDetails);\n });\n console.info(\"ebasket: transactiondocument basket details updated\", JSON.stringify(this.transactionDocument.basket));\n\n return this;\n }\n\n /**\n * current transaction Details Total(New Products)\n * @returns currentTransactionDetails\n */\n\n currentTransactionDetails(basket: Basket): TransactionDocumentBuilder {\n console.log(\"ebasket: current transaction details for exchanges\", basket);\n this.transactionDocument.currentTransactionDetails.products = [] as Product[];\n this.transactionDocument.currentTransactionDetails.linePromotion = [] as LinePromotions[];\n this.transactionDocument.currentTransactionDetails.lineDiscount = [] as LineDiscount[];\n this.transactionDocument.currentTransactionDetails.transactionDiscount = [];\n this.transactionDocument.currentTransactionDetails.products = basket.products;\n this.transactionDocument.currentTransactionDetails.products = this.transactionDocument.currentTransactionDetails.products.filter(\n ( proj: { refundedQuantity: number; }) => proj.refundedQuantity != 0\n );\n\n this.transactionDocument.currentTransactionDetails.products.forEach((product: { refundedQuantity: any; quantity: any; totalLinePrice: number; refundedTotal: number; total: any; refunded: boolean; linePromotions: any; lineDiscount: any; }) => {\n if (product.refundedQuantity) {\n product.quantity = product.refundedQuantity;\n // updating total line price with actual price to be refunded including the refunding qty\n product.totalLinePrice = Math.abs(product.refundedTotal);\n product.total = product.totalLinePrice;\n if (product.quantity === product.refundedQuantity) {\n product.refunded = true;\n }\n }\n //Updating line promotions and line discounts \n if (product.linePromotions && !product.refundedQuantity) {\n this.transactionDocument.currentTransactionDetails.linePromotion.push(product.linePromotions)\n }\n if (product.lineDiscount && !product.refundedQuantity) {\n this.transactionDocument.currentTransactionDetails.lineDiscount.push(product.lineDiscount)\n }\n });\n\n console.log(\"ebasket: current transaction details after removing old products\", this.transactionDocument.currentTransactionDetails.products);\n\n if (basket.transactionDiscount && basket.transactionDiscount.length > 0) {\n this.transactionDocument.currentTransactionDetails.transactionDiscount.push(...basket.transactionDiscount);\n }\n this.transactionDocument.currentTransactionDetails.basketSummary = {} as BasketSummary;\n\n this.transactionDocument.currentTransactionDetails.basketSummary.saleTotal = this.numberUtilService.trimTo2Decimal2(this.updateSaleTotal(this.transactionDocument.currentTransactionDetails));\n this.transactionDocument.currentTransactionDetails.basketSummary.totalItems = basket.quantity;\n\n\n this.transactionDocument.currentTransactionDetails.basketSummary.basketTotal = basket.basketTotal;\n this.transactionDocument.currentTransactionDetails.basketSummary.refundTotal = this.updateCurrentTransactionDetailsRefundTotal();\n // For partial refund discount is updatied in total line price so discountTotal will always be zero & in case of exchange discount total is calculated\n\n if (this.transactionDocument.type === TRANSACTION_TYPE.SALE_EXCHANGE) {\n this.transactionDocument.currentTransactionDetails.basketSummary.discountTotal = this.numberUtilService.trimTo2Decimal2(this.updateCurrentTransactionDetailsDiscountTotal());\n } else {\n if (this.transactionDocument.currentTransactionDetails.transactionDiscount && this.transactionDocument.currentTransactionDetails.transactionDiscount.length > 0) {\n let discountTotal = 0;\n this.transactionDocument.currentTransactionDetails.transactionDiscount.forEach((discount: { discountAmount: number; }) => {\n discountTotal += discount.discountAmount;\n });\n this.transactionDocument.currentTransactionDetails.basketSummary.discountTotal = Math.abs(discountTotal);\n } else {\n this.transactionDocument.currentTransactionDetails.basketSummary.discountTotal = 0;\n }\n }\n\n console.log(\"ebasket:this.transactionDocument.currentTransactionDetails\", JSON.stringify(this.transactionDocument.currentTransactionDetails));\n return this;\n }\n\n\n /**\n * current transaction Tax Total\n * @returns Tax Total\n */\n\n updateCurrentTransactionDetailsTaxBreakdown(basketDetails: Basket): TransactionDocumentBuilder {\n let transactionDiscountTotal = 0;\n let taxBreakdown: TaxBreakdown = {\n taxLines: [],\n totalTaxableAmount: 0,\n };\n\n if (this.transactionDocument.currentTransactionDetails.transactionDiscount && this.transactionDocument.currentTransactionDetails.transactionDiscount.length > 0) {\n this.transactionDocument.currentTransactionDetails.transactionDiscount.forEach((discount: { discountAmount: number; }) => {\n transactionDiscountTotal += discount.discountAmount;\n });\n }\n\n if (this.transactionDocument.currentTransactionDetails.products && this.transactionDocument.currentTransactionDetails.products.length > 0) {\n this.transactionDocument.currentTransactionDetails.products.forEach((product: { itemLineId: any; selectedVAT: any; selectedVATCode: any; total: any; refundedQuantity: number; itemDiscounts: { currentRefundPortion: number; trnDiscountsPortion: number; trnPromotionsPortion: number; }; }) => {\n let taxLine: TaxLine = {\n itemLineId: product.itemLineId,\n VAT: product.selectedVAT ? product.selectedVAT : 0,\n VATCode: product.selectedVATCode,\n taxLineTotal: 0,\n taxableAmount: product.total,\n PreTax: 0\n\n };\n console.info(\"Product contribution : item line ID :current transaction Details\",\n product.itemLineId, \"tax line :\", JSON.stringify(taxLine), JSON.stringify(basketDetails.basketTotal));\n\n //step 1\n // if Transaction Discount and/or promotion applied, find net selling price of each product as taxableamount\n\n //If transaction discount/promotion is applied taxable amount should be deducting transaction promotion and transaction disacount portion\n if (product.refundedQuantity && product.refundedQuantity > 0) {\n\n taxLine.taxableAmount = -Math.abs(taxLine.taxableAmount - product.itemDiscounts.currentRefundPortion);\n } else {\n taxLine.taxableAmount = taxLine.taxableAmount - product.itemDiscounts.trnDiscountsPortion - product.itemDiscounts.trnPromotionsPortion;\n }\n\n //step 2 - find pre tax\n taxLine.PreTax = this.numberUtilService.trimTo2Decimal2((taxLine.taxableAmount * 100) / (100 + taxLine.VAT));\n\n //step 3 - Update taxbreakdown\n taxBreakdown.totalTaxableAmount += taxLine.taxableAmount;\n taxLine.taxableAmount = this.numberUtilService.trimTo2Decimal2(taxLine.taxableAmount);\n \n // step 4 - update tax Line total\n taxLine.taxLineTotal = this.numberUtilService.trimTo2Decimal2(taxLine.taxableAmount - taxLine.PreTax);\n taxBreakdown.taxLines.push(taxLine);\n });\n }\n\n taxBreakdown.totalTaxableAmount = this.numberUtilService.trimTo2Decimal2(taxBreakdown.totalTaxableAmount);\n this.transactionDocument.currentTransactionDetails.taxBreakdown = taxBreakdown;\n if (this.transactionDocument.currentTransactionDetails.taxBreakdown && this.transactionDocument.currentTransactionDetails.taxBreakdown.taxLines && this.transactionDocument.currentTransactionDetails.taxBreakdown.taxLines.length > 0) {\n this.transactionDocument.currentTransactionDetails.basketSummary.VATTotal = this.numberUtilService.trimTo2Decimal2(this.transactionDocument.currentTransactionDetails.taxBreakdown.taxLines.reduce(\n (n: any, { taxLineTotal }: any) => n + taxLineTotal,\n 0\n ));\n }\n else {\n this.transactionDocument.currentTransactionDetails.basketSummary.VATTotal = 0.00;\n }\n\n console.log(\"eBasket:after calculating tax currenttransactionDetails\", this.transactionDocument.currentTransactionDetails)\n return this;\n }\n\n updateCurrentTransactionDetailsTotalTaxSummary(): TransactionDocumentBuilder {\n \n console.log(\"Total Tax Summery Request :\", JSON.stringify(this.transactionDocument.currentTransactionDetails.taxBreakdown));\n\n let totalTaxSummaryArray: TotalTaxSummary[] = []\n let totalTaxSummaryGroup = []\n\n console.log(\"Tax Lines for Total Tax Summery :\", JSON.stringify(this.transactionDocument.currentTransactionDetails.taxBreakdown.taxLines));\n\n this.transactionDocument.currentTransactionDetails.taxBreakdown.taxLines.forEach((element: { VATCode: any; VAT: any; PreTax: any; taxLineTotal: any; }) => {\n let TaxSummary: TotalTaxSummary = {\n VATCode:\"\",\n VAT: -12345,\n PreTaxSum: 0,\n TaxSum: 0,\n TXrateSum: 0\n };\n TaxSummary.VATCode=element.VATCode;\n TaxSummary.VAT = element.VAT; \n \n TaxSummary.PreTaxSum = this.numberUtilService.trimTo2Decimal2(element.PreTax); \n TaxSummary.TaxSum = this.numberUtilService.trimTo2Decimal2(element.taxLineTotal);\n TaxSummary.TXrateSum = this.numberUtilService.trimTo2Decimal2(TaxSummary.PreTaxSum + TaxSummary.TaxSum); \n totalTaxSummaryArray.push(TaxSummary);\n })\n\n console.log(\"Total Tax Summery Without Grouped : \", JSON.stringify(totalTaxSummaryArray));\n \n totalTaxSummaryGroup = totalTaxSummaryArray.reduce((preparedArray:any,currentObj:any) => {\n let ind = preparedArray.findIndex((x: { VAT: any; }) => x.VAT === currentObj.VAT);\n if(ind === -1){\n preparedArray.push(currentObj)\n }else {\n preparedArray[ind].VATCode = currentObj.VATCode;\n preparedArray[ind].VAT = currentObj.VAT;\n preparedArray[ind].PreTaxSum += currentObj.PreTaxSum;\n preparedArray[ind].TaxSum += currentObj.TaxSum;\n preparedArray[ind].TXrateSum += currentObj.TXrateSum;\n }\n return preparedArray;\n },[])\n // listOfTags.map(x => unique.filter(a => a.label == x.label && a.color == x.color).length > 0 ? null : unique.push(x));\n\n console.log(\"Total Tax Summer Group :\", JSON.stringify(totalTaxSummaryGroup));\n\n this.transactionDocument.currentTransactionDetails.totalTaxSummary = totalTaxSummaryGroup;\n return this;\n\n }\n\n /**\n * current transaction Disocunt Total\n * @returns Discount Total\n */\n updateCurrentTransactionDetailsDiscountTotal() {\n let refundTotal = this.transactionDocument.currentTransactionDetails.basketSummary.refundTotal ? this.transactionDocument.currentTransactionDetails.basketSummary.refundTotal : 0;\n\n console.log(\"e-basket: transaction builder updateCurrentTransactionDetailsDiscountTotal: discountTotal\", refundTotal, this.transactionDocument.currentTransactionDetails.basketSummary.basketTotal, this.transactionDocument.currentTransactionDetails.basketSummary.saleTotal);\n const discountTotal =\n Math.abs(\n Math.abs(this.transactionDocument.currentTransactionDetails.basketSummary.saleTotal) -\n (Math.abs(this.transactionDocument.currentTransactionDetails.basketSummary.basketTotal) + Math.abs(refundTotal))\n );\n console.log(\"e-basket: transaction builder updateCurrentTransactionDetailsDiscountTotal: discountTotal\", discountTotal)\n return Number(discountTotal.toFixed(2));\n }\n\n /**\n * current transaction Refund Total\n * @returns Refund Total\n */\n updateCurrentTransactionDetailsRefundTotal() {\n let totalRefund = 0;\n for (let index = 0; index < this.transactionDocument.currentTransactionDetails.products.length; index++) {\n const product: Product = this.transactionDocument.currentTransactionDetails.products[index];\n if (product.refundedTotal) {\n totalRefund = totalRefund + product.refundedTotal;\n }\n console.log(\"ebasket : transaction Service: totalRefund for Current TransactionDetails\" + totalRefund)\n }\n return totalRefund;\n }\n\n\n\n /**\n * Baskets summary\n * @param basketDetails\n * @returns summary\n */\n basketSummary(basketDetails: Basket): TransactionDocumentBuilder {\n this.transactionDocument.basketSummary.basketTotal = this.numberUtilService.trimTo2Decimal(basketDetails.basketTotal);\n\n this.transactionDocument.basketSummary.saleTotal = this.numberUtilService.trimTo2Decimal2(this.updateSaleTotal(\n basketDetails\n ));\n this.transactionDocument.basketSummary.refundTotal = this.getRefundTotal();\n if (\n this.transactionDocument.basket.lineDiscount ||\n this.transactionDocument.basket.linePromotion\n ) {\n this.transactionDocument.basketSummary.discountTotal = this.numberUtilService.trimTo2Decimal2(this.updateDiscountTotal());\n }\n this.transactionDocument.basketSummary.totalItems = basketDetails.quantity;\n\n\n if (this.transactionDocument.basket.taxBreakdown) {\n this.transactionDocument.basketSummary.VATTotal = this.numberUtilService.trimTo2Decimal2(this.transactionDocument.basket.taxBreakdown.taxLines.reduce(\n (n: any, { taxLineTotal }: any) => n + taxLineTotal,\n 0\n ));\n }\n else {\n this.transactionDocument.basketSummary.VATTotal = 0.00;\n }\n\n console.info(\"ebasket: basketsummary updated in transaction document: \", JSON.stringify(this.transactionDocument.basketSummary));\n return this;\n }\n\n /**\n * Line Discount\n * @param basketDetails\n * @returns line Discount\n */\n lineDiscount(basketDetails: Basket): TransactionDocumentBuilder {\n this.transactionDocument.basket.lineDiscount = [];\n for (let index = 0; index < basketDetails.products.length; index++) {\n const element = basketDetails.products[index];\n if (element.lineDiscount) {\n this.transactionDocument.basket.lineDiscount.push(element.lineDiscount);\n this.transactionDocument.basket.lineDiscount = this.transactionDocument.basket.lineDiscount.reduce(\n (acc: any[], val: { itemLineId: any; }) => {\n if (!acc.find((el: { itemLineId: any; }) => el.itemLineId === val.itemLineId)) {\n acc.push(val);\n }\n return acc;\n },\n []\n );\n }\n\n // console.info(\n // \"e-basket :line discount updated in transaction document\",\n // this.transactionDocument.basket.lineDiscount\n // );\n }\n return this;\n }\n\n /**\n * exchange\n * @param basketDetails\n * @returns exchange \n */\n exchange(basketDetails: Basket): TransactionDocumentBuilder {\n this.transactionDocument.basket.exchange = basketDetails.exchange && basketDetails.exchange.length > 0 ? [...basketDetails.exchange] : [];\n for (let index = 0; index < basketDetails.products.length; index++) {\n\n const element: any = basketDetails.products[index];\n if (element.exchange != undefined) {\n const isPresent = this.transactionDocument.basket.exchange.some((el: { exchangeId: any; }) => el.exchangeId === element.exchange.exchangeId);\n if (!isPresent) {\n let exchangeItems = [];\n for (let j = 0; j < element.exchange.newItems.length; j++) {\n const item = element.exchange.newItems[j];\n let newItems: any = { lineItemId: item.itemLineId, Quantity: item.quantity }\n exchangeItems.push(newItems);\n }\n element.exchange.newItems = [...exchangeItems];\n this.transactionDocument.basket.exchange.push(element.exchange);\n }\n }\n console.log(\n \"e-basket :TransactionDocumentBuilder: this.transactionDocument.basket exchange\",\n JSON.stringify(this.transactionDocument.basket.exchange)\n );\n }\n\n return this;\n }\n\n /**\n * add previous exchange data\n * @param originalTransactionDocument\n * @returns line Promotions\n */\n addExchangeData(originalTransactionDocument: TransactionDocument): TransactionDocumentBuilder {\n this.transactionDocument.basket.exchange = originalTransactionDocument.basket.exchange ? [...originalTransactionDocument.basket.exchange] : null;\n return this;\n }\n\n /**\n * line Promotions\n * @param basketDetails\n * @returns line Promotions\n */\n linePromotion(basketDetails: Basket): TransactionDocumentBuilder {\n this.transactionDocument.basket.linePromotion = [];\n for (let index = 0; index < basketDetails.products.length; index++) {\n const element = basketDetails.products[index];\n if (element.linePromotions) {\n this.transactionDocument.basket.linePromotion.push(\n element.linePromotions\n );\n this.transactionDocument.basket.linePromotion = this.transactionDocument.basket.linePromotion.reduce(\n (acc: any[], val: { itemLineId: any; }) => {\n if (!acc.find((el: { itemLineId: any; }) => el.itemLineId === val.itemLineId)) {\n acc.push(val);\n }\n return acc;\n },\n []\n );\n }\n }\n return this;\n }\n\n /**\n * transaction Promotion\n * @param basketDetails\n * @returns transaction Promotion\n */\n transactionPromotion(basketDetails: Basket): TransactionDocumentBuilder {\n if (basketDetails.transactionPromotion) {\n this.transactionDocument.basket.transactionPromotion =\n basketDetails.transactionPromotion;\n // for (let index = 0; index < basketDetails.TransactionDiscount.length; index++) {\n // this.transactionDocument.basket.transactionPromotion.push(element.linePromotions)\n // this.transactionDocument.basket.transactionPromotion = this.transactionDocument.basket.linePromotions.reduce((acc, val) => {\n // if (!acc.find(el => el.itemLineId === val.itemLineId)) {\n // acc.push(val);\n // }\n // return acc;\n // }, []);\n // }\n console.log(\n \"e-basket :TransactionDocumentBuilder: this.transactionDocument.basket.transactionPromotion\",\n JSON.stringify(this.transactionDocument.basket.transactionPromotion)\n );\n }\n return this;\n }\n\n transactionDiscount(basketDetails: Basket): TransactionDocumentBuilder {\n if (basketDetails.transactionDiscount) {\n this.transactionDocument.basket.transactionDiscount =\n basketDetails.transactionDiscount;\n\n console.log(\n \"e-basket :TransactionDocumentBuilder: transaction Discount\",\n JSON.stringify(this.transactionDocument.basket.transactionDiscount)\n );\n }\n return this;\n }\n\n /**\n * Payments details\n * @param paymentDetails\n * @returns\n */\n paymentDetails(paymentDetails: any) {\n console.info(\"ebasket : payment details after transaction completed\",JSON.stringify(paymentDetails));\n \n this.transactionDocument.paymentDetails = paymentDetails;\n return this;\n }\n\n\n /**\n * Payments details\n * @param paymentDetails\n * @returns\n */\n splitPayment(splitPayment: boolean) { \n this.transactionDocument.splitPayment = splitPayment;\n return this;\n } \n\n /**\n * Payments details\n * @param paymentDetails\n * @returns\n */\n isPaymentCompleted(isPaymentCompleted: boolean) {\n this.transactionDocument.isPaymentCompleted = isPaymentCompleted;\n return this;\n } \n \n\n\n\n /**\n * Bases currency\n * @param currency\n * @returns currency\n */\n baseCurrency(currency: any): TransactionDocumentBuilder {\n this.transactionDocument.baseCurrency = currency;\n return this;\n }\n\n /**\n * gift option at\n * @returns at\n */\n giftOption(gift: any): TransactionDocumentBuilder {\n console.log(\n \"e-basket :TransactionDocumentBuilder: this.transactionDocument.giftoption\",\n gift\n );\n if (gift) {\n this.transactionDocument.giftedReceipt = gift;\n }\n return this;\n }\n /**\n\n/**\n * manual Discount\n * @param discountData\n * @returns\n */\n\n // manualDiscount(discountData : basketDiscount):TransactionDocumentBuilder {\n // let saleTotal = this.transactionDocument.basketSummary.basketTotal;\n // if(discountData.discountType =='Percent'){\n // this.transactionDocument.basketSummary.basketTotal = saleTotal-(saleTotal*(discountData.discountAmount/100));\n // discountData.discountAmount = -1*(saleTotal-this.transactionDocument.basketSummary.basketTotal);\n // }else {\n // this.transactionDocument.basketSummary.basketTotal =saleTotal-discountData.discountAmount;\n // discountData.discountAmount = -1*discountData.discountAmount;\n // }\n // this.transactionDocument.transactionDiscount.push(discountData);\n // return this;\n\n // }\n\n /**\n * Types transaction document builder\n * @param t\n * @returns type\n */\n type(t: any): TransactionDocumentBuilder {\n this.transactionDocument.type = t;\n return this;\n }\n /**\n * Operations status\n * @param o\n * @returns status\n */\n operationStatus(o: any): TransactionDocumentBuilder {\n this.transactionDocument.operationStatus = o;\n return this;\n }\n /**\n * Created at\n * @returns at\n */\n createdAt(): TransactionDocumentBuilder {\n const date = new Date();\n this.transactionDocument.createdAt = date.toISOString();\n this.transactionDocument.updatedAt = date.toISOString();\n return this;\n }\n /**\n * Updated at\n * @returns at\n */\n updatedAt(): TransactionDocumentBuilder {\n const date = new Date();\n this.transactionDocument.updatedAt = date.toISOString();\n return this;\n }\n /**\n * transsaction completion at\n * @returns transaction completion date\n */\n transactionCompletedAt(): TransactionDocumentBuilder {\n const date = new Date();\n this.transactionDocument.transCompletedAt = date.toISOString();\n return this;\n }\n /**\n * Builds transaction document builder\n * @returns build\n */\n build(): TransactionDocument {\n return this.transactionDocument;\n }\n\n /**\n * Sales total in refund\n * @param saleTotal\n * @returns total in refund\n */\n saleTotalInRefund(saleTotal: number): TransactionDocumentBuilder {\n this.transactionDocument.saleTotal = saleTotal;\n return this;\n }\n\n /**\n * Gets basket details\n * @returns basket details\n */\n getBasketDetails(): Basket {\n console.info(\"ebasket: Getting Basket for transactionDocument\", JSON.stringify(this.transactionDocument));\n\n let basket: Basket = {\n subsidiaryId : this.transactionDocument.subsidiaryId,\n transactionDiscount: this.transactionDocument.basket.transactionDiscount,\n transactionPromotion: this.transactionDocument.basket.transactionPromotion,\n transactionId: this.transactionDocument.transactionId,\n offlineTransactionId: this.transactionDocument.offlineTransactionId,\n total: this.transactionDocument.basketSummary.basketTotal,\n basketTotal: this.transactionDocument.basketSummary.basketTotal,\n discountTotal: this.transactionDocument.basketSummary.discountTotal,\n saleTotal: this.transactionDocument.basketSummary.saleTotal,\n refundTotal: this.transactionDocument.basketSummary.refundTotal,\n quantity: this.transactionDocument.basketSummary.totalItems,\n products: [],\n baseCurrency: this.transactionDocument.baseCurrency,\n customer: this.transactionDocument.customer,\n };\n\n basket.products = [] as Product[];\n this.transactionDocument.basket.products.forEach((product: { SKU: any; barCode: any; barcodes: any; description: any; imageUrls: any; totalLinePrice: any; itemLineId: any; excludePromotion: any; price: any; quantity: any; selectedRRPPrice: any; fullfilmentId: any; fullfilmentLocationName: any; deliveryGroup: string; leadTime: any; deliveryMethod: any; giftCard: any; giftCardExpiryDate: any; giftCardNumberIssued: any; giftCardRecipientEmail: any; giftCardRecipientName: any; refundedTotal: any; refundedQuantity: number; refundedReasonDescription: any; refundedReason: any; refundedPromotionalQuantity: any; isLastExchanged: any; }, index: any) => {\n console.log(JSON.stringify(product), \"ebasket: basket detail update in basket\");\n const p = {} as any;\n p.SKU = product.SKU;\n p.barcode = product.barCode;\n p.barcodes = product.barcodes;\n\n p.description = product.description;\n p.imageUrls = product.imageUrls;\n p.currency = this.transactionDocument.baseCurrency;\n p.totalLinePrice = product.totalLinePrice;\n p.itemLineId = Number(product.itemLineId);\n p.excludePromotion = product.excludePromotion;\n\n p.selectedPrice = product.price;\n p.quantity = product.quantity;\n p.total = product.totalLinePrice;\n p.selectedRRPPrice = product.selectedRRPPrice;\n\n p.fullfilmentId = product.fullfilmentId;\n p.fullfilmentLocationName = product.fullfilmentLocationName;\n p.deliveryGroup = product.deliveryGroup || \"1\";\n p.leadTime = product.leadTime;\n p.deliveryMethod = product.deliveryMethod || DELIVERY_METHODS.COLLECT_FROM_STORE.toString();\n\n if(p.fullfilmentId != this.transactionDocument.storeId)\n {\n p.isWebOrder = true;\n }\n \n p.giftCard = product.giftCard;\n p.giftCardExpiryDate = product.giftCardExpiryDate;\n p.giftCardNumberIssued = product.giftCardNumberIssued;\n p.giftCardRecipientEmail = product.giftCardRecipientEmail;\n p.giftCardRecipientName = product.giftCardRecipientName;\n \n if (\n this.transactionDocument.basket.lineDiscount &&\n this.transactionDocument.basket.lineDiscount.length > 0\n ) {\n this.transactionDocument.basket.lineDiscount.forEach((lineDiscount: { itemLineId: { toString: () => any; }; discountedLinePrice: any; }) => {\n if (product.itemLineId === lineDiscount.itemLineId.toString()) {\n p.lineDiscount = lineDiscount;\n p.total = lineDiscount.discountedLinePrice;\n }\n });\n }\n\n if (\n this.transactionDocument.basket.linePromotion &&\n this.transactionDocument.basket.linePromotion.length > 0\n ) {\n this.transactionDocument.basket.linePromotion.forEach((linePromotion: { itemLineId: { toString: () => any; }; promotionLinePrice: any; }) => {\n if (product.itemLineId === linePromotion.itemLineId.toString()) {\n p.linePromotions = linePromotion;\n p.total = linePromotion.promotionLinePrice;\n }\n });\n }\n\n if (\n this.transactionDocument.basket.taxBreakdown &&\n this.transactionDocument.basket.taxBreakdown.taxLines.length > 0\n ) {\n this.transactionDocument.basket.taxBreakdown.taxLines.forEach((taxLine: { itemLineId: { toString: () => any; }; VAT: any; VATCode: any; }) => {\n if (product.itemLineId && product.itemLineId === taxLine.itemLineId.toString()) {\n p.selectedVAT = taxLine.VAT;\n p.selectedVATCode = taxLine.VATCode;\n }\n });\n }\n\n if (this.transactionDocument.type === TRANSACTION_TYPE.REFUND) {\n p.total = product.refundedTotal;\n } else if ((this.transactionDocument.type === TRANSACTION_TYPE.SALE_REFUND || TRANSACTION_TYPE.SALE_EXCHANGE) && product.refundedQuantity > 0) {\n p.refundedReasonDescription = product.refundedReasonDescription;\n p.refundedReason = product.refundedReason;\n if (!p.refundedReasonDescription) {\n p.refundedReasonDescription = p.refundedReason;\n }\n p.refundedQuantity = product.refundedQuantity;\n p.refundPromotionalQuantity = product.refundedPromotionalQuantity;\n p.refundedTotal = product.refundedTotal;\n p.total -= Math.abs(p.refundedTotal);\n p.isLastExchanged = product.isLastExchanged;\n }\n\n if (this.transactionDocument.type === TRANSACTION_TYPE.REFUND) {\n if (p.total > 0) {\n p.total *= -1;\n }\n }\n\n basket.products.push(p);\n\n });\n\n basket = this.getTransactionDiscountAndTransactionPromotionPortion(basket);\n basket.total = (basket.basketTotal || 0) + this.getTotalDiscountWithTransactionDiscountsAndPromotions(basket);\n if (this.transactionDocument.type === TRANSACTION_TYPE.SALE_REFUND) {\n basket.quantity = this.getRefundedTotalWithQuantity(basket);\n }\n console.info(\"ebasket: Basket created successfully\", JSON.stringify(basket))\n return basket;\n }\n\n /**\n * Gets basket details\n * @returns refund basket details\n */\n // getRefundBasketDetails(): Basket {\n // let basket: Basket = {\n // subsidiaryId : this.transactionDocument.subsidiaryId,\n // transactionDiscount: this.transactionDocument.basket.transactionDiscount,\n // transactionPromotion: this.transactionDocument.basket.transactionPromotion,\n // transactionId: this.transactionDocument.transactionId,\n // total: this.transactionDocument.basketSummary.basketTotal,\n // basketTotal: this.transactionDocument.basketSummary.basketTotal,\n // discountTotal: this.transactionDocument.basketSummary.discountTotal,\n // saleTotal: this.transactionDocument.basketSummary.saleTotal,\n // quantity: this.transactionDocument.basketSummary.totalItems,\n // products: [],\n // baseCurrency: this.transactionDocument.baseCurrency,\n // customer: this.transactionDocument.customer,\n // };\n\n // basket.products = [] as Product[];\n // this.transactionDocument.basket.products.forEach((product: { SKU: any; barCode: any; barcodes: any; description: any; imageUrls: any; totalLinePrice: any; itemLineId: any; excludePromotion: any; price: number; quantity: any; selectedRRPPrice: any; fullfilmentId: any; fullfilmentLocationName: any; deliveryGroup: string; leadTime: any; deliveryMethod: any; giftCard: any; giftCardExpiryDate: any; giftCardNumberIssued: any; giftCardRecipientEmail: any; giftCardRecipientName: any; itemDiscounts: any; refundedPromotionalQuantity: any; refundedQuantity: number; refunded: any; isLastExchanged: any; exchange: any; refundedTotal: number; }, index: any) => {\n // const p = {} as Product;\n // p.SKU = product.SKU;\n // p.barcode = product.barCode;\n // p.barcodes = product.barcodes;\n\n // p.description = product.description;\n // p.imageUrls = product.imageUrls;\n // p.currency = this.transactionDocument.baseCurrency;\n // p.totalLinePrice = product.totalLinePrice;\n // p.itemLineId = Number(product.itemLineId);\n // p.excludePromotion = product.excludePromotion;\n\n // p.selectedPrice = product.price;\n // p.quantity = product.quantity;\n // p.total = product.totalLinePrice;\n // p.selectedRRPPrice = product.selectedRRPPrice;\n\n // p.fullfilmentId = product.fullfilmentId;\n // p.fullfilmentLocationName = product.fullfilmentLocationName;\n // p.deliveryGroup = product.deliveryGroup || \"1\";\n // p.leadTime = product.leadTime;\n // p.deliveryMethod = product.deliveryMethod || DELIVERY_METHODS.COLLECT_FROM_STORE.toString();\n\n // p.giftCard = product.giftCard;\n // p.giftCardExpiryDate = product.giftCardExpiryDate;\n // p.giftCardNumberIssued = product.giftCardNumberIssued;\n // p.giftCardRecipientEmail = product.giftCardRecipientEmail;\n // p.giftCardRecipientName = product.giftCardRecipientName;\n \n \n // if(p.fullfilmentId != this.transactionDocument.storeId)\n // {\n // p.isWebOrder = true;\n // }\n \n // if (product.itemDiscounts) {\n // p.itemDiscounts = product.itemDiscounts as ItemDiscount;\n // }\n\n // // if(!p.itemDiscounts){\n // // console.log(p.itemDiscounts);\n\n // // this.basketService.transactionDiscountAndPromotionProductortionCalculation(basket);\n // // }\n // p.refundPromotionalQuantity = product.refundedPromotionalQuantity ? product.refundedPromotionalQuantity : 0;\n\n // if (product.refundedQuantity) {\n // p.quantity = p.quantity - product.refundedQuantity;\n // p.totalLinePrice = (p.quantity * product.price);\n // p.total = p.totalLinePrice;\n // // p.refundPromotionalQuantity = product.refundedPromotionalQuantity;\n // p.refunded = product.refunded;\n // p.isLastExchanged = product.isLastExchanged;\n // }\n // if (product.exchange) {\n // p.exchange = product.exchange;\n // }\n\n // if (\n // this.transactionDocument.basket.lineDiscount &&\n // this.transactionDocument.basket.lineDiscount.length > 0\n // ) {\n\n // this.transactionDocument.basket.lineDiscount.forEach((lineDiscount: { itemLineId: { toString: () => any; }; discountedLinePrice: any; }) => {\n\n // if (product.itemLineId === lineDiscount.itemLineId.toString() && product.refundedQuantity > 0) {\n // p.lineDiscount = Object.assign({}, lineDiscount);\n // p.lineDiscount.discountedLinePrice = p.lineDiscount.unitPrice * p.quantity\n // p.lineDiscount.discountAmount = p.total - p.lineDiscount.discountedLinePrice\n // p.total = p.lineDiscount.discountedLinePrice;\n // } else if (product.itemLineId === lineDiscount.itemLineId.toString()) {\n // p.lineDiscount = lineDiscount;\n // p.total = lineDiscount.discountedLinePrice\n // }\n // });\n // }\n\n // if (\n // this.transactionDocument.basket.linePromotion &&\n // this.transactionDocument.basket.linePromotion.length > 0\n // ) {\n // this.transactionDocument.basket.linePromotion.forEach((linePromotion: { itemLineId: { toString: () => any; }; refunded: any; }) => {\n // if (product.itemLineId === linePromotion.itemLineId.toString() && !linePromotion.refunded) {\n // p.linePromotions = linePromotion;\n // p.total = p.linePromotions.promotionLinePrice;\n // p.total = p.total - (product.refundedTotal ? Math.abs(product.refundedTotal) : 0);\n // }\n // });\n // }\n\n // p.refundedQuantity = 0;\n // p.refundedTotal = 0;\n\n // if (\n // this.transactionDocument.basket.taxBreakdown &&\n // this.transactionDocument.basket.taxBreakdown.taxLines.length > 0\n // ) {\n // this.transactionDocument.basket.taxBreakdown.taxLines.forEach((taxLine: { itemLineId: { toString: () => any; }; VAT: any; VATCode: any; }) => {\n // if (product.itemLineId === taxLine.itemLineId.toString()) {\n // p.selectedVAT = taxLine.VAT;\n // p.selectedVATCode = taxLine.VATCode;\n // }\n // });\n // }\n\n // if (p.quantity > 0) {\n // basket.products.push(p);\n // }\n // });\n // // product.itemDiscounts\n // if (!basket.products[0].hasOwnProperty('itemDiscounts')) {\n // basket = this.getTransactionDiscountAndTransactionPromotionPortion(basket);\n\n // }\n\n // console.log(\"ebasket : TransactionDocumentBuilder :new created refunded basket\", JSON.stringify(basket))\n // basket.quantity = basket.products.reduce(\n // (n: any, { quantity }: any) => n + quantity,\n // 0\n // );\n // basket.total = this.getTotalWithLineDiscountAndLinePromotionApplied(basket);\n // basket.basketTotal = basket.total;\n // basket.basketTotal = basket.basketTotal - this.getTotalDiscountWithTransactionDiscountsAndPromotions(basket);\n // console.log(\n // \"ebasket : TransactionDocumentBuilder : update Basket Total: after promotion :basketTotal\",\n // basket.basketTotal\n // );\n\n // console.log(\n // \"e:basket :TransactionDocumentBuilder : basketDetails updated values\",\n // JSON.stringify(basket)\n // );\n // return basket;\n // }\n\n\n getTransactionDiscountAndTransactionPromotionPortion(basket:any) {\n if (\n basket.transactionDiscount &&\n basket.transactionDiscount.length > 0\n ) {\n basket.transactionDiscount.forEach((discount: { itemLineIds: any; }) => {\n if (!discount.itemLineIds) {\n discount.itemLineIds = basket.products.map((product: { itemLineId: any; }) => {\n return product.itemLineId\n });\n }\n basket = this.basketService.transactionDiscountProductPortionCalc(basket, discount);\n });\n }\n if (\n basket.transactionPromotion &&\n basket.transactionPromotion.length > 0\n ) {\n basket.transactionPromotion.forEach((tPromotion: { itemLineIds: any; }) => {\n if (!tPromotion.itemLineIds) {\n const filteredData = basket.products.filter(\n (item: { excludePromotion: boolean; }) => {\n return item.excludePromotion === false;\n });\n\n tPromotion.itemLineIds =\n filteredData.map((product: { itemLineId: any; }) => {\n return product.itemLineId\n });\n }\n basket = this.basketService.transactionPromotionProductPortionCalc(basket, tPromotion);\n });\n }\n\n return basket;\n }\n\n\n getTotalDiscountWithTransactionDiscountsAndPromotions(basketDetails: any) {\n\n let discountTotal = 0;\n if (\n basketDetails.transactionPromotion &&\n basketDetails.transactionPromotion.length > 0\n ) {\n discountTotal += basketDetails.transactionPromotion.reduce(\n (n: any, { promotionAmount }: any) => n + promotionAmount,\n 0\n );\n }\n if (\n basketDetails.transactionDiscount &&\n basketDetails.transactionDiscount.length > 0\n ) {\n\n discountTotal += basketDetails.transactionDiscount.reduce(\n (n: any, { discountAmount }: any) => n + discountAmount,\n 0\n );\n\n\n }\n console.log(\"ebasket : TransactionDocumentBuilder : Transaction discount Total:\", discountTotal);\n\n return discountTotal;\n }\n\n\n appendCurrencySymbol(currency: number, value: number) {\n // value=this.decimalpipe.transform(value,'1.2');\n if (value >= 0) {\n const returnval = currency + value;\n console.log(returnval, \"ebasket: add currency with value\");\n return returnval;\n } else {\n const returnval = \"-\" + (currency + value * -1);\n console.log(returnval, \"-(currency+(value*-1))\");\n return returnval;\n }\n }\n\n // /**\n // * Updates total refund\n // * @returns total refund\n // */\n // updateTotalRefund(): TransactionDocumentBuilder {\n // this.transactionDocument.basket.products.forEach((product) => {\n // product.refundedQuantity = product.quantity;\n // product.refundedTotal = product.totalLinePrice * -1;\n // console.log(\n // \"ebasket: Transaction price override :\",\n // this.transactionDocument.basket.lineDiscount\n // );\n\n // if (\n // this.transactionDocument.basket.linePromotion &&\n // this.transactionDocument.basket.linePromotion.length > 0\n // ) {\n // this.transactionDocument.basket.linePromotion.forEach((linePromotion) => {\n // console.log(\n // \"Promotion: basket linePromotion : \",\n // this.transactionDocument.basket.linePromotion\n // );\n // console.log(\n // \"linePromotion.itemLineId.toString() : \",\n // linePromotion.itemLineId.toString()\n // );\n // console.log(\n // \"condition : \" +\n // (product.itemLineId === linePromotion.itemLineId.toString())\n // );\n\n // if (product.itemLineId === linePromotion.itemLineId.toString()) {\n // product.refundedTotal =\n // linePromotion.promotionLinePrice * -1;\n // }\n // });\n // } else\n // if (\n // this.transactionDocument.basket.lineDiscount &&\n // this.transactionDocument.basket.lineDiscount.length > 0\n // ) {\n // this.transactionDocument.basket.lineDiscount.forEach((lineDiscount) => {\n // console.log(\n // \"product.itemLineId : \" +\n // this.transactionDocument.basket.lineDiscount\n // );\n // console.log(\n // \"lineDiscount.itemLineId.toString() : \" +\n // lineDiscount.itemLineId.toString()\n // );\n // console.log(\n // \"condition : \" +\n // (product.itemLineId === lineDiscount.itemLineId.toString())\n // );\n\n // if (product.itemLineId === lineDiscount.itemLineId.toString()) {\n // product.refundedTotal = lineDiscount.unitPrice * product.refundedQuantity * -1;\n // }\n // });\n // }\n\n // console.log(\"Product description :\" + product.description);\n // console.log(\"Product total :\" + product.refundedTotal);\n // // product.displayrefundedamount=this.appendCurrencySymbol(CURRENCY[this.transactionDocument.baseCurrency],product.refundedTotal);\n // // console.log(product.displayrefundedamount,\"displayrefundedamount\");\n // product.refunded = true;\n // });\n // const baskettotal = (this.transactionDocument.basketSummary.basketTotal *= -1);\n // // this.transactionDocument.basketSummary.displaybaskettotal=this.appendCurrencySymbol(CURRENCY[this.transactionDocument.baseCurrency], baskettotal);\n // const saletotal = (this.transactionDocument.basketSummary.saleTotal *= -1);\n // // this.transactionDocument.basketSummary.displaysaletotal = this.appendCurrencySymbol(CURRENCY[this.transactionDocument.baseCurrency], saletotal);\n // (this.transactionDocument.basketSummary.VATTotal *= -1);\n // return this;\n // }\n\n /**\n * Sale Total\n * @param basketDetails\n * @returns Sale Total\n */\n updateSaleTotal(basketDetails: { products: any[]; }) {\n const saleTotal = basketDetails.products.reduce(\n (n: any, { totalLinePrice }: any) => n + totalLinePrice,\n 0\n );\n return saleTotal\n }\n\n getTotalWithLineDiscountAndLinePromotionApplied(basketDetails: { products: any; }): number {\n let saletotal: number = 0.0;\n for (let product of basketDetails.products) {\n // if (product.linePromotions) {\n // saletotal += product.linePromotions.promotionLinePrice;\n // } else if (\n // product.lineDiscount &&\n // !product.linePromotions\n // ) {\n // saletotal +=\n // product.quantity * Number(product.lineDiscount.unitPrice.toFixed(2));\n // } else {\n // saletotal +=\n // product.quantity * Number(product.selectedPrice.toFixed(2));\n // }\n saletotal += product.total;\n console.log(\n \"e-basket:update product Total:\" + saletotal,\n JSON.stringify(product)\n );\n }\n return saletotal;\n }\n\n getRefundedTotalWithQuantity(basketDetails: { products: string | any[]; }): number {\n let quantity = 0;\n for (let index = 0; index < basketDetails.products.length; index++) {\n const product: any = basketDetails.products[index];\n\n if (!product.refundedReasonDescription) {\n\n quantity = quantity + product.quantity;\n\n } else {\n quantity = quantity + (product.quantity - product.refundedQuantity);\n\n // basketDetails.total = basketDetails.total + product.refundedTotal;\n\n }\n }\n return quantity;\n\n }\n\n /**\n * Discount Total\n * @returns Discount Total\n */\n updateDiscountTotal() {\n let refundTotal = this.transactionDocument.basketSummary.refundTotal ? this.transactionDocument.basketSummary.refundTotal : 0;\n console.info(\"e-basket: transaction builder: refundTotal\", JSON.stringify(refundTotal),\n JSON.stringify(this.transactionDocument.basketSummary));\n const discountTotal =\n Math.abs(\n Math.abs(this.transactionDocument.basketSummary.saleTotal) -\n (\n Math.abs(this.transactionDocument.basketSummary.basketTotal) + Math.abs(refundTotal)\n )\n );\n console.log(\"e-basket: transaction builder: discountTotal\", JSON.stringify(discountTotal))\n return Number(discountTotal.toFixed(2));\n }\n\n updateReasonCode(reasonCode: {\n code: string;\n name: string;\n }): TransactionDocumentBuilder {\n this.transactionDocument.reasonCode = reasonCode.code;\n this.transactionDocument.reasonDescription = reasonCode.name;\n return this;\n }\n\n updateManagerOverride(\n useroverride: UserOverride\n ): TransactionDocumentBuilder {\n this.transactionDocument.override = useroverride;\n return this;\n }\n\n updateUserID(\n userID: string\n ): TransactionDocumentBuilder {\n this.transactionDocument.userId = userID;\n return this;\n }\n\n updateUserName(name: any) : TransactionDocumentBuilder {\n this.transactionDocument.userName = name;\n return this;\n\n }\n \n addCustomerDetails(customerDetail: Customer): TransactionDocumentBuilder {\n this.transactionDocument.customer = customerDetail;\n return this;\n }\n\n updateTaxBreakdown(basketDetails: Basket): TransactionDocumentBuilder {\n // let transactionDiscountTotal = 0;\n let taxBreakdown: TaxBreakdown = {\n taxLines: [],\n totalTaxableAmount: 0,\n };\n\n\n\n // if (this.transactionDocument.basket.transactionDiscount && this.transactionDocument.basket.transactionDiscount.length > 0) {\n // this.transactionDocument.basket.transactionDiscount.forEach((discount) => {\n // transactionDiscountTotal += discount.discountAmount;\n // });\n // }\n\n // if (this.transactionDocument.basket.transactionPromotion && this.transactionDocument.basket.transactionPromotion.length > 0) {\n // this.transactionDocument.basket.transactionPromotion.forEach(\n // (promotion) => {\n // transactionDiscountTotal += promotion.promotionAmount;\n // }\n // );\n // }\n\n basketDetails.products.forEach((product: any) => {\n let taxLine: TaxLine = {\n itemLineId: product.itemLineId,\n VAT: product.selectedVAT ? product.selectedVAT : 0,\n VATCode: product.selectedVATCode,\n taxLineTotal: 0,\n taxableAmount: product.total,\n PreTax: 0\n };\n console.info(\"Product contribution : item line ID :\", product.itemLineId,\n \"tax line :\", JSON.stringify(taxLine));\n\n // step 1\n // if Transaction Discount and/or promotion applied, find net selling price of each product as taxableamount\n // if (transactionDiscountTotal > 0) {\n product = this.basketService.validateProductItemDiscount(product);\n\n const productContributionInTotal =\n product.itemDiscounts.trnDiscountsPortion +\n product.itemDiscounts.trnPromotionsPortion -\n product.itemDiscounts.refundPortion;\n // tp+td-rp;\n\n console.info(\"Product contribution : item line ID :\", product.itemLineId,\n \"contribution :\", JSON.stringify(productContributionInTotal));\n // calculate net selling price after applying transaction discount as per product contribution\n taxLine.taxableAmount -= productContributionInTotal;\n // }\n\n //step 2 - find pre tax\n taxLine.PreTax = this.numberUtilService.trimTo2Decimal2((taxLine.taxableAmount * 100) / (100 + taxLine.VAT));\n\n //step 3 - Update taxbreakdown\n taxBreakdown.totalTaxableAmount += taxLine.taxableAmount;\n taxLine.taxableAmount = this.numberUtilService.trimTo2Decimal2(taxLine.taxableAmount);\n \n // step 4 - update tax Line total\n taxLine.taxLineTotal = this.numberUtilService.trimTo2Decimal2(taxLine.taxableAmount - taxLine.PreTax);\n taxBreakdown.taxLines.push(taxLine);\n });\n\n taxBreakdown.totalTaxableAmount = this.numberUtilService.trimTo2Decimal2(taxBreakdown.totalTaxableAmount);\n this.transactionDocument.basket.taxBreakdown = taxBreakdown;\n return this;\n }\n\n updateTotalTaxSummary(): TransactionDocumentBuilder {\n\n console.log(\"Total Tax Summery Request :\", JSON.stringify(this.transactionDocument.basket.taxBreakdown));\n\n\n let totalTaxSummaryArray: TotalTaxSummary[] = []\n let totalTaxSummaryGroup = []\n\n console.log(\"Tax Lines for Total Tax Summery :\", JSON.stringify(this.transactionDocument.basket.taxBreakdown.taxLines));\n\n\n this.transactionDocument.basket.taxBreakdown.taxLines.forEach((element: { VATCode: any; VAT: any; PreTax: any; taxLineTotal: any; }) => {\n let TaxSummary: TotalTaxSummary = {\n VATCode: \"\",\n VAT: -12345,\n PreTaxSum: 0,\n TaxSum: 0,\n TXrateSum: 0\n \n };\n TaxSummary.VATCode = element.VATCode;\n TaxSummary.VAT = element.VAT; \n TaxSummary.PreTaxSum = this.numberUtilService.trimTo2Decimal2(element.PreTax);\n TaxSummary.TaxSum = this.numberUtilService.trimTo2Decimal2(element.taxLineTotal);\n TaxSummary.TXrateSum = this.numberUtilService.trimTo2Decimal2(TaxSummary.PreTaxSum + TaxSummary.TaxSum); \n totalTaxSummaryArray.push(TaxSummary);\n })\n\n console.log(\"Total Tax Summery Without Grouped : \", JSON.stringify(totalTaxSummaryArray));\n \n totalTaxSummaryGroup = totalTaxSummaryArray.reduce((preparedArray:any,currentObj) => {\n\n let ind = preparedArray.findIndex((x: { VAT: any; }) => x.VAT === currentObj.VAT);\n if(ind === -1){\n preparedArray.push(currentObj)\n }else {\n preparedArray[ind].VATCode = currentObj.VATCode;\n preparedArray[ind].VAT = currentObj.VAT;\n preparedArray[ind].PreTaxSum += currentObj.PreTaxSum;\n preparedArray[ind].TaxSum += currentObj.TaxSum;\n preparedArray[ind].TXrateSum += currentObj.TXrateSum;\n }\n return preparedArray;\n },[])\n \n console.log(\"Total Tax Summer Group :\",totalTaxSummaryGroup);\n\n\n this.transactionDocument.basket.totalTaxSummary = totalTaxSummaryGroup;\n\n return this;\n\n }\n\n\n /**\n * TransactionId\n * @returns OriginalTransactionId\n */\n addOriginalTransId(tranDoc:TransactionDocument): TransactionDocumentBuilder {\n if (this.transactionDocument.type === TRANSACTION_TYPE.REFUND || this.transactionDocument.type === TRANSACTION_TYPE.SALE_REFUND || this.transactionDocument.type === TRANSACTION_TYPE.SALE_EXCHANGE) {\n this.transactionDocument.originalTransId = tranDoc.transactionId;\n if(tranDoc.apiResponse && tranDoc.apiResponse.internalId)\n {\n this.transactionDocument.originalExternalId = tranDoc.apiResponse.internalId.toString();\n }\n }\n return this;\n }\n\n /**\n * unreferenced Refund\n * @returns boolean value\n */\n addUnreferencedRefund(): TransactionDocumentBuilder {\n this.transactionDocument.unreferencedRefund = true;\n return this;\n }\n\n getRefundTotal() {\n let totalRefund = 0;\n for (let index = 0; index < this.transactionDocument.basket.products.length; index++) {\n const product: TProduct = this.transactionDocument.basket.products[index];\n if (product.refundedTotal) {\n totalRefund = totalRefund + product.refundedTotal;\n }\n console.log(\"ebasket : transaction Service: totalRefund\" + totalRefund)\n }\n return totalRefund;\n }\n\n docId(docId: any): TransactionDocumentBuilder {\n this.transactionDocument.id = docId;\n return this;\n }\n}\n","import { DISCOUNTTYPE, LineDiscount, TProduct, TransactionDiscount, TransactionDocument, TRANSACTION_TYPE } from \"./mapper-library.model\"\nimport { TransactionDocumentBuilder } from \"./TransactionDocumentBuilder\";\nexport class RJMapperBuilderClass {\n\n private transactionDocument: TransactionDocument;\n private deviceId: any;\n private transactionNumber: any;\n private manifestVersion: any;\n private databaseSchemaVersion: any;\n private basketType: any;\n private xmlSchemaVersion: any;\n private majorVersion: any;\n private minorVersion: any;\n private externalState: any;\n private cashierId: any;\n private companyId: any;\n private terminalNumber: any;\n private taxMethodId: any;\n private tradingRegionId: any;\n private basketCurrencyId: any;\n private basketCountryId: any;\n private basketLanguageId: any;\n private itemCount = 0;\n private largestNumber = 0;\n private branchId: any;\n private createdAt: any;\n private updatedAt :any;\n private salesPersonName: any;\n private rjObject: any = {}\n\n constructor(transactionDoc?: TransactionDocument) {\n if (transactionDoc) {\n this.transactionDocument = transactionDoc;\n } else {\n this.transactionDocument = {\n transactionId: \"\",\n offlineTransactionId: \"\",\n transactionRef: \"\",\n dateTime: \"\",\n orgCode: \"\",\n storeId: \"\",\n storeNodeId: \"\",\n storeNodeStructure: \"\",\n deviceId: \"\",\n terminalId: \"\",\n userId: \"\",\n initiatingModule: \"eBasket\",\n export: false,\n basket: {} as any,\n basketSummary: {} as any,\n baseCurrency: \"\",\n type: \"\",\n operationStatus: \"\",\n createdAt: \"\",\n updatedAt: \"\",\n id: \"\",\n currentTransactionDetails: {} as any,\n saleTotal: 0,\n };\n }\n this.initilizeItemCount();\n this.setLineNumberForProducts();\n this.createdAt = this.getDate(this.transactionDocument.createdAt);\n this.updatedAt = this.getDate(this.transactionDocument.updatedAt);\n }\n\n getPosbasketInfo() {\n this.rjObject['Keyword'] = this.generateKeyword();\n this.rjObject['ID'] = this.generateId(this.createdAt);\n this.rjObject['XMLSchemaVersion'] = '2';\n this.rjObject['LastUpdated'] = this.updatedAt;\n this.rjObject['MajorVersion'] = this.majorVersion;\n this.rjObject['MinorVersion'] = this.minorVersion;\n this.rjObject['ManifestVersion'] = this.manifestVersion;\n this.rjObject['DatabaseSchemaVersion'] = this.databaseSchemaVersion;\n this.rjObject['BasketType'] = this.basketType;\n this.rjObject['State'] = this.getState();\n this.rjObject['ExternalState'] = this.externalState;\n\n return this;\n }\n\n\n getheaderInfo() {\n this.rjObject['Header'] = {};\n this.rjObject['Header'].TimeZoneOffset = this.convertToString(this.generateTimezoneoffset(this.transactionDocument.createdAt));\n this.rjObject['Header'].DateTimeCreated = this.createdAt;\n this.rjObject['Header'].OriginatedBy = {};\n this.rjObject['Header'].OriginatedBy.DeviceID = this.deviceId;\n this.rjObject['Header'].OriginatedBy.CashierID = this.cashierId;\n this.rjObject['Header'].OriginatedBy.CompanyID = this.companyId;\n this.rjObject['Header'].OriginatedBy.StoreID = this.transactionDocument.storeId;\n this.rjObject['Header'].OriginatedBy.BranchID = this.branchId;\n this.rjObject['Header'].OriginatedBy.TerminalNumber = this.terminalNumber;\n this.rjObject['Header'].OriginatedBy.TransactionNumber = this.transactionNumber;\n this.rjObject['Header'].TaxMethodID = this.taxMethodId;\n this.rjObject['Header'].DynamicStockLookup = this.generateDynamicStockLookUp();\n this.rjObject['Header'].BasketLanguageID = this.basketLanguageId; //todo\n this.rjObject['Header'].BasketCountryID = this.basketCountryId; //todo\n this.rjObject['Header'].BasketCurrencyID = this.transactionDocument.baseCurrency;\n this.rjObject['Header'].TradingRegionID = this.tradingRegionId;\n this.rjObject['Header'].Eurozone = \" \";//unknown\n this.rjObject['Header'].EuroBaseExchangeRate = \"\"; //unknown\n this.rjObject['Header'].PrintableName = this.transactionDocument.userName; //unknown\n\n return this;\n }\n\n rjMapper() {\n var transactionDiscount:any = [] ;\n if (this.transactionDocument.basket.transactionDiscount && this.transactionDocument.basket.transactionDiscount.length > 0) {\n transactionDiscount = this.transactionDocument.basket.transactionDiscount\n }\n if (this.transactionDocument.type === TRANSACTION_TYPE.SALE) {\n this.rjObject['ProductSale'] = [];\n this.rjObject['ModifierItem'] = [];\n\n this.transactionDocument.basket.products.forEach((element: any) => {\n let lineDiscount = [];\n if (this.transactionDocument.basket.lineDiscount && this.transactionDocument.basket.lineDiscount.length > 0) {\n lineDiscount = this.transactionDocument.basket.lineDiscount.filter((x: any) => x.itemLineId === element.itemLineId);\n if (lineDiscount.length > 0) {\n const index = this.transactionDocument.basket.lineDiscount.indexOf(lineDiscount[0]);\n if (index > -1) {\n this.transactionDocument.basket.lineDiscount.splice(index, 1);\n }\n }\n }\n let data = this.addProduct(element, (lineDiscount.length > 0 ? lineDiscount[0] : null),(transactionDiscount.length > 0 ? transactionDiscount : null));\n this.rjObject['ProductSale'].push(data);\n this.getModifierItem(lineDiscount.length > 0 ? lineDiscount[0] : null, element.itemLineId);\n });\n let transactionPromotion = [];\n if (this.transactionDocument.basket.transactionPromotion && this.transactionDocument.basket.transactionPromotion.length > 0) {\n transactionPromotion = this.transactionDocument.basket.transactionPromotion;\n this.getTransactionPromotion(transactionPromotion);\n }\n } else if (this.transactionDocument.type === TRANSACTION_TYPE.REFUND) {\n this.rjObject['ProductReturn'] = [];\n this.rjObject['ModifierItem'] = []; \n this.transactionDocument.basket.products.forEach((element: any) => {\n let data = this.returnProduct(element, (element.hasOwnProperty('lineDiscount') ? element.lineDiscount : null),(transactionDiscount.length > 0 ? transactionDiscount : null));\n this.rjObject['ProductReturn'].push(data);\n this.getModifierItem(element.lineDiscount, element.itemLineId);\n });\n } else if (this.transactionDocument.type === TRANSACTION_TYPE.SALE_REFUND) {\n this.rjObject['ProductReturn'] = [];\n this.rjObject['ModifierItem'] = [];\n \n let transactionDoc: any = new TransactionDocumentBuilder().basket(this.transactionDocument.currentTransactionDetails).build();\n transactionDoc.basket.products.forEach((element: any) => {\n let data = this.returnProduct(element, (element.hasOwnProperty('lineDiscount') ? element.lineDiscount : null),(transactionDiscount.length > 0 ? transactionDiscount : null));\n let obj = {\n \"OriginalReceiptSupplied\": 0,\n \"OriginalBranchID\": 0,\n \"OriginalTerminalNumber\": 0,\n \"OriginalTransactionNumber\": 0,\n \"OriginalCashierNumber\": 0\n };\n data['Return'] = {...data['Return'], ...obj};\n this.rjObject['ProductReturn'].push(data);\n this.getModifierItem(element.lineDiscount, element.itemLineId);\n })\n } else if (this.transactionDocument.type === TRANSACTION_TYPE.SALE_EXCHANGE) {\n this.rjObject['ProductReturn'] = [];\n this.rjObject['ProductSale'] = [];\n this.rjObject['ModifierItem'] = [];\n \n let transactionDoc: any = new TransactionDocumentBuilder().basket(this.transactionDocument.currentTransactionDetails).build();\n transactionDoc.basket.products.forEach((element: any) => {\n if (element.refundedQuantity > 0) {\n let returnProduct = this.returnProduct(element, (element.hasOwnProperty('lineDiscount') ? element.lineDiscount : null),(transactionDiscount.length > 0 ? transactionDiscount : null));\n let obj = {\n \"OriginalReceiptSupplied\": 0,\n \"OriginalBranchID\": 0,\n \"OriginalTerminalNumber\": 0,\n \"OriginalTransactionNumber\": 0,\n \"OriginalCashierNumber\": 0\n };\n returnProduct['Return'] = {...returnProduct['Return'], ...obj};\n this.rjObject['ProductReturn'].push(returnProduct);\n } else {\n let addProduct = this.addProduct(element, (element.hasOwnProperty('lineDiscount') ? element.lineDiscount : null) ,(transactionDiscount.length > 0 ? transactionDiscount : null));\n this.rjObject['ProductSale'].push(addProduct);\n }\n this.getModifierItem(element.lineDiscount, element.itemLineId);\n })\n\n }\n return this;\n }\n\n getBasketDiscount() {\n if (!this.transactionDocument.basket.transactionDiscount) return this;\n this.rjObject['BasketDiscount'] = [];\n this.transactionDocument.basket.transactionDiscount.forEach((element: any) => {\n let obj: any = {}\n obj['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['DeviceID']=this.deviceId;\n obj['DateTimeCreated']=this.updatedAt;\n obj['NetValue'] = this.convertToString(element.discountAmount * -1);\n obj['EffectiveNetValue'] =this.convertToString( element.discountAmount * -1);\n obj['Description'] = element.reasonDisplayText;\n obj['UserID'] = this.transactionDocument.userName;\n obj['ReasonCodeID'] = element.reasonCode;\n obj['DiscountType'] = this.convertToString(element.discountType.toUpperCase() == DISCOUNTTYPE.PERCENT.toUpperCase() ? 0 : 1); \n obj['RoundingRule'] = this.convertToString(2);\n obj['ModifiedLineNumber'] = element.itemLineIds; \n obj['LineNumber'] = this.convertToString(this.generateLineNumber()); \n obj['DiscountedValue'] = this.transactionDocument.basketSummary.basketTotal + this.transactionDocument.basketSummary.discountTotal;\n if(element.discountType.toUpperCase() == DISCOUNTTYPE.PERCENT.toUpperCase()){\n obj['DiscountPercentage'] = this.convertToString((element.discountAmount / this.transactionDocument.basketSummary.basketTotal).toFixed(1))\n }\n if(this.transactionDocument.type === 'REFUND'){\n obj['NetValue'] = this.convertToString(element.discountAmount < 0 ? -element.discountAmount : element.discountAmount);\n obj['EffectiveNetValue'] =this.convertToString( element.discountAmount < 0 ? -element.discountAmount : element.discountAmount);\n }\n\n this.rjObject['BasketDiscount'].push(obj);\n });\n return this;\n }\n\n getModifierItem(data: any, lineNo: any) {\n if (data && lineNo) {\n let obj: any = {};\n obj.XMLSchemaVersion = 1;\n obj.LineNumber = this.generateLineNumber();\n obj.NetValue = 0;\n obj.EffectiveNetValue = 0;\n obj.Description = data.percentageDiscountReasonName ? data.percentageDiscountReasonName : data.priceOverrideReasonName;\n obj.DeviceID = this.deviceId;\n obj.UserID = this.transactionDocument.userName;\n obj.DateTimeCreated = this.updatedAt;\n obj.AuthorisingUserID = this.transactionDocument.userName;\n obj.ReasonCodeID = data.percentageDiscountReasonCode ? data.percentageDiscountReasonCode : data.priceOverrideReasonCode;\n obj.ModifiedLineNumber = lineNo;\n obj.ModifiedIndex = 1;\n\n this.rjObject['ModifierItem'].push(obj);\n }\n }\n\n getTrailerInfo() {\n this.rjObject['Trailer'] = {};\n this.rjObject.Trailer.DateTimeCompleted = this.updatedAt;\n this.rjObject.Trailer.CompletedBy = {};\n this.rjObject.Trailer.CompletedBy.DeviceID = this.deviceId;\n this.rjObject.Trailer.CompletedBy.CashierID = this.cashierId;\n this.rjObject.Trailer.CompletedBy.StoreID = this.transactionDocument.storeId;\n this.rjObject.Trailer.CompletedBy.BranchID = this.branchId;\n this.rjObject.Trailer.CompletedBy.TerminalNumber = this.terminalNumber;\n this.rjObject.Trailer.CompletedBy.TransactionNumber = this.transactionNumber;\n this.rjObject.Trailer.Total = this.convertToString(this.transactionDocument.basketSummary.basketTotal * 100);\n this.rjObject.Trailer.ItemCount = this.itemCount; //gives total count for product\n this.rjObject.Trailer.ItemQuantity = this.convertToString(this.transactionDocument.basketSummary.totalItems);\n this.rjObject.Trailer.NetItemQuantity = this.convertToString(this.transactionDocument.basketSummary.totalItems);\n this.rjObject.Trailer.TaxTotal = this.convertToString(this.removeDecimal(this.transactionDocument.basketSummary.VATTotal));\n this.rjObject.Trailer.SequenceDeviceID = this.deviceId;\n this.rjObject.Trailer.SequenceNumber = 'snsn' //static for now\n\n this.rjObject['Trailer']['TaxItem'] = [];\n this.transactionDocument.basket.taxBreakdown.taxLines.forEach((element: any) => {\n let obj: any = {};\n\n obj['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['TaxRate'] = this.convertToString(element.VATCode);\n obj['TaxableTotal'] = this.convertToString(this.removeDecimal(element.taxableAmount));\n obj['TaxTotal'] = this.convertToString(this.removeDecimal(this.removeDecimal(element.taxLineTotal)));\n obj['TaxDescription'] = this.convertToString(element.VATCode);\n obj['TaxIncluded'] = '1';\n obj['TaxPercentage'] = this.addDecimal(element.VAT.toFixed(2)).toFixed(2);\n\n this.rjObject['Trailer']['TaxItem'].push(obj)\n });\n if (this.transactionDocument.basket.linePromotion.length > 0 || this.transactionDocument.basket.linePromotion.length > 0) {\n this.rjObject['Trailer']['PromotionItem'] = [];\n if (this.transactionDocument.basket.linePromotion.length > 0) {\n this.transactionDocument.basket.linePromotion.forEach((element: any) => {\n let obj: any = {};\n\n obj['PromotionID'] = element.promotionId;\n obj['PromotionSaving'] = element.promotionAmount < 0 ? element.promotionAmount : -element.promotionAmount;\n obj['PromotionQuantity'] = \"1\";\n obj['PromotionDescription'] = element.displayText;\n obj['PromotionHit'] = {}\n obj['PromotionHit']['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['PromotionHit']['HitNumber'] = \"1\";\n obj['PromotionHit']['HitQuantity'] = \"1\";\n obj['PromotionHit']['HitSaving'] = element.promotionAmount < 0 ? element.promotionAmount : -element.promotionAmount;\n obj['PromotionHit']['PromotionTrigger'] = {};\n let product = this.transactionDocument.basket.products.find((item: any) => item.itemLineId == element.itemLineId);\n obj['PromotionHit']['PromotionTrigger']['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['PromotionHit']['PromotionTrigger']['ProductID'] = product.SKU;\n obj['PromotionHit']['PromotionTrigger']['UnitValue'] = this.convertToString(element.promotionLinePrice / product.quantity);\n obj['PromotionHit']['PromotionTrigger']['LineNumber'] = this.getNumber(product.SKU);\n obj['PromotionHit']['PromotionTrigger']['Quantity'] = this.convertToString(product.quantity.toFixed(1));\n obj['PromotionHit']['PromotionTrigger']['TaxCode'] = this.transactionDocument.basket.taxBreakdown.taxLines.find((item: any) => item.itemLineId == element.itemLineId).VATCode;\n this.rjObject['Trailer']['PromotionItem'].push(obj);\n });\n }\n\n if (this.transactionDocument.basket.transactionPromotion.length > 0) {\n\n this.transactionDocument.basket.transactionPromotion.forEach((element: any) => {\n let obj: any = {};\n obj['PromotionID'] = element.promotionId;\n obj['PromotionSaving'] = element.promotionAmount < 0 ? element.promotionAmount : -element.promotionAmount;\n obj['PromotionQuantity'] = \"1\";\n obj['PromotionDescription'] = element.displayText;\n obj['PromotionHit'] = {}\n obj['PromotionHit']['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['PromotionHit']['HitNumber'] = \"1\";\n obj['PromotionHit']['HitQuantity'] = \"1\";\n obj['PromotionHit']['HitSaving'] = element.promotionAmount < 0 ? element.promotionAmount : -element.promotionAmount;\n obj['PromotionHit']['PromotionTrigger'] = [];\n this.transactionDocument.basket.products.forEach((product: any) => {\n let promotionTrigger = {};\n element.itemLineIds.forEach((itemLineId: any) => {\n if (JSON.stringify(itemLineId) === product.itemLineId) {\n promotionTrigger['XMLSchemaVersion'] = this.xmlSchemaVersion;\n promotionTrigger['ProductID'] = product.SKU;\n promotionTrigger['UnitValue'] = this.convertToString(element.promotionLinePrice / product.quantity);\n promotionTrigger['LineNumber'] = this.getNumber(product.SKU);\n promotionTrigger['Quantity'] = this.convertToString(product.quantity);\n promotionTrigger['TaxCode'] = this.transactionDocument.basket.taxBreakdown.taxLines.find((item: any) => item.itemLineId == product.itemLineId).VATCode;\n obj['PromotionHit']['PromotionTrigger'].push(promotionTrigger);\n }\n });\n });\n this.rjObject['Trailer']['PromotionItem'].push(obj);\n });\n }\n }\n return this;\n }\n\n getTenderInfo() {\n if (this.transactionDocument.paymentDetails && this.transactionDocument.paymentDetails.length > 0) {\n this.transactionDocument.paymentDetails.forEach((element: any) => {\n if(element.externalTenderKey){\n this.rjObject[element.externalTenderKey] = [];\n if (element.paymentType.toUpperCase() === 'GIFT CARD') {\n let obj = {\n XMLSchemaVersion: this.xmlSchemaVersion,\n LineNumber: this.generateLineNumber(),\n NetValue: this.convertToString(-1 * this.removeDecimal((Math.round(element.amount)))),\n EffectiveNetValue: this.convertToString(-1 * this.removeDecimal((Math.round(element.amount)))),\n Description: this.getDescription(element),\n DeviceID: this.deviceId,\n UserID: this.transactionDocument.userName,\n DateTimeCreated: this.updatedAt,\n TenderType: element.externalTenderType ? element.externalTenderType : '',\n TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',\n TenderAmount: this.convertToString(-1 * this.removeDecimal((Math.round(element.amount)))),\n CurrencyID: this.transactionDocument.baseCurrency,\n CurrencyDescription: this.transactionDocument.baseCurrency,\n GiftVoucherSalesAllowed: '',//todo\n AllowRechargeableVoucherSales: '',//todo\n GiftVoucherID: ''\n }\n this.rjObject[element.externalTenderKey].push(obj)\n }\n else {\n let obj1 = {\n XMLSchemaVersion: \"1\",\n LineNumber: this.generateLineNumber(),//todo\n NetValue: this.convertToString(-1 * this.removeDecimal(Math.round(element.amount))),\n EffectiveNetValue: this.convertToString(-1 * this.removeDecimal(Math.round(element.amount))),\n Description: this.getDescription(element),\n DeviceID: this.deviceId,\n UserID: this.transactionDocument.userName,\n DateTimeCreated: this.updatedAt,\n TenderType: element.externalTenderType ? element.externalTenderType : '',\n TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',\n TenderAmount: this.convertToString(-1 * this.removeDecimal(Math.round(element.amount))),\n CurrencyID: this.transactionDocument.baseCurrency,\n CurrencyDescription: this.transactionDocument.baseCurrency,\n IncludeInTransactionTotalCheck: \"1\",\n AllowRechargeableVoucherSales: \"1\",\n OpenDrawerAtEnd: \"1\"\n }\n this.rjObject[element.externalTenderKey].push(obj1)\n }\n } else{\n this.rjObject['CashTender'] = [];\n if (element.paymentType.toUpperCase() === 'GIFT CARD') {\n let obj = {\n XMLSchemaVersion: this.xmlSchemaVersion,\n LineNumber: this.generateLineNumber(),\n NetValue: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n EffectiveNetValue: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n Description: this.getDescription(element),\n DeviceID: this.deviceId,\n UserID: this.transactionDocument.userName,\n DateTimeCreated: this.updatedAt,\n TenderType: element.externalTenderType ? element.externalTenderType : '',\n TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',\n TenderAmount: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n CurrencyID: this.transactionDocument.baseCurrency,\n CurrencyDescription: this.transactionDocument.baseCurrency,\n GiftVoucherSalesAllowed: '',//todo\n AllowRechargeableVoucherSales: '',//todo\n GiftVoucherID: ''\n }\n this.rjObject['CashTender'].push(obj)\n }\n else {\n let obj1 = {\n XMLSchemaVersion: \"1\",\n LineNumber: this.generateLineNumber(),\n NetValue: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n EffectiveNetValue: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n Description: this.getDescription(element),\n DeviceID: this.deviceId,\n UserID: this.transactionDocument.userName,\n DateTimeCreated: this.updatedAt,\n TenderType: element.externalTenderType ? element.externalTenderType : '',\n TenderSubType: element.externalSubTenderType ? element.externalSubTenderType : '',\n TenderAmount: JSON.stringify(-1 * this.removeDecimal((Math.round(element.amount)))),\n CurrencyID: this.transactionDocument.baseCurrency,\n CurrencyDescription: this.transactionDocument.baseCurrency,\n IncludeInTransactionTotalCheck: \"1\",\n AllowRechargeableVoucherSales: \"1\",\n OpenDrawerAtEnd: \"1\"\n }\n this.rjObject['CashTender'].push(obj1)\n }\n }\n });\n }\n return this;\n }\n\n getNumber(productId) {\n let lineNumber; \n for (let i = 0; i < this.rjObject['ProductSale'].length; i++) {\n const element = this.rjObject['ProductSale'][i];\n if(JSON.stringify(productId) === JSON.stringify(element.ProductID)){\n lineNumber = element.LineNumber;\n break;\n }\n }\n return lineNumber;\n }\n\n setLineNumberForProducts() {\n let itemLineIdArray = [];\n itemLineIdArray = this.transactionDocument.basket.products.map((product: any) => {\n return parseInt(product.itemLineId);\n })\n this.largestNumber = itemLineIdArray.reduce((a: any, b: any) => Math.max(a, b));\n }\n\n generateLineNumber() {\n this.largestNumber += 1;\n this.itemCount += 1;\n return this.largestNumber;\n }\n\n initilizeItemCount() {\n this.itemCount = this.transactionDocument.basket.products.length;\n }\n\n build() {\n return this.rjObject;\n }\n\n getDescription(element: any) {\n if (element.paymentType.toUpperCase() === 'CARD') {\n return element.cardType\n }\n else {\n return element.paymentType;\n }\n }\n\n getMMGROUPID(attributes) {\n if (attributes && attributes.length > 0) {\n let filterValue = attributes.filter((attribute) => attribute.name === \"MMGROUPID\");\n if(filterValue && filterValue.length > 0){\n return filterValue[0].value;\n }\n }\n }\n\n setDeviceInfo(id: any) {\n this.deviceId = id\n return this\n }\n\n removeDecimal(value: number) {\n return value * 100;\n }\n\n addDecimal(value: number) {\n return value /100;\n }\n\n setTransactionNumber(value: any) {\n this.transactionNumber = value;\n return this\n }\n\n setManifestVersion(value: any) {\n this.manifestVersion = value;\n return this\n }\n\n setDatabaseSchemaVersion(value: any) {\n this.databaseSchemaVersion = value;\n return this\n }\n\n setBasketType(value: any) {\n this.basketType = value;\n return this\n }\n\n setTradingRegionID(value: any) {\n this.tradingRegionId = value\n return this\n }\n\n setCompanyID(value: any) {\n this.companyId = value\n return this\n }\n\n setTaxMethodID(value: any) {\n this.taxMethodId = value\n return this\n }\n\n setMajorVersion(value: any) {\n this.majorVersion = value\n return this\n }\n\n setMinorVersion(value: any) {\n this.minorVersion = value\n return this\n }\n\n setXMLSchemaVersion(value: any) {\n this.xmlSchemaVersion = value\n return this\n }\n\n setExternalState(value: any) {\n this.externalState = value\n return this\n }\n\n setCashierID() {\n this.cashierId = (this.transactionDocument && this.transactionDocument.userName) ? this.transactionDocument.userName : '';\n return this\n }\n\n setTerminalNumber(value: any) {\n this.terminalNumber = value;\n return this;\n }\n\n setBasketLanguageID(value: any) {\n this.basketLanguageId = value;\n return this;\n }\n setBasketCountryID(value: any) {\n this.basketCountryId = value;\n return this;\n }\n\n setBasketCurrencyID(value: any) {\n this.basketCurrencyId = value;\n return this;\n }\n\n setBranchID(value: any) {\n this.branchId = value;\n return this;\n }\n\n setSalesPersonName(value: any) {\n this.salesPersonName = value;\n return this;\n }\n\n generateId(date: any) {\n let newDateTime = date.replace(/[^0-9]/g, '')\n let id = (this.deviceId + '|' + newDateTime + '|' + this.transactionNumber).toString();\n return id;\n } \n\n generateTimezoneoffset(date: any) {\n let x = date ? date : '';\n return new Date(x).getTimezoneOffset();\n }\n\n generateKeyword() {\n let x = (this.companyId + '|' + this.transactionDocument.storeId + '|' + this.terminalNumber + '|' + this.transactionNumber).toString();\n return x;\n }\n\n getState() {\n if (this.transactionDocument.operationStatus === 'PAY_SUCCESS') {\n return 'Completed';\n }\n else {\n return 'Cancelled';\n }\n }\n\n returnProduct(element: any, lineDiscount: LineDiscount , transactionDiscount: TransactionDiscount) {\n let obj: any = {};\n let taxTotal = this.transactionDocument.basket['taxBreakdown']['taxLines'].find((item: any) => item.itemLineId == element['itemLineId']);\n obj['XMLSchemaVersion'] = this.xmlSchemaVersion;\n obj['LineNumber'] = element['itemLineId'];\n obj['NetValue'] = this.removeDecimal(element['refundedTotal']);\n obj['EffectiveNetValue'] = this.removeDecimal(element['refundedTotal']);\n obj['Description'] = element['description'];\n obj['DeviceID'] = this.transactionDocument['terminalId'];\n obj['UserID'] = this.transactionDocument.userName;\n obj['DateTimeCreated'] = this.createdAt;\n obj['ExtendedValue'] = this.removeDecimal(element['totalLinePrice']*-1);\n obj['UnitPrice'] = this.removeDecimal(element['price']);\n obj['Quantity'] = this.getQuantity(element);\n obj['OriginalTaxAmountSet'] = 1;\n obj['ProductID'] = element['SKU'];\n obj['HandKeyed'] = 1;\n obj['LongDescription'] = element['description'];\n obj['Return'] = {};\n obj['Return']['ReturnReasonID'] = element['refundedReason'];\n obj['Return']['ReturnDescription'] = element['refundedReasonDescription'];\n obj['Return']['ReturnToStock'] = this.getQuantity(element);\n obj['TaxCode'] = this.transactionDocument.basket['taxBreakdown']['taxLines'].find((item: any) => item.itemLineId == element['itemLineId']).VATCode;\n\n obj['DisplayTaxCode'] = ''; // todo\n obj['ProductAttributes'] = ''; //todo - not required\n obj['Perishable'] = this.getMMGROUPID(element.attributes);\n //obj['MMGroupID'] = this.getCaregories(element);\n obj['MMGroupID'] = this.getMMGROUPID(element.attributes);\n obj['CustomerDetails'] = \"\"; // todo - blank\n obj['TotalPromotionSaving'] = element['promotionAmount'] || -1; // TODO\n obj['OriginalTaxAmount'] = this.convertToString((this.removeDecimal(this.getOriginalTax(element,taxTotal.VAT) * -1)).toFixed(2));\n obj['taxAmount'] = this.removeDecimal(taxTotal.taxLineTotal < 0 ?(taxTotal.taxLineTotal) : (-taxTotal.taxLineTotal));\n\n if (lineDiscount) {\n if (lineDiscount.percentageDiscountReasonName && lineDiscount.percentageDiscountReasonCode) {\n // line discount\n obj['Discount'] = {};\n obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;\n obj['Discount'].ModifierDateTime = obj.DateTimeCreated;\n obj['Discount'].ModifierReasonID = lineDiscount.percentageDiscountReasonCode;\n obj['Discount'].ModifierDescription = lineDiscount.percentageDiscountReasonName;\n obj['Discount'].AuthorisingUserID = this.transactionDocument.userName;\n obj['Discount'].DiscountType = lineDiscount.discountType;\n obj['Discount'].XMLSchemaVersion = 1;\n obj['Discount'].OriginalPrice = this.removeDecimal(lineDiscount.discountAmount + (lineDiscount.discountedLinePrice || 0));\n obj['Discount'].DiscountedValue = this.removeDecimal(lineDiscount.unitPrice);\n obj['Discount'].DiscountPercentage = lineDiscount.percentageDiscountValue;\n obj['Discount'].RoundingRule = 2;\n }\n\n if (lineDiscount.priceOverrideReasonCode && lineDiscount.priceOverrideReasonName) {\n //price override\n obj['PriceOverride'] = {};\n obj['PriceOverride'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;\n obj['PriceOverride'].ModifierDateTime = obj.DateTimeCreated;\n obj['PriceOverride'].ModifierReasonID = lineDiscount.priceOverrideReasonCode;\n obj['PriceOverride'].ModifierReasonDescription = lineDiscount.priceOverrideReasonName;\n obj['PriceOverride'].AuthorisingUserID = this.transactionDocument.userName;\n obj['PriceOverride'].XMLSchemaVersion = 1;\n obj['PriceOverride'].NewPrice = this.removeDecimal(lineDiscount.unitPrice);\n obj['PriceOverride'].OriginalPrice = this.removeDecimal(lineDiscount.discountedLinePrice || 0 + lineDiscount.discountAmount);\n }\n\n //update the product price\n obj.NetValue = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount) * -1;\n obj.EffectiveNetValue = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount) * -1;\n obj.ExtendedValue = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount) * -1;\n obj.UnitPrice = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount) * -1;\n }\n\n if(transactionDiscount) {\n obj['BasketDiscountModifier'] = [];\n this.transactionDocument.basket.transactionDiscount.forEach((e: any) => { \n let discountObj: any ={}\n e.itemLineIds.forEach((x: any) => {\n if (x == element.itemLineId) { \n var discountAmount = this.convertToString(e.discountAmount * -1); \n discountObj.BasketDiscountLineNumber = this.getLineNumber(e,discountAmount);\n discountObj.XMLSchemaVersion = this.xmlSchemaVersion;\n discountObj.DiscountedValue = this.getDiscountedValue(element.totalLinePrice, e.discountAmount);\n obj['BasketDiscountModifier'].push(discountObj);\n } \n }); \n });\n var totaltransactionDiscount = 0;\n obj['BasketDiscountModifier'].forEach((value:any)=>{\n totaltransactionDiscount = totaltransactionDiscount + value.DiscountedValue;\n });\n //update the product price\n obj['EffectiveNetValue'] = obj.EffectiveNetValue + totaltransactionDiscount;\n }\n\n if (this.transactionDocument.basket.transactionPromotion.length > 0) {\n obj['PromotionSaving'] = [];\n this.transactionDocument.basket.transactionPromotion.forEach((transactionPromo: any) => {\n let promotionObj: any = {};\n transactionPromo.itemLineIds.forEach((itemLineId: any) => {\n if (itemLineId == element.itemLineId) {\n promotionObj.ModifierValue = transactionPromo.promotionAmount;\n promotionObj.ModifierDateTime = this.transactionDocument.createdAt;\n promotionObj.ModifierDescription = transactionPromo.displayText;\n promotionObj.XMLSchemaVersion = this.xmlSchemaVersion;\n promotionObj.PromotionID = transactionPromo.promotionId;\n promotionObj.PromotionDescription = transactionPromo.displayText;\n promotionObj.HitNumber = '1';\n promotionObj.PromotionHitProductQuantity = this.getQuantity(element);\n promotionObj.PromotionHitQuantity = this.getQuantity(element) * -1;\n obj['PromotionSaving'].push(promotionObj);\n }\n });\n });\n }\n\n return obj;\n }\n\n addProduct(element: TProduct, lineDiscount: LineDiscount, transactionDiscount: TransactionDiscount) {\n let taxTotal = this.transactionDocument.basket['taxBreakdown']['taxLines'].find((item: any) => item.itemLineId == element['itemLineId']);\n let obj: any = {\n XMLSchemaVersion: this.xmlSchemaVersion,\n LineNumber: element.itemLineId,\n NetValue: this.removeDecimal(element.totalLinePrice),\n EffectiveNetValue: this.removeDecimal(element.totalLinePrice),\n Description: element.description,\n DeviceID: this.deviceId,\n UserID: this.transactionDocument.userName,\n DateTimeCreated: this.createdAt,\n ExtendedValue: this.removeDecimal(element.price),\n UnitPrice: this.removeDecimal(element.price),\n //MMGroupID: this.getCaregories(element),\n Quantity: element.quantity,\n SalespersonID: this.transactionDocument.userName,\n SalespersonName: this.salesPersonName,\n TaxCode: this.transactionDocument.basket['taxBreakdown']['taxLines'].find((item: any) => item.itemLineId == element['itemLineId']).VATCode,\n TaxModifiable: \"1\", //todo\n OriginalTaxAmount : this.convertToString((this.removeDecimal(this.getOriginalTax(element,taxTotal.VAT)).toFixed(2))),\n TaxAmount : this.convertToString(this.removeDecimal(taxTotal.taxLineTotal)),\n OriginalTaxAmountSet: \"1\",//todo\n ProductID: element.SKU,\n HandKeyed: \"1\",//todo\n CustomerDetails: \"\",\n Perishable: this.getMMGROUPID(element.attributes),\n MMGroupID: this.getMMGROUPID(element.attributes)\n }\n if (lineDiscount) {\n if (lineDiscount.percentageDiscountReasonName && lineDiscount.percentageDiscountReasonCode) {\n // line discount\n obj['Discount'] = {};\n obj['Discount'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;\n obj['Discount'].ModifierDateTime = obj.DateTimeCreated;\n obj['Discount'].ModifierReasonID = lineDiscount.percentageDiscountReasonCode;\n obj['Discount'].ModifierDescription = lineDiscount.percentageDiscountReasonName;\n obj['Discount'].AuthorisingUserID = this.transactionDocument.userName;\n obj['Discount'].DiscountType = lineDiscount.discountType;\n obj['Discount'].XMLSchemaVersion = 1;\n obj['Discount'].OriginalPrice = this.removeDecimal(lineDiscount.discountAmount + (lineDiscount.discountedLinePrice || 0));\n obj['Discount'].DiscountedValue = this.removeDecimal(lineDiscount.unitPrice);\n obj['Discount'].DiscountPercentage = lineDiscount.percentageDiscountValue;\n obj['Discount'].RoundingRule = 2;\n }\n\n if (lineDiscount.priceOverrideReasonCode && lineDiscount.priceOverrideReasonName) {\n //price override\n obj['PriceOverride'] = {};\n obj['PriceOverride'].ModifierValue = this.removeDecimal(lineDiscount.discountAmount) * -1;\n obj['PriceOverride'].ModifierDateTime = obj.DateTimeCreated;\n obj['PriceOverride'].ModifierReasonID = lineDiscount.priceOverrideReasonCode;\n obj['PriceOverride'].ModifierReasonDescription = lineDiscount.priceOverrideReasonName;\n obj['PriceOverride'].AuthorisingUserID = this.transactionDocument.userName;\n obj['PriceOverride'].XMLSchemaVersion = this.xmlSchemaVersion;\n obj['PriceOverride'].NewPrice = this.removeDecimal(lineDiscount.unitPrice);\n obj['PriceOverride'].OriginalPrice = this.removeDecimal(lineDiscount.discountedLinePrice || 0 + lineDiscount.discountAmount);\n }\n\n //update the product price\n obj['NetValue'] = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount);\n obj['EffectiveNetValue'] = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount);\n obj['ExtendedValue'] = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount);\n obj['UnitPrice'] = ((lineDiscount.discountedLinePrice || 0) + lineDiscount.discountAmount);\n }\n\n if(transactionDiscount) {\n obj['BasketDiscountModifier'] = [];\n this.transactionDocument.basket.transactionDiscount.forEach((e:any) => { \n let discountObj: any ={};\n e.itemLineIds.forEach((itemLineId: any) => {\n if (itemLineId == element.itemLineId) { \n let discountAmount = this.convertToString(e.discountAmount * -1); \n discountObj.XMLSchemaVersion = this.xmlSchemaVersion;\n discountObj.DiscountedValue = -(this.getDiscountedValue(element.totalLinePrice, e.discountAmount));\n discountObj.BasketDiscountLineNumber = this.getLineNumber(e,discountAmount) ;\n obj['BasketDiscountModifier'].push(discountObj); \n } \n }); \n });\n let totaltransactionDiscount = 0;\n obj['BasketDiscountModifier'].forEach((value:any)=>{\n totaltransactionDiscount = totaltransactionDiscount + value.DiscountedValue;\n });\n //update the product price\n obj['EffectiveNetValue'] = obj.EffectiveNetValue + totaltransactionDiscount; \n }\n \n if (this.transactionDocument.basket.transactionPromotion.length > 0 || this.transactionDocument.basket.linePromotion.length > 0) {\n obj['DistributedPromotionSaving'] = [];\n if (this.transactionDocument.basket.transactionPromotion.length > 0) {\n this.transactionDocument.basket.transactionPromotion.forEach((e: any) => {\n let promotionObj: any = {};\n e.itemLineIds.forEach((itemLineId: any) => {\n if (itemLineId == element.itemLineId) {\n promotionObj.PromotionID = e.promotionId;\n promotionObj.Hit = '1';\n promotionObj.Saving = this.getSaving(element.totalLinePrice, e.promotionAmount);\n promotionObj.ISaving = this.getSaving(element.totalLinePrice, e.promotionAmount);\n obj['DistributedPromotionSaving'].push(promotionObj);\n }\n });\n });\n }\n\n if (this.transactionDocument.basket.linePromotion.length > 0) {\n this.transactionDocument.basket.linePromotion.forEach((linePromotion: any) => {\n let promotionObj: any = {};\n if (element.itemLineId == linePromotion.itemLineId) {\n promotionObj.PromotionID = linePromotion.promotionId;\n promotionObj.Hit = \"1\";\n promotionObj.Saving = linePromotion.promotionLinePrice;\n promotionObj.ISaving = linePromotion.promotionLinePrice;\n obj['DistributedPromotionSaving'].push(promotionObj);\n }\n });\n }\n let transactionPromotion = 0;\n obj['DistributedPromotionSaving'].forEach((value: any) => {\n transactionPromotion = transactionPromotion + value.Saving;\n });\n obj['EffectiveNetValue'] = obj.EffectiveNetValue + transactionPromotion;\n }\n return obj;\n }\n\n getSaving(price,promotionAmount): any {\n let Saving = (price*promotionAmount)/this.transactionDocument.basketSummary.saleTotal;\n return Saving;\n }\n\n getLineNumber(value: any,discountAmount:string ){\n let lineNumber;\n for (let i = 0; i < this.rjObject['BasketDiscount'].length; i++) {\n const element = this.rjObject['BasketDiscount'][i];\n if( value.reasonCode === element.ReasonCodeID && discountAmount === element.NetValue){\n lineNumber = element.LineNumber;\n break; \n } \n }\n return lineNumber; \n }\n\n\n getDiscountedValue(price:any ,discountAmount:any ) {\n let DiscountedValue =((price * discountAmount)/this.transactionDocument.basketSummary.saleTotal)*100 ;\n return DiscountedValue;\n }\n\n getOriginalTax(element: TProduct, VAT) {\n let pricebeforetax = (element.price * 100)/(100 + VAT )\n let originaltax= element.price - pricebeforetax\n return originaltax;\n }\n\n convertToString(value: any) {\n try {\n value = JSON.stringify(value);\n return value;\n }\n catch (e) {\n console.log(value, 'can not be converted in string', e);\n }\n }\n\n generateDynamicStockLookUp() {\n let x = '0';\n this.transactionDocument.basket.products.forEach((element: any) => {\n if (element.deliveryMethod === '1' || element.deliveryMethod === '2') {\n x = '1';\n }\n });\n return x;\n }\n\n // getAttributes(){\n // let name: string | any[] = []\n // this.transactionDocument.basket.products.forEach((element: any) => {\n // if (element && element.attributes && element.attributes.length > 0) {\n // name = element.attributes.filter((x: any) => x.name.toUpperCase() === element.name.toUpperCase());\n // }\n // });\n // if (name.length > 0) {\n // return name[0].value\n // }\n // else{\n // return \"\"\n // }\n // }\n\n // getCaregories(element) {\n // let MMGroupId = \" \";\n // if (element.categories && element.categories.length > 0) {\n // let categories = element.categories.filter((x) => x.parentId != '');\n // let value = categories.filter((x) => x.id != x.parentId);\n // MMGroupId = value[0].name;\n // }\n // return MMGroupId;\n // }\n\n getDate(date:string){\n let offset = this.generateTimezoneoffset(date) * -1;\n let offsetHours = Math.abs(Math.floor(offset / 60)); \n\t let offsetMinutes = Math.abs(offset) - offsetHours * 60;\n\n let offsetSign = '+';\n if (offset < 0) {\n offsetSign = '-';\n }\n\n let newdate = date.substring(0,19);\n const x = (newdate+ offsetSign +String(offsetHours).padStart(2, '0')+':'+String(offsetMinutes).padStart(2, '0')).toString();\n return x; \n }\n \n getTransactionPromotion(transactionPromotion){\n if(transactionPromotion && transactionPromotion.length > 0){\n this.rjObject['PromoVoucherItem'] = {};\n this.rjObject['PromoVoucherItem']['XMLSchemaVersion'] = this.xmlSchemaVersion;\n this.rjObject['PromoVoucherItem']['LineNumber'] = this.generateLineNumber();\n this.rjObject['PromoVoucherItem']['NetValue'] = this.removeDecimal(transactionPromotion[0].promotionLinePrice) * -1;\n this.rjObject['PromoVoucherItem']['EffectiveNetValue'] = this.removeDecimal(transactionPromotion[0].promotionLinePrice) * -1;\n this.rjObject['PromoVoucherItem']['Description'] = transactionPromotion[0].promotionInfo;\n this.rjObject['PromoVoucherItem']['DeviceID'] = this.deviceId;\n this.rjObject['PromoVoucherItem']['UserID'] = this.transactionDocument.userName;\n this.rjObject['PromoVoucherItem']['DateTimeCreated'] = this.createdAt;\n this.rjObject['PromoVoucherItem']['ProductId'] = \"\"; //todo\n this.rjObject['PromoVoucherItem']['SerialNumber'] = \"\" ; //todo\n this.rjObject['PromoVoucherItem']['MMGroupId'] = \"\";\n }\n }\n \n getQuantity(element: any) {\n let quantity\n if(this.transactionDocument.unreferencedRefund){\n quantity = element['quantity'] < 0 ? element['quantity'] : (-element['quantity']);\n }\n else{\n quantity = element['refundedQuantity'] < 0 ? element['refundedQuantity'] : (-element['refundedQuantity']);\n }\n return quantity;\n }\n}\n","import { CurrencyPipe } from \"@angular/common\";\nimport { CurrentTransactionDetails, TransactionDocument, Trigger, PROMOTION_LEVEL, PROMOTION_TYPE, TProduct, TransactionPromotion } from \"./mapper-library.model\";\nimport { NumberUtilService } from \"./number-util.service\";\n\nexport class WebReturnMapperBuilderClass {\n\n private document: any;\n private webReturnObject: TransactionDocument = {\n id: '',\n orgCode: \"\",\n storeId: \"\",\n storeNodeId: \"\",\n storeNodeStructure: \"\",\n deviceId: \"\",\n terminalId: \"\",\n initiatingModule: \"\",\n export: false,\n isInStoreOrder: false,\n basket: {},\n basketSummary: {},\n baseCurrency: \"\",\n customer: {\n firstName: '',\n lastName: '',\n email: '',\n postCode: '',\n id: '',\n billingAddress: {},\n shippingAddress: {},\n\n },\n currentTransactionDetails: {} as CurrentTransactionDetails\n }\n numberUtilService: any;\n\n constructor(document, private currencyPipe?: CurrencyPipe) {\n if (document) {\n this.document = document;\n }\n this.numberUtilService = new NumberUtilService(currencyPipe);\n }\n\n WebReturnMapper() {\n this.webReturnObject['type'] = 'WEB_RETURNS';\n this.webReturnObject['datetime'] = this.getUTCDateTime(this.getText(this.document.updated_at));\n this.webReturnObject.baseCurrency = this.getText(this.document.base_currency_code);\n this.webReturnObject.storeId = this.getText(this.document.store_id);\n this.webReturnObject.subsidiaryId = '1';\n this.webReturnObject.initiatingModule = 'MAGENTO';\n this.webReturnObject.createdAt = this.getUTCDateTime(this.getText(this.document.created_at));\n this.webReturnObject.updatedAt = this.getUTCDateTime(this.getText(this.document.updated_at));\n this.webReturnObject.export = true;\n this.webReturnObject.transCompletedAt = this.getUTCDateTime(this.getText(this.document.updated_at));\n this.webReturnObject['externalTransactionId'] = this.getText(this.document.order_id);\n\n // customer\n this.webReturnObject['customer']['firstName'] = this.getText(this.document.customer_firstname) || '';\n this.webReturnObject['customer']['lastName'] = this.getText(this.document.customer_lastname) || '';\n this.webReturnObject['customer']['email'] = this.getText(this.document.customer_email) || '';\n this.webReturnObject['customer']['postCode'] = '';\n\n // Billing address\n this.webReturnObject['customer']['billingAddress']['address1'] = (this.document.billing_address && this.document.billing_address.street) ? this.getText(this.document.billing_address.street) : '';\n this.webReturnObject['customer']['billingAddress']['city'] = (this.document.billing_address && this.document.billing_address.city) ? this.getText(this.document.billing_address.city) : '';\n this.webReturnObject['customer']['billingAddress']['county'] = (this.document.billing_address && this.document.billing_address.region) ? this.getText(this.document.billing_address.region) : '';\n this.webReturnObject['customer']['billingAddress']['postCode'] = (this.document.billing_address && this.document.billing_address.postcode) ? this.getText(this.document.billing_address.postcode) : '';\n this.webReturnObject['customer']['billingAddress']['country'] = (this.document.billing_address && this.document.billing_address.country) ? this.getText(this.document.billing_address.country) : '';\n\n // Shipping address\n this.webReturnObject['customer']['shippingAddress']['address1'] = (this.document.shipping_address && this.document.shipping_address.street) ? this.getText(this.document.shipping_address.street) : '';\n this.webReturnObject['customer']['shippingAddress']['city'] = (this.document.shipping_address && this.document.shipping_address.city) ? this.getText(this.document.shipping_address.city) : '';\n this.webReturnObject['customer']['shippingAddress']['county'] = (this.document.shipping_address && this.document.shipping_address.region) ? this.getText(this.document.shipping_address.region) : '';\n this.webReturnObject['customer']['shippingAddress']['postCode'] = (this.document.shipping_address && this.document.shipping_address.postcode) ? this.getText(this.document.shipping_address.postcode) : '';\n this.webReturnObject['customer']['shippingAddress']['country'] = (this.document.shipping_address && this.document.shipping_address.country) ? this.getText(this.document.shipping_address.country) : '';\n\n // basketSummary \n this.webReturnObject.basketSummary['discountTotal'] = Math.abs(Number(this.document.discount_amount ? this.getText(this.document.discount_amount) : 0));\n this.webReturnObject.basketSummary['VATTotal'] = Number(this.document.base_total_paid ? this.getText(this.document.base_total_paid) : 0);\n this.webReturnObject.basketSummary['saleTotal'] = Number(this.document.base_total_invoiced ? this.getText(this.document.base_total_invoiced) : 0);\n this.webReturnObject.basketSummary['basketTotal'] = Number(this.document.base_total_paid ? this.getText(this.document.base_total_paid) : 0);\n this.webReturnObject.basketSummary['totalItems'] = Number(this.document.total_qty_ordered ? this.getText(this.document.total_qty_ordered) : 0);\n this.webReturnObject.basketSummary['refundTotal'] = Number(this.document.base_total_refunded ? this.getText(this.document.base_total_refunded) : 0);\n\n // // basket line discount\n // this.webReturnObject.basket['lineDiscount'] = [];\n\n // let lineDiscount = {\n // itemLineId: (this.document.items && this.document.items.item && this.document.items.item.item_id) ? this.getText(this.document.items.item.item_id) : 0,\n // discountAmount: (this.document.items && this.document.items.item && this.document.items.item.discount_amount) ? Number(this.getText(this.document.items.item.discount_amount)) : 0\n // }\n // this.webReturnObject.basket['lineDiscount'].push(lineDiscount);\n\n // basket transaction discount\n \n\n // basket products \n this.webReturnObject.basket['products'] = [];\n this.webReturnObject.basket['linePromotion']=[];\n this.webReturnObject.basket['transactionDiscount'] = [];\n this.webReturnObject.basket['transactionPromotion'] = [];\n\n // let transactionDiscount = {\n // discountAmount: (this.document && this.document.discount_amount) ? Number(this.getText(this.document.discount_amount)) : 0\n // }\n // this.webReturnObject.basket['transactionDiscount'].push(transactionDiscount);\n\n\n let product : any= {};\n if (this.document.items && this.document.items.item) {\n if (this.document.items.item instanceof Array) {\n this.document.items.item.forEach((element, index) => {\n let qty = this.getText(element.qty_ordered) ? Number(this.getText(element.qty_ordered)) : 0;\n let refundQty = this.getText(element.qty_refunded) ? Number(this.getText(element.qty_refunded)) : 0;\n let price = this.getText(element.price_incl_tax) ? Number(this.getText(element.price_incl_tax)) : 0;\n product = {\n description: (element.name) ? this.getText(element.name) : '',\n SKU: (element.sku) ? this.getText(element.sku) : '',\n quantity: (element.qty_ordered) ? Number(this.getText(element.qty_ordered)) : 0,\n refundedQuantity: (element.qty_refunded) ? Number(this.getText(element.qty_refunded)) : 0,\n //price: (element.original_price) ? Number(this.getText(element.original_price)) : 0,\n price: price,\n \n itemLineId: (index + 1).toString(),\n // totalLinePrice: (element.row_invoiced) ? Number(this.getText(element.row_invoiced)) : 0,\n totalLinePrice: ((qty - refundQty) * price),\n }\n\n let promotionAmount = this.getText(element.discount_amount) ? Number(this.getText(element.discount_amount)) : 0;\n let appliedIDs = this.getText(element.applied_rule_ids) ? this.getText(element.applied_rule_ids):'';\n\n if (product && product.price != 0) {\n if(promotionAmount)\n {\n let trigger = {} as Trigger;\n trigger.itemLineId = product.itemLineId;\n trigger.quantity = product.quantity ? product.quantity : 0;\n \n let promotion = {\n promotionAmount:promotionAmount,\n promotionId:appliedIDs,\n itemLineId:product.itemLineId,\n promotionLinePrice: product.totalLinePrice - promotionAmount,\n trigger:trigger\n }\n\n this.webReturnObject.basket['linePromotion'].push(promotion);\n }\n\n this.webReturnObject.basket['products'].push(product);\n }\n\n });\n } else {\n let qty = (this.document.items && this.document.items.item && this.document.items.item.qty_ordered) ? Number(this.getText(this.document.items.item.qty_ordered)) : 0;\n let refundQty = (this.document.items && this.document.items.item && this.document.items.item.qty_refunded) ? Number(this.getText(this.document.items.item.qty_refunded)) : 0;\n let price = (this.document.items && this.document.items.item && this.document.items.item.price_incl_tax) ? Number(this.getText(this.document.items.item.price_incl_tax)) : 0;\n product = {\n description: (this.document.items && this.document.items.item && this.document.items.item.name) ? this.getText(this.document.items.item.name) : '',\n SKU: (this.document.items && this.document.items.item && this.document.items.item.sku) ? this.getText(this.document.items.item.sku) : '',\n quantity: (this.document.items && this.document.items.item && this.document.items.item.qty_ordered) ? Number(this.getText(this.document.items.item.qty_ordered)) : 0,\n refundedQuantity: (this.document.items && this.document.items.item && this.document.items.item.qty_refunded) ? Number(this.getText(this.document.items.item.qty_refunded)) : 0,\n // price: (this.document.items && this.document.items.item && this.document.items.item.original_price) ? Number(this.getText(this.document.items.item.original_price)) : 0,\n price: price,\n\n itemLineId: \"1\",\n // totalLinePrice: (this.document.items && this.document.items.item && this.document.items.item.row_invoiced) ? Number(this.getText(this.document.items.item.row_invoiced)) : 0,\n totalLinePrice: ((qty - refundQty) * price),\n }\n let promotionAmount = this.getText(this.document.items.item.discount_amount) ? Number(this.getText(this.document.items.item.discount_amount)) : 0;\n let appliedIDs = this.getText(this.document.items.item.applied_rule_ids) ? this.getText(this.document.items.item.applied_rule_ids):'';\n\n if (product && product.price != 0) {\n if(promotionAmount)\n {\n let trigger = {} as Trigger;\n trigger.itemLineId = product.itemLineId;\n trigger.quantity = product.quantity ? product.quantity : 0;\n \n let promotion = {\n promotionAmount:promotionAmount,\n promotionId:appliedIDs,\n itemLineId:product.itemLineId,\n promotionLinePrice: product.totalLinePrice - promotionAmount,\n trigger:trigger\n }\n\n this.webReturnObject.basket['linePromotion'].push(promotion);\n }\n\n this.webReturnObject.basket['products'].push(product);\n }\n }\n\n let couponCode = this.getText(this.document.coupon_code) ? this.getText(this.document.coupon_code) : 0;\n let appliedIDs = this.getText(this.document.applied_rule_ids) ? this.getText(this.document.applied_rule_ids):'';\n let discountDescription = this.getText(this.document.discount_description) ? this.getText(this.document.discount_description):'';\n\n let couponTriggerPromotions = [] as Trigger[];\n if(couponCode && appliedIDs)\n {\n let transactionPromotion = {} as TransactionPromotion;\n\n if(this.webReturnObject.basket['linePromotion'] && this.webReturnObject.basket['linePromotion'].length > 0)\n {\n this.webReturnObject.basket['linePromotion'].forEach(\n (promotion)=>{\n if(promotion.promotionId === appliedIDs)\n {\n let trigger = {} as Trigger;\n trigger.itemLineId = promotion.itemLineId;\n trigger.quantity = promotion.trigger.quantity;\n trigger.totalQuantity = promotion.trigger.quantity;\n trigger.promotionAmount = promotion.promotionAmount;\n trigger.refundedReason = couponCode;\n trigger.refundedReasonDescription = discountDescription;\n trigger.promotionId = promotion.promotionId;\n couponTriggerPromotions.push(trigger);\n this.webReturnObject.basket['linePromotion'] = this.webReturnObject.basket['linePromotion'].filter((x)=>x.itemLineId !== promotion.itemLineId);\n }\n }\n );\n }\n\n if (couponTriggerPromotions.length > 0) {\n transactionPromotion.displayText = couponTriggerPromotions[0].refundedReasonDescription;\n transactionPromotion.name = couponTriggerPromotions[0].refundedReason;\n transactionPromotion.promotionAmount = -(couponTriggerPromotions.reduce((n, { promotionAmount }) => n + promotionAmount, 0));\n transactionPromotion.promotionId = couponTriggerPromotions[0].promotionId;\n transactionPromotion.promotionInfo = couponTriggerPromotions[0].refundedReasonDescription;\n transactionPromotion.couponCode = couponCode;\n transactionPromotion.itemLineIds = [];\n transactionPromotion.type = PROMOTION_TYPE.COUPON;\n transactionPromotion.subLevelType = PROMOTION_LEVEL.LINE;\n transactionPromotion.trigger = couponTriggerPromotions;\n }\n \n console.log(\"e-basket: update LinePromotion With Coupon\", JSON.stringify(transactionPromotion));\n \n if (!this.webReturnObject.basket.transactionPromotion ) {\n this.webReturnObject.basket.transactionPromotion = [];\n }\n \n if (transactionPromotion && transactionPromotion.promotionId ) {\n this.webReturnObject.basket.transactionPromotion.push(transactionPromotion);\n }\n }\n\n this.updateTransactionPromotionPrtionCalc();\n }\n return this;\n }\n\n public validateProductItemDiscount(product: TProduct) {\n if (!product.itemDiscounts) {\n product.itemDiscounts = {\n trnDiscountsPortion: 0,\n trnPromotionsPortion: 0,\n refundPortion: 0,\n };\n }\n return product;\n }\n\n transactionPromotionProductPortionCalc(\n txDoc: TransactionDocument,\n promotion: TransactionPromotion\n ) {\n console.log(\n `ebasket: transactionPromotionProductPortionCalc: trnsactionPromotion: ${JSON.stringify(\n promotion\n )}`\n );\n if (promotion.type === PROMOTION_TYPE.COUPON && promotion.subLevelType === PROMOTION_LEVEL.LINE) {\n txDoc.basket.products.forEach((product) => {\n product = this.validateProductItemDiscount(product);\n\n if (promotion.trigger && promotion.trigger.length > 0) {\n promotion.trigger.forEach((t) => {\n if (t.itemLineId === product.itemLineId.toString()) {\n product.itemDiscounts.trnPromotionsPortion += t.promotionAmount;\n }\n });\n }\n });\n }\n else {\n txDoc.basket.products.forEach((product) => {\n product = this.validateProductItemDiscount(product);\n if (promotion.itemLineIds.includes(+product.itemLineId)) {\n let discountAmount = 0;\n if (this.document.items.item instanceof Array) {\n const productItem = this.document.items.item.find(productItem => productItem.sku === product.SKU);\n discountAmount = productItem.discount_amount ? +productItem.discount_amount : 0;\n } else {\n discountAmount = this.document.items.item.sku === product.SKU && this.document.items.item.discount_amount ?\n +this.document.items.item.discount_amount : 0;\n }\n const transactionPromotionPortion = discountAmount;\n product.itemDiscounts.trnPromotionsPortion += this.numberUtilService.trimTo2Decimal2(transactionPromotionPortion);\n }\n });\n }\n return txDoc;\n }\n\n updateTransactionPromotionPrtionCalc() {\n try {\n if (this.webReturnObject.basket.transactionPromotion && this.webReturnObject.basket.transactionPromotion.length > 0) {\n this.webReturnObject.basket.transactionPromotion.forEach(tr => {\n this.transactionPromotionProductPortionCalc(this.webReturnObject, tr)\n })\n }\n } catch(error) {\n console.log(\"updateTransactionPromotionPrtionCalc => failed:\", JSON.stringify(error));\n }\n }\n\n deviceId(deviceId) {\n this.webReturnObject.deviceId = deviceId;\n return this;\n }\n\n terminalId(terminalId) {\n this.webReturnObject.terminalId = terminalId;\n return this;\n }\n\n orgCode(orgCode) {\n this.webReturnObject.orgCode = orgCode;\n return this;\n }\n\n storeId(storeId) {\n this.webReturnObject.storeId = storeId;\n return this;\n }\n\n storeNodeId(storeNodeId: string) {\n this.webReturnObject.storeNodeId = storeNodeId;\n return this;\n }\n\n storeNodeStructure(storeNodeStructure: string) {\n this.webReturnObject.storeNodeStructure = storeNodeStructure;\n return this;\n }\n\n docId(docId) {\n this.webReturnObject.id = docId;\n return this;\n }\n\n updateUserID(userID: string) {\n this.webReturnObject.userId = userID;\n return this;\n }\n\n updateUserName(name) {\n this.webReturnObject.userName = name;\n return this;\n }\n\n build() {\n return this.webReturnObject;\n }\n\n getText(obj) {\n if (obj && obj.text) {\n return obj.text;\n } else {\n return obj;\n }\n }\n\n getUTCDateTime(date) {\n if (date) {\n return new Date(date).toISOString();\n }\n }\n\n isInStoreOrder() {\n console.log(\"Mapper library: WebReturnMapperBuilderClass: isInStoreOrder mapping started...\"); \n if(this.document.payment && this.document.payment.method && this.document.payment.method === 'pos_order'){\n this.webReturnObject.isInStoreOrder = true;\n }\n console.log(\"Mapper library: WebReturnMapperBuilderClass: isInStoreOrder mapping ended...\");\n return this;\n }\n}\n","import { CurrencyPipe } from \"@angular/common\";\nimport { Address, BasketSummary, BasketSummaryDetails, CurrentTransactionDetails, Customer, DELIVERY_METHODS, PROMOTION_LEVEL, PROMOTION_TYPE, INITIATING_MODULE, LinePromotions, OrderDetails, PROVIDERS, ShipmentDetails, TRANSACTION_TYPE, TransactionDocument, TransactionInfo, TransactionPromotion, Trigger, externalTransactionDetails, TProduct, RefundProductChange } from \"./mapper-library.model\";\nimport { NumberUtilService } from \"./number-util.service\";\n\nexport class WebReturnSalesforceMapperBuilderClass {\n\n private orderDetails: OrderDetails;\n private webReturnObject: TransactionDocument = {\n id: '',\n orgCode: \"\",\n storeId: \"\",\n storeNodeId: \"\",\n storeNodeStructure: \"\",\n deviceId: \"\",\n terminalId: \"\",\n initiatingModule: \"\",\n export: false,\n isInStoreOrder: false,\n basket: {},\n basketSummary: {},\n baseCurrency: \"\",\n customer: {\n id: '',\n email: '',\n firstName: '',\n lastName: '',\n billingAddress: [],\n shippingAddress: [],\n shipmentDetails: [],\n telephone: '',\n postCode: '',\n noCustomerSelected: false\n },\n currentTransactionDetails: {} as CurrentTransactionDetails\n }\n numberUtilService: any;\n\n constructor(orderDetails: OrderDetails,\n private currencyPipe?: CurrencyPipe\n ) {\n if (orderDetails) {\n this.orderDetails = orderDetails;\n }\n this.numberUtilService = new NumberUtilService(currencyPipe);\n }\n\n webReturnCommonMapper() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: webReturnCommonMapper started...\");\n this.webReturnObject['type'] = TRANSACTION_TYPE.WEB_RETURNS;\n this.webReturnObject['datetime'] = this.getUTCDateTime(this.orderDetails.last_modified);\n this.webReturnObject.baseCurrency = this.orderDetails.currency;\n this.webReturnObject.subsidiaryId = '1';\n this.webReturnObject.export = true;\n this.webReturnObject.initiatingModule = INITIATING_MODULE.EBASKET;\n this.webReturnObject.createdAt = this.getUTCDateTime(this.orderDetails.creation_date);\n this.webReturnObject.updatedAt = this.getUTCDateTime(this.orderDetails.last_modified);\n this.webReturnObject.transCompletedAt = this.getUTCDateTime(this.orderDetails.last_modified);\n this.webReturnObject['externalTransactionId'] = this.orderDetails.order_no;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: webReturnCommonMapper ended...\");\n return this;\n }\n\n // export(status, details) {\n // console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: export mapping started...\");\n // console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: status:\", status);\n // console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: details:\", JSON.stringify(details));\n // if (status && details && details.providers && details.providers.length > 0) {\n // details.providers.forEach(\n // providerObj => {\n // if (providerObj.provider && providerObj.provider === PROVIDERS.SALESFORCE) {\n // this.webReturnObject.export = true;\n // } else {\n // this.webReturnObject.export = false;\n // }\n // }\n // );\n // } else {\n // this.webReturnObject.export = false;\n // }\n // console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: export mapping end...\")\n // return this;\n // }\n\n getDeliveryMethod() {\n if(this.orderDetails.shipments && this.orderDetails.shipments.length > 0) {\n const shipToStoreShipment = this.orderDetails.shipments.find(shipment => shipment.c_fromStoreId);\n if(shipToStoreShipment) return DELIVERY_METHODS.SHIP_TO_STORE;\n else return DELIVERY_METHODS.DELIVERY;\n } else {\n return '';\n }\n }\n\n product() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: product mapping started...\");\n this.webReturnObject.basket['products'] = [];\n if (this.orderDetails.product_items && this.orderDetails.product_items.length > 0) {\n this.orderDetails.product_items.forEach(\n (product, index) => {\n const productObj = {\n description: product.item_text ? product.item_text : '',\n SKU: product.product_id ? product.product_id : '',\n quantity: product.quantity ? product.quantity : 0,\n refundedQuantity: 0,\n price: product.base_price ? product.base_price : 0,\n itemLineId: (index + 1).toString(),\n deliveryMethod: this.getDeliveryMethod().toString(),\n totalLinePrice: product.price ? product.price : 0\n }\n if (product && product.price != 0) {\n this.webReturnObject.basket['products'].push(productObj);\n }\n }\n );\n }\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: product mapping ended...\");\n return this;\n }\n\n linePromotion() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: linePromotion mapping started...\");\n this.webReturnObject.basket.linePromotion = [] as LinePromotions[];\n let linePromotionArray = [] as LinePromotions[];\n if (this.orderDetails.product_items && this.orderDetails.product_items.length > 0) {\n this.orderDetails.product_items.forEach(\n (product, index) => {\n product.item_id = (index + 1).toString();\n if (product.price_adjustments && product.price_adjustments.length > 0) {\n product.price_adjustments.forEach(\n (promotion) => {\n if (!promotion.coupon_code) {\n let linePromotionObj = {} as LinePromotions;\n let trigger = {} as Trigger;\n trigger.itemLineId = product.item_id;\n trigger.quantity = product.quantity ? product.quantity : 0;\n linePromotionObj.trigger = [] as Trigger[];\n linePromotionObj.trigger.push(trigger);\n\n linePromotionObj.itemLineId = index + 1;\n linePromotionObj.promotionId = promotion.promotion_id ? promotion.promotion_id : '';\n linePromotionObj.displayText = promotion.item_text ? promotion.item_text : '';\n linePromotionObj.promotionType = promotion.applied_discount && promotion.applied_discount.type ? promotion.applied_discount.type : '';\n linePromotionObj.promotionAmount = promotion.price ? Math.abs(promotion.price) : 0;\n linePromotionObj.name = promotion.coupon_code ? promotion.coupon_code : (promotion.item_text ? promotion.item_text :'');\n linePromotionObj.promotionInfo = promotion.item_text ? promotion.item_text : '';\n linePromotionObj.promotionLinePrice = product.price - Math.abs(promotion.price);\n linePromotionArray.push(linePromotionObj);\n }\n }\n );\n }\n }\n );\n }\n this.webReturnObject.basket.linePromotion = linePromotionArray;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: linePromotion mapping ended...\");\n return this;\n }\n\n transactionPromotion() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: transactionPromotion mapping started...\");\n\n let transactionPromotionArray = this.getTransactionPromotions(this.orderDetails);\n\n this.webReturnObject.basket.transactionPromotion = transactionPromotionArray;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: transactionPromotion mapping ended...\");\n return this;\n }\n\n getTransactionPromotions(basket): TransactionPromotion[] {\n try {\n let transactionPromotionArray = [] as TransactionPromotion[];\n if (basket.order_price_adjustments && basket.order_price_adjustments.length > 0) {\n basket.order_price_adjustments.forEach(\n (transactionPromotion) => {\n let transactionPromotionObj = {} as TransactionPromotion;\n\n transactionPromotionObj.displayText = transactionPromotion.item_text ? transactionPromotion.item_text : '';\n transactionPromotionObj.name = transactionPromotion.coupon_code ? transactionPromotion.coupon_code : (transactionPromotion .item_text?transactionPromotion.item_text : '');\n transactionPromotionObj.promotionAmount = transactionPromotion.price ? Math.abs(transactionPromotion.price) : 0;\n transactionPromotionObj.promotionId = transactionPromotion.promotion_id ? transactionPromotion.promotion_id : '';\n transactionPromotionObj.promotionInfo = transactionPromotion.item_text ? transactionPromotion.item_text : '';\n transactionPromotionObj.promotionType = transactionPromotion.applied_discount && transactionPromotion.applied_discount.type ? transactionPromotion.applied_discount.type : '';\n transactionPromotionObj.itemLineIds = this.orderDetails.product_items.map((product, index) => index + 1);\n if (transactionPromotion.coupon_code) {\n transactionPromotionObj.type = PROMOTION_TYPE.COUPON;\n transactionPromotionObj.couponCode = transactionPromotion.coupon_code;\n transactionPromotionObj.subLevelType = PROMOTION_LEVEL.TRANSACTION;\n }\n transactionPromotionArray.push(transactionPromotionObj);\n }\n );\n }\n\n\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: getTransactionPromotions : \", JSON.stringify(transactionPromotionArray));\n return transactionPromotionArray;\n } catch (error) {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: failed:\", error);\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: failed:\", JSON.stringify(error));\n throw new Error(error);\n }\n }\n\n updateLinePromotionWithCoupon() {\n try {\n\n let transactionPromotion = {} as TransactionPromotion;\n let triggerPromotion = [] as Trigger[];\n if (this.orderDetails.product_items && this.orderDetails.product_items.length > 0) {\n this.orderDetails.product_items.forEach(\n (product, index) => {\n product.item_id = (index + 1).toString();\n\n if (product.price_adjustments && product.price_adjustments.length > 0) {\n product.price_adjustments.forEach(\n (promotion) => {\n if (promotion.coupon_code) {\n let trigger = {} as Trigger;\n trigger.itemLineId = product.item_id;\n trigger.quantity = product.quantity ? product.quantity : 0;\n trigger.totalQuantity = product.quantity ? product.quantity : 0;\n trigger.promotionAmount = promotion.price ? Math.abs(promotion.price) : 0;\n trigger.refundedReason = promotion.coupon_code ? promotion.coupon_code : '';\n trigger.refundedReasonDescription = promotion.item_text ? promotion.item_text : '';\n trigger.promotionId = promotion.promotion_id;\n triggerPromotion.push(trigger);\n }\n }\n );\n }\n }\n );\n }\n\n if (triggerPromotion.length > 0) {\n transactionPromotion.displayText = triggerPromotion[0].refundedReasonDescription;\n transactionPromotion.name = triggerPromotion[0].refundedReason;\n transactionPromotion.promotionAmount = -(triggerPromotion.reduce((n, { promotionAmount }) => n + promotionAmount, 0));\n transactionPromotion.promotionId = triggerPromotion[0].promotionId;\n transactionPromotion.promotionInfo = triggerPromotion[0].refundedReasonDescription;\n transactionPromotion.couponCode = triggerPromotion[0].refundedReason;\n transactionPromotion.itemLineIds = [];\n transactionPromotion.type = PROMOTION_TYPE.COUPON;\n transactionPromotion.subLevelType = PROMOTION_LEVEL.LINE;\n transactionPromotion.trigger = triggerPromotion;\n }\n console.log(\"linePromotion mapping ended...\");\n console.log(\"e-basket: updateLinePromotionWithCoupon\", JSON.stringify(transactionPromotion));\n\n if (!this.webReturnObject.basket.transactionPromotion ) {\n this.webReturnObject.basket.transactionPromotion = [];\n }\n\n if (transactionPromotion && transactionPromotion.promotionId ) {\n this.webReturnObject.basket.transactionPromotion.push(transactionPromotion);\n }\n\n return this;\n } catch (error) {\n console.log(\"Ebasket: Salesforce: linePromotion mapping=> failed:\", error);\n console.log(\"Ebasket: Salesforce: linePromotion mapping=> failed:\", JSON.stringify(error));\n throw new Error(error);\n }\n }\n\n updateTransactionPromotionPrtionCalc() {\n if (this.webReturnObject.basket.transactionPromotion && this.webReturnObject.basket.transactionPromotion.length > 0) {\n\n this.webReturnObject.basket.transactionPromotion.forEach(tr => {\n this.transactionPromotionProductPortionCalc(this.webReturnObject , tr)\n })\n }\n return this;\n }\n\n transactionPromotionProductPortionCalc(\n txDoc: TransactionDocument,\n promotion: TransactionPromotion\n ) {\n console.log(\n `ebasket: transactionPromotionProductPortionCalc: trnsactionPromotion: ${JSON.stringify(\n promotion\n )}`\n );\n if (promotion.type === PROMOTION_TYPE.COUPON && promotion.subLevelType === PROMOTION_LEVEL.LINE) {\n txDoc.basket.products.forEach((product) => {\n product = this.validateProductItemDiscount(product);\n\n if (promotion.trigger && promotion.trigger.length > 0) {\n promotion.trigger.forEach((t) => {\n if (t.itemLineId === product.itemLineId.toString()) {\n product.itemDiscounts.trnPromotionsPortion += t.promotionAmount;\n }\n });\n }\n });\n }\n else {\n txDoc.basket.products.forEach((product) => {\n product = this.validateProductItemDiscount(product);\n if (promotion.itemLineIds.includes(+product.itemLineId)) {\n const productItem = this.orderDetails.product_items.find(productItem => productItem.product_id === product.SKU);\n const transactionPromotionPortion = (productItem && productItem.price_after_item_discount && productItem.price_after_order_discount) ?\n (productItem.price_after_item_discount - productItem.price_after_order_discount) : 0;\n product.itemDiscounts.trnPromotionsPortion += this.numberUtilService.trimTo2Decimal2(transactionPromotionPortion);\n }\n });\n }\n return txDoc;\n }\n\n \n public validateProductItemDiscount(product: TProduct) {\n if (!product.itemDiscounts) {\n product.itemDiscounts = {\n trnDiscountsPortion: 0,\n trnPromotionsPortion: 0,\n refundPortion: 0,\n };\n }\n return product;\n }\n \n \n customer() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: customer mapping started...\");\n let customerObj = {} as Customer;\n customerObj.email = this.orderDetails.customer_info && this.orderDetails.customer_info.email ? this.orderDetails.customer_info.email : '';\n customerObj.firstName = this.orderDetails.billing_address && this.orderDetails.billing_address.first_name ? this.orderDetails.billing_address.first_name : '';\n customerObj.lastName = this.orderDetails.billing_address && this.orderDetails.billing_address.last_name ? this.orderDetails.billing_address.last_name : '';\n\n let shippingAddress = [] as Address[];\n this.orderDetails.shipments.forEach(\n shipment => {\n let shippingAddressObj = {} as Address;\n shippingAddressObj.id = shipment.shipping_address && shipment.shipping_address.id ? shipment.shipping_address.id : '';\n shippingAddressObj.countryCode = shipment.shipping_address && shipment.shipping_address.country_code ? shipment.shipping_address.country_code : '';\n shippingAddressObj.address1 = shipment.shipping_address && shipment.shipping_address.address1 ? shipment.shipping_address.address1 : '';\n shippingAddressObj.city = shipment.shipping_address && shipment.shipping_address.city ? shipment.shipping_address.city : '';\n shippingAddressObj.country = '';\n shippingAddressObj.postCode = shipment.shipping_address && shipment.shipping_address.postal_code ? shipment.shipping_address.postal_code : '';\n shippingAddress.push(shippingAddressObj);\n }\n )\n customerObj.shippingAddress = shippingAddress;\n\n let billingAddress = [] as Address[];\n let billingAddressObj = {} as Address;\n billingAddressObj.id = this.orderDetails.billing_address && this.orderDetails.billing_address.id ? this.orderDetails.billing_address.id : '';\n billingAddressObj.countryCode = this.orderDetails.billing_address && this.orderDetails.billing_address.country_code ? this.orderDetails.billing_address.country_code : '';\n billingAddressObj.address1 = this.orderDetails.billing_address && this.orderDetails.billing_address.address1 ? this.orderDetails.billing_address.address1 : '';\n billingAddressObj.city = this.orderDetails.billing_address && this.orderDetails.billing_address.city ? this.orderDetails.billing_address.city : '';\n billingAddressObj.country = '';\n billingAddressObj.postCode = '';\n billingAddress.push(billingAddressObj);\n customerObj.billingAddress = billingAddress;\n\n let shipmentDetails = [] as ShipmentDetails[];\n this.orderDetails.shipments.forEach(\n shipment => {\n let shipmentDetailsObj = {} as ShipmentDetails;\n shipmentDetailsObj.id = shipment.shipment_id ? shipment.shipment_id : '';\n shipmentDetailsObj.deliveryGroup = shipment.shipment_id ? shipment.shipment_id : '';\n shipmentDetails.push(shipmentDetailsObj);\n }\n );\n customerObj.shipmentDetails = shipmentDetails;\n\n this.webReturnObject.customer = customerObj;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: customer mapping ended...\");\n return this;\n }\n\n isInStoreOrder() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: isInStoreOrder mapping started...\");\n if(this.orderDetails.c_isInStoreOrder) {\n this.webReturnObject.isInStoreOrder = true;\n }\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: isInStoreOrder mapping ended...\");\n return this;\n }\n\n externalTransactionDetails() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: externalTransactionDetails mapping started...\");\n let externalTransactionDetails = [] as externalTransactionDetails[];\n if (this.orderDetails.shipments && this.orderDetails.shipments.length > 0) {\n this.orderDetails.shipments.forEach(\n shipment => {\n let externalTransactionDetailsObj = {} as externalTransactionDetails;\n let transactionInfo = {} as TransactionInfo;\n externalTransactionDetailsObj.uniqueId = this.orderDetails.order_no ? this.orderDetails.order_no : '';\n externalTransactionDetailsObj.providerType = PROVIDERS.SALESFORCE;\n transactionInfo.shippingId = shipment.shipping_method && shipment.shipping_method.id ? shipment.shipping_method.id : '';\n transactionInfo.externalShippingId = shipment.shipment_id ? shipment.shipment_id : '';\n externalTransactionDetailsObj.details = transactionInfo;\n externalTransactionDetails.push(externalTransactionDetailsObj);\n }\n );\n }\n this.webReturnObject.externalTransactionDetails = externalTransactionDetails;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: externalTransactionDetails mapping ended...\");\n return this;\n }\n\n basketSummary() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: basketSummary mapping started...\");\n let basketSummary = {} as BasketSummary;\n let basketSummaryWebOrder = {} as BasketSummaryDetails;\n const linePromotionTotal = this.webReturnObject.basket.linePromotion.map(linePromotion => linePromotion.promotionAmount).reduce((accumulator, currentValue) => accumulator + currentValue, 0);\n const transactionPromotionTotal = this.webReturnObject.basket.transactionPromotion.map(transactionPromotion => transactionPromotion.promotionAmount).reduce((accumulator, currentValue) => accumulator + currentValue, 0);\n basketSummary.discountTotal = linePromotionTotal + transactionPromotionTotal;\n basketSummary.VATTotal = this.orderDetails.tax_total ? this.orderDetails.tax_total : 0;\n basketSummary.saleTotal = this.orderDetails.order_total ? this.orderDetails.order_total : 0;\n basketSummary.basketTotal = this.orderDetails.order_total ? this.orderDetails.order_total : 0;\n basketSummary.totalItems = this.orderDetails.product_items && this.orderDetails.product_items.length > 0 ? this.orderDetails.product_items.length : 0;\n basketSummary.shippingTotal = this.orderDetails.shipping_total ? this.orderDetails.shipping_total : 0;\n basketSummary.basketTotalWithShippingTotal = this.orderDetails.order_total ? this.orderDetails.order_total : 0;\n basketSummaryWebOrder.shippingTotal = this.orderDetails.shipping_total ? this.orderDetails.shipping_total : 0;\n basketSummaryWebOrder.basketTotalWithShippingTotal = this.orderDetails.order_total ? this.orderDetails.order_total : 0;\n basketSummary.webOrder = basketSummaryWebOrder;\n this.webReturnObject.basketSummary = basketSummary;\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: basketSummary mapping ended...\");\n return this;\n }\n\n deviceId(deviceId) {\n this.webReturnObject.deviceId = deviceId;\n return this;\n }\n\n terminalId(terminalId) {\n this.webReturnObject.terminalId = terminalId;\n return this;\n }\n\n orgCode(orgCode) {\n this.webReturnObject.orgCode = orgCode;\n return this;\n }\n\n storeId(storeId) {\n this.webReturnObject.storeId = storeId;\n return this;\n }\n\n storeNodeId(storeNodeId: string) {\n this.webReturnObject.storeNodeId = storeNodeId;\n return this;\n }\n\n storeNodeStructure(storeNodeStructure: string) {\n this.webReturnObject.storeNodeStructure = storeNodeStructure;\n return this;\n }\n\n docId(docId) {\n this.webReturnObject.id = docId;\n return this;\n }\n\n updateUserID(userID: string) {\n this.webReturnObject.userId = userID;\n return this;\n }\n\n updateUserName(name) {\n this.webReturnObject.userName = name;\n return this;\n }\n\n build() {\n console.log(\"Mapper library: WebReturnSalesforceMapperBuilderClass: mapping done...\");\n return this.webReturnObject;\n }\n\n getUTCDateTime(date) {\n if (date) {\n return new Date(date).toISOString();\n }\n }\n}\n","/*\n * Public API Surface of mapper-library\n */\n\nexport * from './lib/mapper-library.component';\nexport * from './lib/mapper-library.module';\nexport * from './lib/RJ-mapper.class';\nexport * from './lib/WebReturn-mapper.class';\nexport * from './lib/WebReturnSalesforceMapper.class';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAYa,sBAAsB,CAAA;AAEjC,IAAA,WAAA,GAAA,GAAiB;IAEjB,QAAQ,GAAA;KACP;8GALU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EARvB,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAIU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EACpB,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,CAAA;;;MCOU,mBAAmB,CAAA;8GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eA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