@openmrs/esm-billing-app 1.0.2-pre.761 → 1.0.2-pre.767

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 CHANGED
@@ -104,7 +104,6 @@ You can customize billing behavior using OpenMRS frontend config overrides.
104
104
  "billing": {
105
105
  "defaultCurrency": "UGX",
106
106
  "pageSize": 20,
107
- "showEditBillButton": true,
108
107
  "patientCatergory": {
109
108
  "paymentDetails": "fbc0702d-...",
110
109
  "insuranceScheme": "aac48226-..."
package/dist/4300.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4300],{34300:e=>{e.exports=JSON.parse('{"action":"Action","add":"Add","addBill":"Add bill item(s)","addBillableServices":"Add Billable Services","addCashPoint":"Add Cash Point","addNewBillableService":"Add new billable service","addNewCashPoint":"Add New Cash Point","addNewPaymentMode":"Add New Payment Mode","addNewService":"Add new service","addPaymentMethod":"Add payment method","addPaymentMode":"Add Payment Mode","addPaymentOption":"Add payment option","addPaymentOptions":"Add payment option","amount":"Amount","amountDue":"Amount Due","amountMustBePositive":"Amount must be greater than 0","amountRequired":"Amount is required","amountTendered":"Amount Tendered","amountToWaiveAriaLabel":"Enter amount to waive","amountToWaiveHelper":"Specify the amount to be deducted from the bill","amountToWaiveLabel":"Amount to Waive","associatedConcept":"Associated concept","billableService":"Billable service","billableServices":"Billable Services","billableServices__lower":"billable services","billAmount":"Bill amount","billCode":"Bill code","billedItems":"Billed Items","billedTo":"Billed to","billErrorService":"Bill service error","billing":"Billing","billingForm":"Billing form","billingHistory":"Billing History","billingSettings":"Billing Settings","billItem":"Bill item","billItems":"Bill Items","billLineItemEmpty":"This bill has no line items","billList":"Bill list","billMetrics":"Bill metrics","billName":" {{billName}} ","billPayment":"Bill payment","billPaymentError":"Bill payment error","billPaymentRequiredMessage":"The current patient has a pending bill. Advise the patient to settle the bill before receiving services","billProcessingError":"Bill processing error","billProcessingSuccess":"Bill processing has been successful","billServicesManagement":"Bill services management","billsList":"Bill list","billTotal":"Bill total","billWaiver":"Bill waiver","billWaiverError":"Bill waiver failed {{error}}","billWaiverSuccess":"Bill waiver successful","cashPointConfig":"Cash Point Config","cashPointHistory":"Cash Point History","cashPointLocation":"Cash Point Location","cashPointName":"Cash Point Name","cashPointNamePlaceholder":"e.g., Pharmacy Cash Point","cashPointNameRequired":"Cash Point Name is required","cashPointSaved":"Cash point was successfully saved.","cashPointUuid":"Cash Point UUID","cashPointUuidPlaceholder":"Enter UUID","checkFilters":"Check the filters above","confirmDeleteMessage":"Are you sure you want to delete this payment mode? Proceed cautiously.","createdSuccessfully":"Billable service created successfully","currentPrice":"Current price","date":"Date","dateAndTime":"Date And Time","dateOfPayment":"Date of payment","deletePaymentMode":"Delete Payment Mode","deleting":"Deleting","description":"Description","descriptionPlaceholder":"e.g., Used for all cash transactions","discard":"Discard","discount":"Discount","discountAmount":"Discount Amount","editBillableService":"Edit billable service","editBillableServices":"Edit Billable Services","editBillLineItem":"Edit bill line item?","editThisBillItem":"Edit this bill item","enterAmount":"Enter amount","enterConcept":"Associated concept","enterReferenceNumber":"Enter reference number","enterSellingPrice":"Enter selling price","enterServiceName":"Enter service name","enterServiceShortName":"Enter service short name","error":"Error","errorDeletingPaymentMode":"An error occurred while deleting the payment mode.","errorFetchingCashPoints":"An error occurred while fetching cash points.","errorFetchingLocations":"An error occurred while fetching locations.","errorFetchingPaymentModes":"An error occurred while fetching payment modes.","errorLoadingBillServices":"Error loading bill services","errorLoadingPaymentModes":"Payment modes error","errorPrintingInvoice":"Error printing invoice","errorProcessingPayment":"Error processing payment","errorSavingCashPoint":"An error occurred while saving the cash point.","errorSavingPaymentMode":"An error occurred while saving the payment mode.","filterBy":"Filter by","filterTable":"Filter table","grandTotal":"Grand total","home":"Home","identifier":"Identifier","insuranceScheme":"Insurance scheme","invalidUuidFormat":"Invalid UUID format","invalidWaiverAmount":"Invalid waiver amount","inventoryItem":"Inventory item","invoice":"Invoice","invoiceDate":"Invoice date","invoiceError":"Invoice error","invoiceNumber":"Invoice #","invoiceStatus":"Invoice Status","item":"Item","itemsToBeBilled":"Items to be billed","launchBillForm":"Launch bill form","lineItems":"Line items","loading":"Loading data...","loadingBillInfo":"Loading bill information...","loadingBillingServices":"Loading billing services...","loadingBillItems":"Loading bill items","loadingData":"Loading data","loadingDescription":"Loading","location":"Select Location","locationRequired":"Location is required","manageBillableServices":"Manage billable services","name":"Name","nextPage":"Next page","noBilltoDisplay":"There are no bills to display for this patient","noMatchingBillsToDisplay":"No matching bills to display","noMatchingItemsToDisplay":"No matching items to display","noMatchingServicesToDisplay":"No matching services to display","noResultsFor":"No results for","number":"No","ok":"OK","patientBillingAlert":"Patient Billing Alert","patientBills":"Patient bill","patientBillsDescription":"List of patient bills","patientCategory":"Patient category","paymentAmountCannotExceedAmountDue":"Payment amount cannot exceed amount due","paymentDetails":"Payment Details","paymentMethod":"Payment method","paymentMethods":"Payment methods","paymentMode":"Payment Mode","paymentModeDeleted":"Payment mode was successfully deleted.","paymentModeHistory":"Payment Mode History","paymentModeName":"Payment Mode Name: {{paymentModeName}}","paymentModeNamePlaceholder":"e.g., Cash, Credit Card","paymentModeNameRequired":"Payment Mode Name is required","paymentModeRequired":"Payment mode is required","paymentModeSaved":"Payment mode was successfully saved.","paymentModesConfig":"Payment Modes Config","paymentOptionRequired":"At least one payment option is required","paymentProcessedSuccessfully":"Payment processed successfully","payments":"Payments","pleaseRequiredFields":"Please fill all required fields","policyNumber":"Policy number","postWaiver":"Post waiver","previousPage":"Previous page","price":"Unit Price","priceIsRequired":"Price is required","priceMustBeGreaterThanZero":"Price must be greater than 0","priceMustBeValidPositiveNumber":"Price must be a valid positive number","prices":"Prices","printBill":"Print bill","printReceipt":"Print receipt","processPayment":"Process Payment","quantity":"Quantity","quantityRequired":"Quantity is required","referenceNumber":"Reference number","remove":"Remove","removePaymentMethod":"Remove payment method","saveAndClose":"Save and close","saveBill":"Save Bill","saving":"Saving","searchConcepts":"Search associated concept","searching":"Searching","searchItems":"Search items and services","searchThisTable":"Search this table","selectBillableService":"Select a billable service...","selectedItems":"Selected Items","selectLocation":"Select Location","selectPatientCategory":"Select patient category","selectPaymentMethod":"Select payment method","selectPaymentMethodRequired":"Please select a payment method for all items","selectPaymentMode":"Select payment mode","selectServiceType":"Select service type","sellingAmount":"Enter selling price","sellingPrice":"Selling Price","serviceMetrics":"Service Metrics","serviceName":"Service Name","serviceNameExceedsLimit":"Service Name exceeds the character limit of {{MAX_NAME_LENGTH}}.","serviceNameRequired":"Service name is required","serviceShortName":"Short Name","servicesList":"Services list","serviceStatus":"Service Status","serviceType":"Service Type","serviceTypeRequired":"Service type is required","shortName":"Short Name","shortNameExceedsLimit":"Short Name exceeds the character limit of {{MAX_NAME_LENGTH}}.","status":"Service Status","submitting":"Submitting...","success":"Success","total":"Total","totalAmount":"Total Amount","totalTendered":"Total Tendered","unitPrice":"Unit price","unitPriceHelperText":"This is the unit price for this item.","updatedSuccessfully":"Billable service updated successfully","uuid":"UUID","uuidRequired":"UUID is required","validationError":"Validation Error","visitTime":"Visit time","waiverForm":"Waiver form"}')}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4300],{34300:e=>{e.exports=JSON.parse('{"add":"Add","addBill":"Add bill item(s)","addBillableServices":"Add Billable Services","addCashPoint":"Add Cash Point","addNewBillableService":"Add new billable service","addNewCashPoint":"Add New Cash Point","addNewPaymentMode":"Add New Payment Mode","addNewService":"Add new service","addPaymentMethod":"Add payment method","addPaymentMode":"Add Payment Mode","addPaymentOption":"Add payment option","amount":"Amount","amountDue":"Amount Due","amountMustBePositive":"Amount must be greater than 0","amountRequired":"Amount is required","amountTendered":"Amount Tendered","amountToWaiveAriaLabel":"Enter amount to waive","amountToWaiveHelper":"Specify the amount to be deducted from the bill","amountToWaiveLabel":"Amount to Waive","associatedConcept":"Associated concept","billableService":"Billable service","billableServices":"Billable Services","billableServices__lower":"billable services","billAmount":"Bill amount","billCode":"Bill code","billedItems":"Billed Items","billedTo":"Billed to","billErrorService":"Bill service error","billing":"Billing","billingForm":"Billing form","billingHistory":"Billing History","billingSettings":"Billing Settings","billItem":"Bill item","billItems":"Bill Items","billLineItemEmpty":"This bill has no line items","billList":"Bill list","billMetrics":"Bill metrics","billName":" {{billName}} ","billPayment":"Bill payment","billPaymentError":"Bill payment error","billPaymentRequiredMessage":"The current patient has a pending bill. Advise the patient to settle the bill before receiving services","billProcessingError":"Bill processing error","billProcessingSuccess":"Bill processing has been successful","billServicesManagement":"Bill services management","billsList":"Bill list","billTotal":"Bill total","billWaiver":"Bill waiver","billWaiverError":"Bill waiver failed {{error}}","billWaiverSuccess":"Bill waiver successful","cashPointConfig":"Cash Point Config","cashPointHistory":"Cash Point History","cashPointLocation":"Cash Point Location","cashPointName":"Cash Point Name","cashPointNamePlaceholder":"e.g., Pharmacy Cash Point","cashPointNameRequired":"Cash Point Name is required","cashPointSaved":"Cash point was successfully saved.","cashPointUuid":"Cash Point UUID","cashPointUuidPlaceholder":"Enter UUID","checkFilters":"Check the filters above","confirmDeleteMessage":"Are you sure you want to delete this payment mode? Proceed cautiously.","createdSuccessfully":"Billable service created successfully","currentPrice":"Current price","date":"Date","dateAndTime":"Date And Time","dateOfPayment":"Date of payment","deletePaymentMode":"Delete Payment Mode","deleting":"Deleting","description":"Description","descriptionPlaceholder":"e.g., Used for all cash transactions","discard":"Discard","discount":"Discount","discountAmount":"Discount Amount","editBillableService":"Edit billable service","editBillableServices":"Edit Billable Services","editBillLineItem":"Edit bill line item","editThisBillItem":"Edit this bill item","enterAmount":"Enter amount","enterConcept":"Associated concept","enterReferenceNumber":"Enter reference number","enterSellingPrice":"Enter selling price","enterServiceName":"Enter service name","enterServiceShortName":"Enter service short name","error":"Error","errorDeletingPaymentMode":"An error occurred while deleting the payment mode.","errorFetchingCashPoints":"An error occurred while fetching cash points.","errorFetchingLocations":"An error occurred while fetching locations.","errorFetchingPaymentModes":"An error occurred while fetching payment modes.","errorLoadingBillServices":"Error loading bill services","errorLoadingPaymentModes":"Payment modes error","errorPrintingInvoice":"Error printing invoice","errorProcessingPayment":"Error processing payment","errorSavingCashPoint":"An error occurred while saving the cash point.","errorSavingPaymentMode":"An error occurred while saving the payment mode.","filterBy":"Filter by","filterTable":"Filter table","grandTotal":"Grand total","home":"Home","identifier":"Identifier","insuranceScheme":"Insurance scheme","invalidUuidFormat":"Invalid UUID format","invalidWaiverAmount":"Invalid waiver amount","inventoryItem":"Inventory item","invoice":"Invoice","invoiceDate":"Invoice date","invoiceError":"Invoice error","invoiceNumber":"Invoice #","invoiceStatus":"Invoice Status","item":"Item","itemsToBeBilled":"Items to be billed","launchBillForm":"Launch bill form","lineItems":"Line items","lineItemUpdated":"Line item updated","lineItemUpdateErrorDefault":"Unable to update the bill line item. Please try again.","lineItemUpdateFailed":"Failed to update line item","lineItemUpdateSuccess":"The bill line item has been updated successfully","loading":"Loading data...","loadingBillInfo":"Loading bill information...","loadingBillingServices":"Loading billing services...","loadingBillItems":"Loading bill items","loadingData":"Loading data","loadingDescription":"Loading","location":"Select Location","locationRequired":"Location is required","manageBillableServices":"Manage billable services","name":"Name","nextPage":"Next page","noBilltoDisplay":"There are no bills to display for this patient","noMatchingBillsToDisplay":"No matching bills to display","noMatchingItemsToDisplay":"No matching items to display","noMatchingServicesToDisplay":"No matching services to display","noResultsFor":"No results for","number":"No","ok":"OK","patientBillingAlert":"Patient Billing Alert","patientBills":"Patient bill","patientBillsDescription":"List of patient bills","patientCategory":"Patient category","paymentAmountCannotExceedAmountDue":"Payment amount cannot exceed amount due","paymentDetails":"Payment Details","paymentMethod":"Payment method","paymentMethods":"Payment methods","paymentMode":"Payment Mode","paymentModeDeleted":"Payment mode was successfully deleted.","paymentModeHistory":"Payment Mode History","paymentModeName":"Payment Mode Name: {{paymentModeName}}","paymentModeNamePlaceholder":"e.g., Cash, Credit Card","paymentModeNameRequired":"Payment Mode Name is required","paymentModeRequired":"Payment mode is required","paymentModeSaved":"Payment mode was successfully saved.","paymentModesConfig":"Payment Modes Config","paymentOptionRequired":"At least one payment option is required","paymentProcessedSuccessfully":"Payment processed successfully","payments":"Payments","pleaseRequiredFields":"Please fill all required fields","policyNumber":"Policy number","postWaiver":"Post waiver","previousPage":"Previous page","price":"Unit Price","priceIsRequired":"Price is required","priceMustBeGreaterThanZero":"Price must be greater than 0","priceMustBeNumber":"Price must be a valid number","priceMustBePositive":"Price must be greater than 0","priceMustBeValidPositiveNumber":"Price must be a valid positive number","prices":"Prices","printBill":"Print bill","printReceipt":"Print receipt","processPayment":"Process Payment","quantity":"Quantity","quantityCannotExceed100":"Quantity cannot exceed 100","quantityMustBeAtLeastOne":"Quantity must be at least 1","quantityMustBeInteger":"Quantity must be a whole number","quantityMustBeNumber":"Quantity must be a valid number","quantityRequired":"Quantity is required","referenceNumber":"Reference number","remove":"Remove","removePaymentMethod":"Remove payment method","saveAndClose":"Save and close","saveBill":"Save Bill","saving":"Saving","searchConcepts":"Search associated concept","searching":"Searching","searchItems":"Search items and services","searchThisTable":"Search this table","selectBillableService":"Select a billable service...","selectedItems":"Selected Items","selectLocation":"Select Location","selectPatientCategory":"Select patient category","selectPaymentMethod":"Select payment method","selectPaymentMethodRequired":"Please select a payment method for all items","selectPaymentMode":"Select payment mode","selectServiceType":"Select service type","sellingPrice":"Selling Price","serviceMetrics":"Service Metrics","serviceName":"Service Name","serviceNameExceedsLimit":"Service Name exceeds the character limit of {{MAX_NAME_LENGTH}}.","serviceNameRequired":"Service name is required","serviceShortName":"Short Name","servicesList":"Services list","serviceStatus":"Service Status","serviceType":"Service Type","serviceTypeRequired":"Service type is required","shortName":"Short Name","shortNameExceedsLimit":"Short Name exceeds the character limit of {{MAX_NAME_LENGTH}}.","status":"Service Status","submitting":"Submitting...","success":"Success","total":"Total","totalAmount":"Total Amount","totalTendered":"Total Tendered","unitPrice":"Unit price","unitPriceHelperText":"This is the unit price for this item.","updatedSuccessfully":"Billable service updated successfully","uuid":"UUID","uuidRequired":"UUID is required","validationError":"Validation Error","visitTime":"Visit time","waiverForm":"Waiver form"}')}}]);
package/dist/4739.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,i)=>{i.d(e,{A:()=>a});var l=i(72996),t=i.n(l),r=i(70159),o=i.n(r)()(t());o.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw h4{margin-bottom:1rem;color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CAC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A,yBAAA,CACA,sBAAA,CAGF,ogBAEE,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,aDtKA,CCuKA,eAAA,CACA,qBAAA,CAMR,4GACE,gBAAA,CACA,YCxJS,CDyJT,4BAAA,CACA,eC1JS,CD2JT,wBDxLI,CCyLJ,kBAAA,CACA,eAAA,CACA,aDtLM,CC0LV,0BAKU,6NACE,aAAA,CACA,UAAA,CAAA,CAQZ,yBAEI,0GACE,cCzLO,CD2LP,4JACE,qBAAA,CACA,SClMK,CDqMH,opBAGE,aAAA,CACA,UAAA,CACA,cAAA,CAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n h4 {\n margin-bottom: layout.$spacing-05;\n color: $text-02;\n font-size: 1rem;\n font-weight: 600;\n }\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const a=o},64739:(n,e,i)=>{i.r(e),i.d(e,{default:()=>F});var l=i(16072),t=i.n(l),r=i(53941),o=i(27804),a=i(7790),_=i(55576),s=i(15847),m=i(54392),c=i(14720),b=i(50930),g=i(85072),A=i.n(g),d=i(97825),p=i.n(d),f=i(77659),C=i.n(f),u=i(55056),y=i.n(u),h=i(10540),w=i.n(h),v=i(41113),E=i.n(v),x=i(12149),$={};$.styleTagTransform=E(),$.setAttributes=y(),$.insert=C().bind(null,"head"),$.domAPI=p(),$.insertStyleElement=w(),A()(x.A,$);const B=x.A&&x.A.locals?x.A.locals:void 0;function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,l=new Array(e);i<e;i++)l[i]=n[i];return l}function I(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function O(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},l=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(i).filter((function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})))),l.forEach((function(e){I(n,e,i[e])}))}return n}function S(n,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):function(n){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e.push.apply(e,i)}return e}(Object(e)).forEach((function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})),n}function D(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var i=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=i){var l,t,r=[],o=!0,a=!1;try{for(i=i.call(n);!(o=(l=i.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(n){a=!0,t=n}finally{try{o||null==i.return||i.return()}finally{if(a)throw t}}return r}}(n,e)||T(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(n){return function(n){if(Array.isArray(n))return k(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||T(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(n,e){if(n){if("string"==typeof n)return k(n,e);var i=Object.prototype.toString.call(n).slice(8,-1);return"Object"===i&&n.constructor&&(i=n.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?k(n,e):void 0}}const F=function(n){var e=n.patientUuid,i=n.closeWorkspace,g="tablet"===(0,s.useLayoutType)(),A=(0,r.useTranslation)().t,d=(0,s.useConfig)(),p=d.defaultCurrency,f=d.postBilledItems,C=D((0,l.useState)(!1),2),u=C[0],y=C[1],h=D((0,l.useState)([]),2),w=h[0],v=h[1],E=(0,m.ly)(),x=E.data,$=E.error,k=E.isLoading;return t().createElement(a.lVW,{className:B.form},t().createElement("div",{className:B.grid},k?t().createElement(a.OuH,{description:(0,s.getCoreTranslation)("loading")+"..."}):$?t().createElement(a.jeF,{kind:"error",lowContrast:!0,title:A("billErrorService","Bill service error"),subtitle:A("errorLoadingBillServices","Error loading bill services")}):t().createElement(a.a32,{id:"searchItems",onChange:function(n){return function(n){if(n){var e=w.find((function(e){return e.uuid===n.uuid}));if(e){var i=S(O({},e),{quantity:e.quantity+1});v(N(w).map((function(e){return e.uuid===n.uuid?i:e})))}else{var l=n.servicePrices||[],t=0,r=null;if(1===l.length){var o=l[0].price;t="number"==typeof o?o:parseFloat(o),r=l[0]}var a={uuid:n.uuid,display:n.name,quantity:1,price:t,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0,selectedPaymentMethod:r,availablePaymentMethods:l};v(N(w).concat([a]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=x?x:[],titleText:A("searchItems","Search items and services")}),w&&w.length>0&&t().createElement("div",{className:B.selectedItemsContainer},t().createElement("h4",null,A("selectedItems","Selected Items")),w.map((function(n){return t().createElement("div",{key:n.uuid,className:B.itemCard},t().createElement("div",{className:B.itemHeader},t().createElement("span",{className:B.itemName},n.display),t().createElement(a.$nd,{kind:"ghost",size:"sm",renderIcon:_.zH,iconDescription:A("remove","Remove"),onClick:function(){return e=n.uuid,i=N(w).filter((function(n){return n.uuid!==e})),void v(i);var e,i}})),t().createElement("div",{className:B.itemControls},n.availablePaymentMethods&&n.availablePaymentMethods.length>1?t().createElement("div",{className:B.controlSection},t().createElement("label",null,A("selectPaymentMethod","Select payment method")),t().createElement(a.a32,{id:"payment-method-".concat(n.uuid),items:n.availablePaymentMethods,size:"md",itemToString:function(n){return n?"".concat(n.name," - ").concat((0,c.aL)("number"==typeof n.price?n.price:parseFloat(n.price),p)):""},selectedItem:n.selectedPaymentMethod,onChange:function(e){var i,l,t,r=e.selectedItem;r&&(i=n.uuid,l=r,t=N(w).map((function(n){return n.uuid===i?S(O({},n),{selectedPaymentMethod:l,price:"number"==typeof l.price?l.price:parseFloat(l.price),priceName:l.name,priceUuid:l.uuid}):n})),v(t))},placeholder:A("selectPaymentMethod","Select payment method"),titleText:""})):t().createElement("div",{className:B.controlSection},t().createElement("label",null,A("unitPrice","Unit Price")),t().createElement("span",{className:B.priceDisplay},(0,c.aL)(n.price,p))),t().createElement("div",{className:B.controlSection},t().createElement("label",null,A("quantity","Quantity")),t().createElement(a.Q7x,{id:"quantity-".concat(n.uuid),min:1,value:n.quantity,size:"md",onChange:function(e,i){var l,t,r,o=i.value,a=parseFloat(String(o));l=n.uuid,t=isNaN(a)?1:a,r=N(w).map((function(n){return n.uuid===l?S(O({},n),{quantity:t}):n})),v(r)}})),t().createElement("div",{className:B.controlSection},t().createElement("label",null,A("total","Total")),t().createElement("span",{className:B.totalDisplay},(0,c.aL)(n.price*n.quantity,p)))))})),t().createElement("div",{className:B.grandTotal},t().createElement("strong",null,A("grandTotal","Grand total"),":"," ",(0,c.aL)((0,c.Zz)(w),p))))),t().createElement(a.Te$,{className:g?B.tablet:B.desktop},t().createElement(a.$nd,{className:B.button,kind:"secondary",disabled:u,onClick:i},A("discard","Discard")),t().createElement(a.$nd,{className:B.button,kind:"primary",onClick:function(){if(function(){var n=!0,e=!1,i=void 0;try{for(var l,t=w[Symbol.iterator]();!(n=(l=t.next()).done);n=!0){var r=l.value;if(r.availablePaymentMethods&&r.availablePaymentMethods.length>1&&!r.selectedPaymentMethod)return(0,s.showSnackbar)({title:A("validationError","Validation Error"),subtitle:A("selectPaymentMethodRequired","Please select a payment method for all items"),kind:"error"}),!1}}catch(n){e=!0,i=n}finally{try{n||null==t.return||t.return()}finally{if(e)throw i}}return!0}()){y(!0);var n={cashPoint:f.cashPoint,cashier:f.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"};w.forEach((function(e){var i={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(i)}));var l="".concat(b.B,"bill");(0,m.Xn)(n).then((function(){y(!1),i(),(0,o.j)((function(n){return"string"==typeof n&&n.startsWith(l)}),void 0,{revalidate:!0}),(0,s.showSnackbar)({title:A("saveBill","Save Bill"),subtitle:A("billProcessingSuccess","Bill processing has been successful"),kind:"success"})}),(function(n){y(!1),(0,s.showSnackbar)({title:A("billProcessingError","Bill processing error"),kind:"error",subtitle:null==n?void 0:n.message})}))}},disabled:u||0===w.length,type:"submit"},u?t().createElement(a.OuH,{description:A("saving","Saving")+"..."}):A("saveAndClose","Save and close"))))}}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,i)=>{i.d(e,{A:()=>a});var l=i(72996),t=i.n(l),r=i(70159),o=i.n(r)()(t());o.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw h4{margin-bottom:1rem;color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,4CACE,mBAAA,CACA,qBDFM,CCKR,6CACE,YAAA,CAGF,6CACE,WC2CW,CD1CX,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAEA,kEACE,0BAAA,CAGF,wEACE,0BAAA,CAIJ,yCACE,eCYW,CDTb,mDACE,iBAAA,CACA,qBAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA,CACA,SAAA,CACA,SAAA,CAGF,gDACE,yBAAA,CACA,0BAAA,CACA,cAAA,CAGF,kDACE,oBAAA,CAGF,mDACE,aAAA,CACA,UAAA,CACA,cAAA,CAGF,0CACE,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,yBAAA,CAGF,sEACE,wBAAA,CAG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02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n h4 {\n margin-bottom: layout.$spacing-05;\n color: $text-02;\n font-size: 1rem;\n font-weight: 600;\n }\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const a=o},64739:(n,e,i)=>{i.r(e),i.d(e,{default:()=>F});var l=i(16072),t=i.n(l),r=i(53941),o=i(27804),a=i(7790),_=i(55576),s=i(15847),m=i(54392),c=i(14720),b=i(50930),g=i(85072),d=i.n(g),A=i(97825),p=i.n(A),f=i(77659),C=i.n(f),u=i(55056),y=i.n(u),h=i(10540),w=i.n(h),v=i(41113),E=i.n(v),x=i(12149),$={};$.styleTagTransform=E(),$.setAttributes=y(),$.insert=C().bind(null,"head"),$.domAPI=p(),$.insertStyleElement=w(),d()(x.A,$);const B=x.A&&x.A.locals?x.A.locals:void 0;function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,l=new Array(e);i<e;i++)l[i]=n[i];return l}function I(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function O(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},l=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(i).filter((function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})))),l.forEach((function(e){I(n,e,i[e])}))}return n}function S(n,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):function(n){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e.push.apply(e,i)}return e}(Object(e)).forEach((function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})),n}function D(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var i=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=i){var l,t,r=[],o=!0,a=!1;try{for(i=i.call(n);!(o=(l=i.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(n){a=!0,t=n}finally{try{o||null==i.return||i.return()}finally{if(a)throw t}}return r}}(n,e)||T(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(n){return function(n){if(Array.isArray(n))return k(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||T(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(n,e){if(n){if("string"==typeof n)return k(n,e);var i=Object.prototype.toString.call(n).slice(8,-1);return"Object"===i&&n.constructor&&(i=n.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?k(n,e):void 0}}const F=function(n){var e=n.patientUuid,i=n.closeWorkspace,g="tablet"===(0,s.useLayoutType)(),d=(0,r.useTranslation)().t,A=(0,s.useConfig)(),p=A.defaultCurrency,f=A.postBilledItems,C=D((0,l.useState)(!1),2),u=C[0],y=C[1],h=D((0,l.useState)([]),2),w=h[0],v=h[1],E=(0,m.ly)(),x=E.data,$=E.error,k=E.isLoading;return t().createElement(a.lVW,{className:B.form},t().createElement("div",{className:B.grid},k?t().createElement(a.OuH,{description:(0,s.getCoreTranslation)("loading")+"..."}):$?t().createElement(a.jeF,{kind:"error",lowContrast:!0,title:d("billErrorService","Bill service error"),subtitle:d("errorLoadingBillServices","Error loading bill services")}):t().createElement(a.a32,{id:"searchItems",onChange:function(n){return function(n){if(n){var e=w.find((function(e){return e.uuid===n.uuid}));if(e){var i=S(O({},e),{quantity:e.quantity+1});v(N(w).map((function(e){return e.uuid===n.uuid?i:e})))}else{var l=n.servicePrices||[],t=0,r=null;if(1===l.length){var o=l[0].price;t="number"==typeof o?o:parseFloat(o),r=l[0]}var a={uuid:n.uuid,display:n.name,quantity:1,price:t,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0,selectedPaymentMethod:r,availablePaymentMethods:l};v(N(w).concat([a]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=x?x:[],titleText:d("searchItems","Search items and services")}),w&&w.length>0&&t().createElement("div",{className:B.selectedItemsContainer},t().createElement("h4",null,d("selectedItems","Selected Items")),w.map((function(n){return t().createElement("div",{key:n.uuid,className:B.itemCard},t().createElement("div",{className:B.itemHeader},t().createElement("span",{className:B.itemName},n.display),t().createElement(a.$nd,{kind:"ghost",size:"sm",renderIcon:_.zH,iconDescription:d("remove","Remove"),onClick:function(){return e=n.uuid,i=N(w).filter((function(n){return n.uuid!==e})),void v(i);var e,i}})),t().createElement("div",{className:B.itemControls},n.availablePaymentMethods&&n.availablePaymentMethods.length>1?t().createElement("div",{className:B.controlSection},t().createElement("label",null,d("selectPaymentMethod","Select payment method")),t().createElement(a.a32,{id:"payment-method-".concat(n.uuid),items:n.availablePaymentMethods,size:"md",itemToString:function(n){return n?"".concat(n.name," - ").concat((0,c.aL)("number"==typeof n.price?n.price:parseFloat(n.price),p)):""},selectedItem:n.selectedPaymentMethod,onChange:function(e){var i,l,t,r=e.selectedItem;r&&(i=n.uuid,l=r,t=N(w).map((function(n){return n.uuid===i?S(O({},n),{selectedPaymentMethod:l,price:"number"==typeof l.price?l.price:parseFloat(l.price),priceName:l.name,priceUuid:l.uuid}):n})),v(t))},placeholder:d("selectPaymentMethod","Select payment method"),titleText:""})):t().createElement("div",{className:B.controlSection},t().createElement("label",null,d("unitPrice","Unit Price")),t().createElement("span",{className:B.priceDisplay},(0,c.aL)(n.price,p))),t().createElement("div",{className:B.controlSection},t().createElement("label",null,d("quantity","Quantity")),t().createElement(a.Q7x,{disableWheel:!0,hideSteppers:!0,id:"quantity-".concat(n.uuid),min:1,value:n.quantity,size:"md",onChange:function(e,i){var l,t,r,o=i.value,a=parseFloat(String(o));l=n.uuid,t=isNaN(a)?1:a,r=N(w).map((function(n){return n.uuid===l?S(O({},n),{quantity:t}):n})),v(r)}})),t().createElement("div",{className:B.controlSection},t().createElement("label",null,d("total","Total")),t().createElement("span",{className:B.totalDisplay},(0,c.aL)(n.price*n.quantity,p)))))})),t().createElement("div",{className:B.grandTotal},t().createElement("strong",null,d("grandTotal","Grand total"),":"," ",(0,c.aL)((0,c.Zz)(w),p))))),t().createElement(a.Te$,{className:g?B.tablet:B.desktop},t().createElement(a.$nd,{className:B.button,kind:"secondary",disabled:u,onClick:i},d("discard","Discard")),t().createElement(a.$nd,{className:B.button,kind:"primary",onClick:function(){if(function(){var n=!0,e=!1,i=void 0;try{for(var l,t=w[Symbol.iterator]();!(n=(l=t.next()).done);n=!0){var r=l.value;if(r.availablePaymentMethods&&r.availablePaymentMethods.length>1&&!r.selectedPaymentMethod)return(0,s.showSnackbar)({title:d("validationError","Validation Error"),subtitle:d("selectPaymentMethodRequired","Please select a payment method for all items"),kind:"error"}),!1}}catch(n){e=!0,i=n}finally{try{n||null==t.return||t.return()}finally{if(e)throw i}}return!0}()){y(!0);var n={cashPoint:f.cashPoint,cashier:f.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"};w.forEach((function(e){var i={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(i)}));var l="".concat(b.B,"bill");(0,m.Xn)(n).then((function(){y(!1),i(),(0,o.j)((function(n){return"string"==typeof n&&n.startsWith(l)}),void 0,{revalidate:!0}),(0,s.showSnackbar)({title:d("saveBill","Save Bill"),subtitle:d("billProcessingSuccess","Bill processing has been successful"),kind:"success"})}),(function(n){y(!1),(0,s.showSnackbar)({title:d("billProcessingError","Bill processing error"),kind:"error",subtitle:null==n?void 0:n.message})}))}},disabled:u||0===w.length,type:"submit"},u?t().createElement(a.OuH,{description:d("saving","Saving")+"..."}):d("saveAndClose","Save and close"))))}}}]);
package/dist/4739.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"4739.js","mappings":"qMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,wlPAAylP,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,wEAAwE,MAAQ,GAAG,SAAW,y7CAAy7C,eAAiB,CAAC,g/DAAg/D,mmJAAmmJ,25DAA25D,WAAa,MAEpzjBH,EAAwBI,OAAS,CAChC,OAAU,6CACV,QAAW,8CACX,OAAU,6CACV,IAAO,0CACP,cAAiB,oDACjB,WAAc,iDACd,aAAgB,mDAChB,aAAgB,mDAChB,KAAQ,2CACR,KAAQ,2CACR,IAAO,0CACP,OAAU,6CACV,uBAA0B,6DAC1B,SAAY,+CACZ,WAAc,iDACd,SAAY,+CACZ,aAAgB,mDAChB,eAAkB,qDAClB,aAAgB,mDAChB,aAAgB,mDAChB,WAAc,kDAEf,S,kSCnBIC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQD,OAAS,IAAQA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AAA,6B,YAAA,E,MAAA,C,EAUL,OAAO,CACT,CAGO0E,GAAL,CAIA3F,GAAgB,GAChB,IAAM4F,EAAO,CACXC,UAAWhG,EAAgBgG,UAC3BC,QAASjG,EAAgBiG,QACzBC,UAAW,GACXC,SAAU,GACVC,QAAS5G,EACT6G,OAAQ,WAGVjG,EAAckG,SAAQ,SAAC5E,GACrB,IAAM6E,EAAqB,CACzBvE,SAAUN,EAAKM,SACfO,MAAOb,EAAKa,MACZO,cAAe,EACfD,cAAe,UACfD,gBAAiBlB,EAAKI,MAGxBiE,EAAKG,UAAUrH,KAAK0H,EACtB,IAEA,IAAMC,EAAM,GAAe,OAAZC,EAAAA,EAAY,SAC3BC,EAAAA,EAAAA,IAAiBX,GAAMY,MACrB,WACExG,GAAgB,GAEhBV,KACAmH,EAAAA,EAAAA,IAAO,SAACvD,G,MAAuB,iBAARA,GAAoBA,EAAIwD,WAAWL,E,QAAMjH,EAAW,CAAEuH,YAAY,KACzFjB,EAAAA,EAAAA,cAAa,CACXvE,MAAOzB,EAAE,WAAY,aACrB0B,SAAU1B,EAAE,wBAAyB,uCACrCuB,KAAM,WAEV,IACA,SAACZ,GACCL,GAAgB,IAChB0F,EAAAA,EAAAA,cAAa,CACXvE,MAAOzB,EAAE,sBAAuB,yBAChCuB,KAAM,QACNG,SAAUf,aAAAA,EAAAA,EAAOuG,SAErB,GA5CF,CA8CF,EAkHQnB,SAAU1F,GAAyC,IAAzBE,EAAckC,OACxC0E,KAAK,UACJ9G,EACC,kBAACc,EAAAA,IAAaA,CAACC,YAAapB,EAAE,SAAU,UAAY,QAEpDA,EAAE,eAAgB,oBAM9B,C","sources":["webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?df6c","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","patientUuid","closeWorkspace","isTablet","useLayoutType","useTranslation","t","useConfig","defaultCurrency","postBilledItems","useState","isSubmitting","setIsSubmitting","selectedItems","setSelectedItems","useBillableServices","data","error","isLoading","Form","className","styles","form","div","grid","InlineLoading","description","getCoreTranslation","InlineNotification","kind","lowContrast","title","subtitle","ComboBox","onChange","item","existingItem","find","selectedItem","uuid","updatedItem","quantity","map","availablePaymentMethods","servicePrices","defaultPrice","selectedPaymentMethod","length","price","parseFloat","mappedItem","display","name","billableService","paymentStatus","lineItemOrder","selectBillableItem","itemToString","items","titleText","selectedItemsContainer","h4","key","itemCard","itemHeader","span","itemName","Button","size","renderIcon","TrashCan","iconDescription","onClick","updatedItems","filter","itemControls","controlSection","label","method","convertToCurrency","itemUuid","paymentMethod","priceName","priceUuid","placeholder","priceDisplay","NumberInput","min","value","_","number","String","isNaN","totalDisplay","grandTotal","strong","calculateTotalAmount","ButtonSet","tablet","desktop","button","disabled","showSnackbar","validateSelectedItems","bill","cashPoint","cashier","lineItems","payments","patient","status","forEach","lineItem","url","apiBasePath","processBillItems","then","mutate","startsWith","revalidate","message","type"],"sourceRoot":""}
1
+ {"version":3,"file":"4739.js","mappings":"qMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,wlPAAylP,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,wEAAwE,MAAQ,GAAG,SAAW,y7CAAy7C,eAAiB,CAAC,g/DAAg/D,mmJAAmmJ,25DAA25D,WAAa,MAEpzjBH,EAAwBI,OAAS,CAChC,OAAU,6CACV,QAAW,8CACX,OAAU,6CACV,IAAO,0CACP,cAAiB,oDACjB,WAAc,iDACd,aAAgB,mDAChB,aAAgB,mDAChB,KAAQ,2CACR,KAAQ,2CACR,IAAO,0CACP,OAAU,6CACV,uBAA0B,6DAC1B,SAAY,+CACZ,WAAc,iDACd,SAAY,+CACZ,aAAgB,mDAChB,eAAkB,qDAClB,aAAgB,mD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AAapB,EAAE,SAAU,UAAY,QAEpDA,EAAE,eAAgB,oBAM9B,C","sources":["webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?df6c","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","patientUuid","closeWorkspace","isTablet","useLayoutType","useTranslation","t","useConfig","defaultCurrency","postBilledItems","useState","isSubmitting","setIsSubmitting","selectedItems","setSelectedItems","useBillableServices","data","error","isLoading","Form","className","styles","form","div","grid","InlineLoading","description","getCoreTranslation","InlineNotification","kind","lowContrast","title","subtitle","ComboBox","onChange","item","existingItem","find","selectedItem","uuid","updatedItem","quantity","map","availablePaymentMethods","servicePrices","defaultPrice","selectedPaymentMethod","length","price","parseFloat","mappedItem","display","name","billableService","paymentStatus","lineItemOrder","selectBillableItem","itemToString","items","titleText","selectedItemsContainer","h4","key","itemCard","itemHeader","span","itemName","Button","size","renderIcon","TrashCan","iconDescription","onClick","updatedItems","filter","itemControls","controlSection","label","method","convertToCurrency","itemUuid","paymentMethod","priceName","priceUuid","placeholder","priceDisplay","NumberInput","disableWheel","hideSteppers","min","value","_","number","String","isNaN","totalDisplay","grandTotal","strong","calculateTotalAmount","ButtonSet","tablet","desktop","button","disabled","showSnackbar","validateSelectedItems","bill","cashPoint","cashier","lineItems","payments","patient","status","forEach","lineItem","url","apiBasePath","processBillItems","then","mutate","startsWith","revalidate","message","type"],"sourceRoot":""}