@ampath/esm-dha-workflow-app 4.0.0-next.453 → 4.0.0-next.455
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/dist/1100.js +1 -1
- package/dist/1435.js +1 -1
- package/dist/1435.js.map +1 -1
- package/dist/2535.js +1 -1
- package/dist/2592.js +1 -1
- package/dist/2663.js +1 -1
- package/dist/2687.js +1 -1
- package/dist/2808.js +1 -1
- package/dist/2848.js +1 -1
- package/dist/3.js +1 -1
- package/dist/3016.js +1 -1
- package/dist/3182.js +1 -1
- package/dist/3196.js +1 -1
- package/dist/3242.js +1 -1
- package/dist/3288.js +1 -1
- package/dist/3612.js +1 -1
- package/dist/3794.js +1 -1
- package/dist/3897.js +1 -1
- package/dist/3949.js +1 -1
- package/dist/3949.js.map +1 -1
- package/dist/408.js +1 -1
- package/dist/409.js +1 -1
- package/dist/4300.js +1 -1
- package/dist/4399.js +1 -1
- package/dist/4569.js +1 -1
- package/dist/474.js +1 -1
- package/dist/5119.js +1 -1
- package/dist/5138.js +1 -1
- package/dist/5179.js +1 -1
- package/dist/5244.js +1 -1
- package/dist/5353.js +1 -1
- package/dist/5377.js +1 -1
- package/dist/5377.js.map +1 -1
- package/dist/5500.js +1 -1
- package/dist/5805.js +1 -1
- package/dist/6048.js +1 -1
- package/dist/6055.js +1 -1
- package/dist/6206.js +1 -1
- package/dist/6279.js +1 -1
- package/dist/6682.js +1 -1
- package/dist/6802.js +1 -1
- package/dist/72.js +1 -1
- package/dist/{4457.js → 7269.js} +1 -1
- package/dist/7269.js.map +1 -0
- package/dist/7694.js +1 -1
- package/dist/7698.js +1 -1
- package/dist/7734.js +1 -1
- package/dist/7949.js +2 -0
- package/dist/7949.js.map +1 -0
- package/dist/7958.js +1 -0
- package/dist/7958.js.map +1 -0
- package/dist/8137.js +1 -1
- package/dist/8167.js +1 -1
- package/dist/818.js +1 -1
- package/dist/8735.js +1 -1
- package/dist/8961.js +1 -1
- package/dist/902.js +1 -1
- package/dist/9134.js +1 -1
- package/dist/9429.js +1 -1
- package/dist/9442.js +1 -1
- package/dist/968.js +1 -1
- package/dist/9770.js +1 -1
- package/dist/9879.js +1 -1
- package/dist/9974.js +1 -1
- package/dist/esm-dha-workflow-app.js +1 -1
- package/dist/esm-dha-workflow-app.js.buildmanifest.json +166 -214
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/billing/dashboard/v3/patient-bill-details/patient-visit-details.tsx +8 -43
- package/src/billing/dashboard/v3/patient-bill-details/patient-visit.scss +0 -7
- package/src/config-schema.ts +3 -33
- package/src/index.ts +9 -12
- package/src/routes.json +0 -8
- package/translations/en.json +0 -1
- package/dist/2257.js +0 -2
- package/dist/2257.js.map +0 -1
- package/dist/2904.js +0 -1
- package/dist/2904.js.map +0 -1
- package/dist/4457.js.map +0 -1
- package/dist/4535.js +0 -1
- package/dist/4535.js.map +0 -1
- package/dist/5771.js +0 -1
- package/dist/5771.js.map +0 -1
- package/src/billing/dashboard/v3/finalize-bill/bill-line-items/bill-line-items.component.tsx +0 -101
- package/src/billing/dashboard/v3/finalize-bill/bill-line-items/bill-line-items.scss +0 -69
- package/src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.scss +0 -11
- package/src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.tsx +0 -72
- package/src/billing/dashboard/v3/finalize-bill/finalize-bill.component.scss +0 -68
- package/src/billing/dashboard/v3/finalize-bill/finalize-bill.component.tsx +0 -261
- package/src/billing/dashboard/v3/finalize-bill/finalize-bill.resource.ts +0 -68
- package/src/billing/dashboard/v3/finalize-bill/helpers/functions.ts +0 -85
- package/src/billing/dashboard/v3/finalize-bill/helpers/index.ts +0 -1
- package/src/billing/dashboard/v3/finalize-bill/payments/invoice-breakdown/invoice-breakdown.component.tsx +0 -17
- package/src/billing/dashboard/v3/finalize-bill/payments/invoice-breakdown/invoice-breakdown.scss +0 -29
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-form/payment-form.component.tsx +0 -60
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-form/payment-form.scss +0 -53
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-form/payment-form.test.tsx +0 -211
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-form/payment-form.utils.ts +0 -87
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-history/payment-history.component.tsx +0 -77
- package/src/billing/dashboard/v3/finalize-bill/payments/payment-history/payment-history.test.tsx +0 -158
- package/src/billing/dashboard/v3/finalize-bill/payments/payments.component.tsx +0 -238
- package/src/billing/dashboard/v3/finalize-bill/payments/payments.scss +0 -77
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/print-receipt.component.tsx +0 -43
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/print-receipt.scss +0 -14
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/print-receipt.test.tsx +0 -133
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-footer.component.tsx +0 -19
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-footer.scss +0 -17
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-footer.test.tsx +0 -22
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-invoice-header.component.tsx +0 -109
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-invoice-header.scss +0 -62
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-invoice-header.test.tsx +0 -159
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-invoice.component.tsx +0 -221
- package/src/billing/dashboard/v3/finalize-bill/payments/printable-invoice/printable-invoice.scss +0 -55
- package/src/billing/dashboard/v3/finalize-bill/types.ts +0 -248
- /package/dist/{2257.js.LICENSE.txt → 7949.js.LICENSE.txt} +0 -0
package/dist/4535.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[4535],{54535(a,h,t){t.d(h,{K7:()=>w});var e=t(60428),r=t(96031),p=t.n(r),o=t(21020);const w=p().forwardRef(function({children:a,size:h=16,...t},r){return p().createElement(e.A,{width:h,height:h,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...t},(0,o.Y)("path",{d:"M16 22H30V24H16z"}),(0,o.Y)("path",{d:"M14 19.4 12.6 18 6 24.6 3.4 22 2 23.4 6 27.4z"}),(0,o.Y)("path",{d:"M16 8H30V10H16z"}),(0,o.Y)("path",{d:"M14 5.4 12.6 4 6 10.6 3.4 8 2 9.4 6 13.4z"}),a)})}}]);
|
package/dist/4535.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"4535.js","mappings":"sNAksDA,MAAAA,EAAkCC,IAAAC,WAAgB,UAAAC,SAAwBA,EAAAC,KAAAA,EAAA,MAAAC,GAA8BC,GACxG,OAAQL,IAAAM,cAAoBC,EAAAC,EAAI,CAChCC,MAAAN,EACAO,OAAAP,EACAE,MACAM,MAAA,6BACAC,QAAA,YACAC,KAAA,kBACAT,IACoB,EAAAU,EAAAC,GAAG,QAAWC,EAAA,sBAA0C,EAAAF,EAAAC,GAAG,QAAWC,EAAA,mDAAuE,EAAAF,EAAAC,GAAG,QAAWC,EAAA,qBAAyC,EAAAF,EAAAC,GAAG,QAAWC,EAAA,8CAAgDd,EACtR","sources":["webpack://@ampath/esm-dha-workflow-app/./node_modules/@carbon/icons-react/es/generated/bucket-11.js"],"names":["ListChecked","react__WEBPACK_IMPORTED_MODULE_1___default","forwardRef","children","size","rest","ref","createElement","_Icon_js__WEBPACK_IMPORTED_MODULE_0__","A","width","height","xmlns","viewBox","fill","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__","Y","d"],"sourceRoot":""}
|
package/dist/5771.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[5771,9709],{40975(n,e,t){t.d(e,{A:()=>l});var r=t(72996),o=t.n(r),i=t(70159),a=t.n(i)()(o());a.push([n.id,".omrs-modals-container>.cds--modal-container{position:fixed !important;inset:50% auto auto 50% !important;max-block-size:calc(100vh - 2rem) !important;margin:0 !important;transform:translate(-50%, -50%) !important}.-esm-dha-workflow__finalize-bill-confirmation-modal__modalBody___shhN1{box-sizing:border-box}","",{version:3,sources:["webpack://./src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.scss"],names:[],mappings:"AAAA,6CACE,yBAAA,CACA,kCAAA,CACA,4CAAA,CACA,mBAAA,CACA,0CAAA,CAGF,wEACE,qBAAA",sourcesContent:[":global(.omrs-modals-container) > :global(.cds--modal-container) {\n position: fixed !important;\n inset: 50% auto auto 50% !important;\n max-block-size: calc(100vh - 2rem) !important;\n margin: 0 !important;\n transform: translate(-50%, -50%) !important;\n}\n\n.modalBody {\n box-sizing: border-box;\n}\n"],sourceRoot:""}]),a.locals={modalBody:"-esm-dha-workflow__finalize-bill-confirmation-modal__modalBody___shhN1"};const l=a},70159(n){n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=n(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t}).join("")},e.i=function(n,t,r){"string"==typeof n&&(n=[[null,n,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<n.length;l++){var u=[].concat(n[l]);r&&o[u[0]]||(t&&(u[2]?u[2]="".concat(t," and ").concat(u[2]):u[2]=t),e.push(u))}},e}},72996(n){function e(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}n.exports=function(n){var t,r,o=(r=4,function(n){if(Array.isArray(n))return n}(t=n)||function(n,e){var t=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null!=t){var r,o,i=[],a=!0,l=!1;try{for(t=t.call(n);!(a=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(n){l=!0,o=n}finally{try{a||null==t.return||t.return()}finally{if(l)throw o}}return i}}(t,r)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(n,t):void 0}}(t,r)||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.")}()),i=o[1],a=o[3];if(!a)return i;if("function"==typeof btoa){var l=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),c="/*# ".concat(u," */"),s=a.sources.map(function(n){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(n," */")});return[i].concat(s).concat([c]).join("\n")}return[i].join("\n")}},85771(n,e,t){t.r(e),t.d(e,{default:()=>E});var r=t(96031),o=t.n(r),i=t(42257),a=t(97419),l=t(13987),u=t(6598),c=t(85072),s=t.n(c),d=t(97825),f=t.n(d),p=t(77659),m=t.n(p),v=t(55056),b=t.n(v),y=t(10540),h=t.n(y),g=t(41113),A=t.n(g),w=t(40975),S={};S.styleTagTransform=A(),S.setAttributes=b(),S.insert=m().bind(null,"head"),S.domAPI=f(),S.insertStyleElement=h(),s()(w.A,S);const O=w.A&&w.A.locals?w.A.locals:void 0;function C(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function j(n,e,t,r,o,i,a){try{var l=n[i](a),u=l.value}catch(n){return void t(n)}l.done?e(u):Promise.resolve(u).then(r,o)}function P(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i=[],a=!0,l=!1;try{for(t=t.call(n);!(a=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(n){l=!0,o=n}finally{try{a||null==t.return||t.return()}finally{if(l)throw o}}return i}}(n,e)||function(n,e){if(n){if("string"==typeof n)return C(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(n,e):void 0}}(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.")}()}const E=function(n){var e=n.billUuid,t=n.closeModal,c=n.onMutate,s=(0,l.useTranslation)().t,d=P((0,r.useState)(!1),2),f=d[0],p=d[1],m=P((0,r.useState)(""),2),v=m[0],b=m[1];return o().createElement(o().Fragment,null,o().createElement(i.rQ0,{closeModal:t,title:s("finalizeBill","Finalize bill")}),o().createElement(i.cwr,{className:O.modalBody},o().createElement("p",null,s("finalizeBillConfirmation","Are you sure you want to finalize this bill? Once finalized, no further modifications will be allowed.")),v?o().createElement("p",{role:"alert"},v):null,f?o().createElement(i.OuH,{description:s("finalizing","Finalizing bill...")}):null),o().createElement(i.jlY,null,o().createElement(i.$nd,{kind:"secondary",disabled:f,onClick:t},s("cancel","Cancel")),o().createElement(i.$nd,{kind:"danger",disabled:f||!e,onClick:function(){return(n=function(){var n,r;return function(n,e){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=e.call(n,i)}catch(n){l=[6,n],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}(this,function(o){switch(o.label){case 0:if(!e||f)return[2];p(!0),b(""),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,(0,u.yj)(e)];case 2:return o.sent(),[4,null==c?void 0:c()];case 3:return o.sent(),(0,a.showSnackbar)({kind:"success",title:s("billFinalized","Bill finalized"),subtitle:s("billFinalizedSuccess","Bill has been finalized successfully.")}),t(),[3,6];case 4:return i=n=o.sent(),l=Error,r=(null!=l&&"undefined"!=typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](i):i instanceof l)?n.message:String(n),b(r||s("finalizeBillFailed","Unable to finalize this bill. Please try again.")),[3,6];case 5:return p(!1),[7];case 6:return[2]}var i,l})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(n){j(i,r,o,a,l,"next",n)}function l(n){j(i,r,o,a,l,"throw",n)}a(void 0)})})();var n}},f?s("finalizing","Finalizing..."):s("confirmFinalizeBill","Confirm finalization"))))}},6598(n,e,t){t.d(e,{DX:()=>s,TS:()=>c,pC:()=>d,yj:()=>u});var r=t(97419),o=t(68563),i=t(22272),a=t(55642);function l(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var u=function(n){var e="".concat(r.restBaseUrl,"/billing/bill/").concat(n);return(0,r.openmrsFetch)(e,{method:"POST",body:{status:o.ih.POSTED},headers:{"Content-Type":"application/json"}})},c=function(n,e){var t="".concat(r.restBaseUrl,"/billing/bill/").concat(e,"/payment");return(0,r.openmrsFetch)(t,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})};function s(n){var e="".concat(r.restBaseUrl,"/billing/bill/").concat(n),t=(0,i.u)(n?e:null,r.openmrsFetch),o=t.data,a=t.error,l=t.isLoading,u=t.isValidating,c=t.mutate;return{bill:null==o?void 0:o.data,error:a,isLoading:l,isValidating:u,mutate:c}}var d=function(n){var e,t,r,o,i,u,c,s,d,f,p,m,v=null!==(e=null==n||null===(r=n.lineItems)||void 0===r?void 0:r.filter(function(n){return!n.voided}))&&void 0!==e?e:[],b=(0,a.N4)(null==n||null===(o=n.patient)||void 0===o?void 0:o.display),y=b.identifier,h=b.name;return p=function(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.forEach(function(e){l(n,e,t[e])})}return n}({},n),m=null!=(m={patientName:h,identifier:y,patientUuid:null==n||null===(i=n.patient)||void 0===i?void 0:i.uuid,visitUuid:null==n||null===(u=n.visit)||void 0===u?void 0:u.uuid,cashPointUuid:null==n||null===(c=n.cashPoint)||void 0===c?void 0:c.uuid,cashPointName:null==n||null===(s=n.cashPoint)||void 0===s?void 0:s.name,cashPointLocation:null==n||null===(f=n.cashPoint)||void 0===f||null===(d=f.location)||void 0===d?void 0:d.display,status:n.status,lineItems:v,billingService:v.map(function(n){return(null==n?void 0:n.item)||(null==n?void 0:n.billableService)||"--"}).join(" "),totalAmount:n.total,netAmount:n.amountAfterDiscount,tenderedAmount:(null!==(t=null==n?void 0:n.payments)&&void 0!==t?t:[]).map(function(n){var e;return null!==(e=n.amountTendered)&&void 0!==e?e:0}).reduce(function(n,e){return n+e},0)})?m:{},Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(m)):function(n){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e.push.apply(e,t)}return e}(Object(m)).forEach(function(n){Object.defineProperty(p,n,Object.getOwnPropertyDescriptor(m,n))}),p}},55642(n,e,t){t.d(e,{aL:()=>r,gJ:()=>o,N4:()=>i}),t(97419);var r=function(n,e){var t,r,o,i=null!==(t=null===(o=window.i18next)||void 0===o||null===(r=o.language)||void 0===r?void 0:r.substring(0,2))&&void 0!==t?t:"",a=new Intl.NumberFormat(i,{style:"currency",currency:e,minimumFractionDigits:2}).format(Math.abs(n));return n<0&&(a="(".concat(a,")")),a},o=function(n){var e,t;return(null!==(e=n.price)&&void 0!==e?e:0)*(null!==(t=n.quantity)&&void 0!==t?t:0)},i=function(n){if(!n)return{identifier:"",name:""};var e=n.indexOf(" - ");return-1===e?{identifier:"",name:n.trim()}:{identifier:n.substring(0,e).trim(),name:n.substring(e+3).trim()}}},68563(n,e,t){t.d(e,{ih:()=>r});var r={PENDING:"PENDING",POSTED:"POSTED",PAID:"PAID"}},85072(n){var e=[];function t(n){for(var t=-1,r=0;r<e.length;r++)if(e[r].identifier===n){t=r;break}return t}function r(n,r){for(var i={},a=[],l=0;l<n.length;l++){var u=n[l],c=r.base?u[0]+r.base:u[0],s=i[c]||0,d="".concat(c," ").concat(s);i[c]=s+1;var f=t(d),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==f)e[f].references++,e[f].updater(p);else{var m=o(p,r);r.byIndex=l,e.splice(l,0,{identifier:d,updater:m,references:1})}a.push(d)}return a}function o(n,e){var t=e.domAPI(e);return t.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;t.update(n=e)}else t.remove()}}n.exports=function(n,o){var i=r(n=n||[],o=o||{});return function(n){n=n||[];for(var a=0;a<i.length;a++){var l=t(i[a]);e[l].references--}for(var u=r(n,o),c=0;c<i.length;c++){var s=t(i[c]);0===e[s].references&&(e[s].updater(),e.splice(s,1))}i=u}}},77659(n){var e={};n.exports=function(n,t){var r=function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}e[n]=t}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},10540(n){n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},55056(n,e,t){n.exports=function(n){var e=t.nc;e&&n.setAttribute("nonce",e)}},97825(n){n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(t){!function(n,e,t){var r="";t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {"));var o=void 0!==t.layer;o&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}");var i=t.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,t)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},41113(n){n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextN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,gBCCArP,EAAAW,QANA,SAAA4O,GACA,IAAAC,EAAyDC,EAAAC,GACzDF,GACAD,EAAAI,aAAA,QAAAH,EAEA,YCoDAxP,EAAAW,QAjBA,SAAA8D,GACA,uBAAAoK,SACA,OACAV,OAAA,aACAE,OAAA,cAGA,IAAAkB,EAAA9K,EAAAU,mBAAAV,GACA,OACA0J,OAAA,SAAAZ,IAjDA,SAAAgC,EAAA9K,EAAA8I,GACA,IAAAC,EAAA,GACAD,EAAAI,WACAH,GAAA,cAAArM,OAAAoM,EAAAI,SAAA,QAEAJ,EAAAE,QACAD,GAAA,UAAArM,OAAAoM,EAAAE,MAAA,OAEA,IAAAmC,OAAA,IAAArC,EAAAK,MACAgC,IACApC,GAAA,SAAArM,OAAAoM,EAAAK,MAAAlM,OAAA,MAAAP,OAAAoM,EAAAK,OAAA,UAEAJ,GAAAD,EAAAC,IACAoC,IACApC,GAAA,KAEAD,EAAAE,QACAD,GAAA,KAEAD,EAAAI,WACAH,GAAA,KAEA,IAAAE,EAAAH,EAAAG,UACAA,GAAA,oBAAA3J,OACAyJ,GAAA,uDAAyDrM,OAAA4C,KAAAE,SAAAC,mBAAAC,KAAAC,UAAAsJ,MAAA,QAKzDjJ,EAAAC,kBAAA8I,EAAA+B,EAAA9K,EAAAA,QACA,CAoBAoL,CAAAN,EAAA9K,EAAA8I,EACA,EACAc,OAAA,YArBA,SAAAkB,GAEA,UAAAA,EAAAO,WACA,SAEAP,EAAAO,WAAAC,YAAAR,EACA,CAgBAS,CAAAT,EACA,EAEA,YC9CAvP,EAAAW,QAVA,SAAA6M,EAAA+B,GACA,GAAAA,EAAAU,WACAV,EAAAU,WAAAC,QAAA1C,MACI,CACJ,KAAA+B,EAAAY,YACAZ,EAAAQ,YAAAR,EAAAY,YAEAZ,EAAAH,YAAAP,SAAAuB,eAAA5C,GACA,CACA","sources":["webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.scss","webpack://@ampath/esm-dha-workflow-app/./node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/api.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.scss?7c5b","webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/finalize-bill-confirmation.modal.tsx","webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/finalize-bill.resource.ts","webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/helpers/functions.ts","webpack://@ampath/esm-dha-workflow-app/./src/billing/dashboard/v3/finalize-bill/types.ts","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@ampath/esm-dha-workflow-app/./node_modules/style-loader/dist/runtime/styleTagTransform.js"],"names":["___CSS_LOADER_EXPORT___","_node_modules_openmrs_webpack_config_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default","_node_modules_openmrs_webpack_config_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default","push","module","id","version","sources","names","mappings","sourcesContent","sourceRoot","locals","modalBody","__WEBPACK_DEFAULT_EXPORT__","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","i","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","_arrayLikeToArray","arr","len","arr2","Array","_item","isArray","_arrayWithHoles","Symbol","iterator","_s","_e","_arr","_n","_d","call","next","done","value","err","_iterableToArrayLimit","o","minLen","n","Object","prototype","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","source","options","styleTagTransform","styleTagTransform_default","setAttributes","setAttributesWithoutAttributes_default","insert","insertBySelector_default","bind","domAPI","styleDomAPI_default","insertStyleElement","insertStyleElement_default","injectStylesIntoStyleTag_default","finalize_bill_confirmation_modal","A","finalize_bill_finalize_bill_confirmation_modal","undefined","v3_finalize_bill_finalize_bill_confirmation_modal","param","billUuid","closeModal","onMutate","t","useTranslation","useState","isFinalizing","setIsFinalizing","errorMessage","setErrorMessage","index_js_default","createElement","Fragment","ModalHeader","title","ModalBody","className","styles","p","role","InlineLoading","description","ModalFooter","Button","kind","disabled","onClick","error","message","finalizeBill","_state","sent","showSnackbar","subtitle","Error","String","url","restBaseUrl","openmrsFetch","method","body","status","BillStatus","POSTED","headers","processBillPayment","payload","useBill","useSWR","isLoading","isValidating","mutate","bill","mapBillProperties","activeLineItems","lineItems","filter","voided","parsePatientDisplay","patient","display","identifier","_object_spread","patientName","patientUuid","uuid","visitUuid","visit","cashPointUuid","cashPoint","cashPointName","cashPointLocation","location","billingService","lineItem","billableService","totalAmount","total","netAmount","amountAfterDiscount","tenderedAmount","_ref1","payments","amountTendered","reduce","prev","curr","convertToCurrency","amountToConvert","currencyType","window","locale","i18next","language","substring","_ref","formattedAmount","Intl","NumberFormat","style","currency","minimumFractionDigits","format","Math","abs","getLineItemTotal","price","quantity","index","indexOf","trim","separator","PENDING","PAID","stylesInDOM","getIndexByIdentifier","result","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_index","memo","target","styleTarget","document","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","appendChild","element","attributes","styleElement","nonce","__webpack_require__","nc","setAttribute","needLayer","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode"],"sourceRoot":""}
|
package/src/billing/dashboard/v3/finalize-bill/bill-line-items/bill-line-items.component.tsx
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { LineItem } from "../types";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { convertToCurrency, getLineItemTotal } from "../helpers";
|
|
5
|
-
import styles from './bill-line-items.scss'
|
|
6
|
-
import { DataTable, Layer, Table, TableBody, TableCell, TableContainer, TableHead, TableHeader, TableRow, TableToolbarSearch, Tile } from "@carbon/react";
|
|
7
|
-
import { isDesktop, useLayoutType } from "@openmrs/esm-framework";
|
|
8
|
-
import classNames from "classnames";
|
|
9
|
-
|
|
10
|
-
interface BillLineItemsProps {
|
|
11
|
-
lineItems: Array<LineItem> | undefined
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const BillLineItems: React.FC<BillLineItemsProps> = ({ lineItems }) => {
|
|
15
|
-
const { t } = useTranslation();
|
|
16
|
-
const layout = useLayoutType();
|
|
17
|
-
const responsiveSize = isDesktop(layout) ? 'sm' : 'lg';
|
|
18
|
-
|
|
19
|
-
const defaultCurrency = 'KES';
|
|
20
|
-
|
|
21
|
-
const tableHeaders = [
|
|
22
|
-
{ header: t('number', 'Number'), key: 'no', width: 7 }, // Width as a percentage
|
|
23
|
-
{ header: t('billItem', 'Bill item'), key: 'billItem', width: 25 },
|
|
24
|
-
{ header: t('status', 'Status'), key: 'status', width: 25 },
|
|
25
|
-
{ header: t('quantity', 'Quantity'), key: 'quantity', width: 15 },
|
|
26
|
-
{ header: t('price', 'Price'), key: 'price', width: 24 },
|
|
27
|
-
{ header: t('total', 'Total'), key: 'total', width: 15 },
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
const tableRows = useMemo(
|
|
31
|
-
() =>
|
|
32
|
-
lineItems?.map((item, index) => ({
|
|
33
|
-
no: `${index + 1}`,
|
|
34
|
-
id: `${item.uuid}`,
|
|
35
|
-
billItem: item.billableService ? item.billableService : item?.item,
|
|
36
|
-
status: item.status,
|
|
37
|
-
quantity: item.quantity,
|
|
38
|
-
price: convertToCurrency(item.price, defaultCurrency),
|
|
39
|
-
total: convertToCurrency(getLineItemTotal(item), defaultCurrency),
|
|
40
|
-
})) ?? [],
|
|
41
|
-
[lineItems, defaultCurrency],
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div className={styles.lineItemsWrapper}>
|
|
46
|
-
<DataTable
|
|
47
|
-
headers={tableHeaders}
|
|
48
|
-
rows={tableRows}
|
|
49
|
-
size={responsiveSize}
|
|
50
|
-
useZebraStyles
|
|
51
|
-
overflowMenuOnHover={isDesktop(layout)}>
|
|
52
|
-
{({ rows, headers, getRowProps, getTableProps }) => (
|
|
53
|
-
<TableContainer
|
|
54
|
-
description={
|
|
55
|
-
<span className={styles.tableDescription}>
|
|
56
|
-
<span>{t('itemsToBeBilled', 'Items to be billed')}</span>
|
|
57
|
-
</span>
|
|
58
|
-
}
|
|
59
|
-
title={t('lineItems', 'Line items')}>
|
|
60
|
-
<Table
|
|
61
|
-
{...getTableProps()}
|
|
62
|
-
aria-label={t('invoiceLineItems', 'Invoice line items')}
|
|
63
|
-
className={classNames(styles.invoiceTable, 'billingTable')}>
|
|
64
|
-
<TableHead>
|
|
65
|
-
<TableRow>
|
|
66
|
-
{headers.map((header) => (
|
|
67
|
-
<TableHeader key={header.key}>{header.header}</TableHeader>
|
|
68
|
-
))}
|
|
69
|
-
</TableRow>
|
|
70
|
-
</TableHead>
|
|
71
|
-
<TableBody>
|
|
72
|
-
{rows.map((row) => {
|
|
73
|
-
return (
|
|
74
|
-
<TableRow {...getRowProps({ row })}>
|
|
75
|
-
{row.cells.map((cell) => (
|
|
76
|
-
<TableCell key={cell.id}>{cell.value}</TableCell>
|
|
77
|
-
))}
|
|
78
|
-
</TableRow>
|
|
79
|
-
);
|
|
80
|
-
})}
|
|
81
|
-
</TableBody>
|
|
82
|
-
</Table>
|
|
83
|
-
</TableContainer>
|
|
84
|
-
)}
|
|
85
|
-
</DataTable>
|
|
86
|
-
{lineItems?.length === 0 && (
|
|
87
|
-
<div className={styles.filterEmptyState}>
|
|
88
|
-
<Layer>
|
|
89
|
-
<Tile className={styles.filterEmptyStateTile}>
|
|
90
|
-
<p className={styles.filterEmptyStateContent}>
|
|
91
|
-
{t('noMatchingItemsToDisplay', 'No matching items to display')}
|
|
92
|
-
</p>
|
|
93
|
-
</Tile>
|
|
94
|
-
</Layer>
|
|
95
|
-
</div>
|
|
96
|
-
)}
|
|
97
|
-
</div>
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export default BillLineItems;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
@use '@carbon/colors';
|
|
2
|
-
@use '@carbon/layout';
|
|
3
|
-
@use '@carbon/type';
|
|
4
|
-
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
|
-
|
|
6
|
-
.lineItemsWrapper {
|
|
7
|
-
border: 1px solid colors.$gray-20;
|
|
8
|
-
background-color: colors.$white;
|
|
9
|
-
margin-bottom: layout.$spacing-05;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.filterEmptyState {
|
|
13
|
-
align-items: center;
|
|
14
|
-
background-color: white;
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
padding: layout.$spacing-09 !important;
|
|
18
|
-
text-align: center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.filterEmptyStateTile {
|
|
22
|
-
margin: auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.filterEmptyStateContent {
|
|
26
|
-
@include type.type-style('heading-compact-02');
|
|
27
|
-
color: $text-02;
|
|
28
|
-
margin-bottom: layout.$spacing-03;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.filterEmptyStateHelper {
|
|
32
|
-
@include type.type-style('body-compact-01');
|
|
33
|
-
color: $text-02;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.searchbox {
|
|
37
|
-
height: 3rem;
|
|
38
|
-
|
|
39
|
-
input:focus {
|
|
40
|
-
outline: 2px solid colors.$orange-40 !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.invoiceTable {
|
|
45
|
-
width: 100%;
|
|
46
|
-
|
|
47
|
-
td {
|
|
48
|
-
border-bottom: none !important;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.tableDescription {
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
margin-top: layout.$spacing-02;
|
|
56
|
-
column-gap: layout.$spacing-01;
|
|
57
|
-
|
|
58
|
-
::after {
|
|
59
|
-
content: '';
|
|
60
|
-
display: block;
|
|
61
|
-
width: layout.$spacing-07;
|
|
62
|
-
padding-top: 0.188rem;
|
|
63
|
-
border-bottom: 0.375rem solid var(--brand-03);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&>span {
|
|
67
|
-
@include type.type-style('body-01');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
:global(.omrs-modals-container) > :global(.cds--modal-container) {
|
|
2
|
-
position: fixed !important;
|
|
3
|
-
inset: 50% auto auto 50% !important;
|
|
4
|
-
max-block-size: calc(100vh - 2rem) !important;
|
|
5
|
-
margin: 0 !important;
|
|
6
|
-
transform: translate(-50%, -50%) !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.modalBody {
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Button, InlineLoading, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
|
|
3
|
-
import { showSnackbar } from '@openmrs/esm-framework';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { finalizeBill } from './finalize-bill.resource';
|
|
6
|
-
import styles from './finalize-bill-confirmation.modal.scss';
|
|
7
|
-
|
|
8
|
-
interface FinalizeBillConfirmationModalProps {
|
|
9
|
-
billUuid: string;
|
|
10
|
-
closeModal: () => void;
|
|
11
|
-
onMutate?: () => Promise<unknown> | unknown;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const FinalizeBillConfirmationModal: React.FC<FinalizeBillConfirmationModalProps> = ({
|
|
15
|
-
billUuid,
|
|
16
|
-
closeModal,
|
|
17
|
-
onMutate,
|
|
18
|
-
}) => {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const [isFinalizing, setIsFinalizing] = useState(false);
|
|
21
|
-
const [errorMessage, setErrorMessage] = useState('');
|
|
22
|
-
|
|
23
|
-
const handleFinalize = async () => {
|
|
24
|
-
if (!billUuid || isFinalizing) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
setIsFinalizing(true);
|
|
29
|
-
setErrorMessage('');
|
|
30
|
-
try {
|
|
31
|
-
await finalizeBill(billUuid);
|
|
32
|
-
await onMutate?.();
|
|
33
|
-
showSnackbar({
|
|
34
|
-
kind: 'success',
|
|
35
|
-
title: t('billFinalized', 'Bill finalized'),
|
|
36
|
-
subtitle: t('billFinalizedSuccess', 'Bill has been finalized successfully.'),
|
|
37
|
-
});
|
|
38
|
-
closeModal();
|
|
39
|
-
} catch (error: unknown) {
|
|
40
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
41
|
-
setErrorMessage(message || t('finalizeBillFailed', 'Unable to finalize this bill. Please try again.'));
|
|
42
|
-
} finally {
|
|
43
|
-
setIsFinalizing(false);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<>
|
|
49
|
-
<ModalHeader closeModal={closeModal} title={t('finalizeBill', 'Finalize bill')} />
|
|
50
|
-
<ModalBody className={styles.modalBody}>
|
|
51
|
-
<p>
|
|
52
|
-
{t(
|
|
53
|
-
'finalizeBillConfirmation',
|
|
54
|
-
'Are you sure you want to finalize this bill? Once finalized, no further modifications will be allowed.',
|
|
55
|
-
)}
|
|
56
|
-
</p>
|
|
57
|
-
{errorMessage ? <p role="alert">{errorMessage}</p> : null}
|
|
58
|
-
{isFinalizing ? <InlineLoading description={t('finalizing', 'Finalizing bill...')} /> : null}
|
|
59
|
-
</ModalBody>
|
|
60
|
-
<ModalFooter>
|
|
61
|
-
<Button kind="secondary" disabled={isFinalizing} onClick={closeModal}>
|
|
62
|
-
{t('cancel', 'Cancel')}
|
|
63
|
-
</Button>
|
|
64
|
-
<Button kind="danger" disabled={isFinalizing || !billUuid} onClick={handleFinalize}>
|
|
65
|
-
{isFinalizing ? t('finalizing', 'Finalizing...') : t('confirmFinalizeBill', 'Confirm finalization')}
|
|
66
|
-
</Button>
|
|
67
|
-
</ModalFooter>
|
|
68
|
-
</>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default FinalizeBillConfirmationModal;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
|
|
4
|
-
.billHeader {
|
|
5
|
-
background: #ffffff;
|
|
6
|
-
border: 1px solid #e0e0e0;
|
|
7
|
-
display: grid;
|
|
8
|
-
gap: layout.$spacing-05;
|
|
9
|
-
grid-template-columns: 2fr 1fr;
|
|
10
|
-
margin-bottom: layout.$spacing-05;
|
|
11
|
-
padding: layout.$spacing-05;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.billIdentity,
|
|
15
|
-
.billSummary {
|
|
16
|
-
display: grid;
|
|
17
|
-
gap: layout.$spacing-03;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.billTitle {
|
|
21
|
-
@include type.type-style('heading-compact-02');
|
|
22
|
-
margin: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.billMeta,
|
|
26
|
-
.summaryRow {
|
|
27
|
-
align-items: center;
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
gap: layout.$spacing-05;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.billMeta {
|
|
34
|
-
@include type.type-style('body-compact-01');
|
|
35
|
-
color: #525252;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.summaryRow {
|
|
39
|
-
@include type.type-style('body-compact-01');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.summaryValue {
|
|
43
|
-
font-weight: 600;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.discountValue {
|
|
47
|
-
color: #8a3ffc;
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.receiptActions {
|
|
52
|
-
display: flex;
|
|
53
|
-
gap: layout.$spacing-03;
|
|
54
|
-
justify-content: flex-end;
|
|
55
|
-
margin-top: layout.$spacing-04;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.discountTypeOptions {
|
|
59
|
-
display: flex;
|
|
60
|
-
gap: layout.$spacing-05;
|
|
61
|
-
margin-bottom: layout.$spacing-05;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@media (max-width: 672px) {
|
|
65
|
-
.billHeader {
|
|
66
|
-
grid-template-columns: 1fr;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useBill, mapBillProperties, processBillPayment } from './finalize-bill.resource';
|
|
3
|
-
import { Button, InlineLoading, Modal, ModalBody, ModalFooter, ModalHeader, NumberInput, Tag } from '@carbon/react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import BillLineItems from './bill-line-items/bill-line-items.component';
|
|
6
|
-
import Payments from './payments/payments.component';
|
|
7
|
-
import PrintReceipt from './payments/printable-invoice/print-receipt.component';
|
|
8
|
-
import { formatDate, parseDate, showModal, showSnackbar } from '@openmrs/esm-framework';
|
|
9
|
-
import { convertToCurrency } from './helpers';
|
|
10
|
-
import { BillStatus } from './types';
|
|
11
|
-
import { fetchPaymentModes } from '../../../../shared/services/billing.resource';
|
|
12
|
-
import styles from './finalize-bill.component.scss';
|
|
13
|
-
|
|
14
|
-
interface FinalizeBillProps {
|
|
15
|
-
billUuid: string;
|
|
16
|
-
closeModal: () => void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const FinalizeBill: React.FC<FinalizeBillProps> = ({ billUuid, closeModal }) => {
|
|
20
|
-
const { bill, isLoading, isValidating, mutate } = useBill(billUuid);
|
|
21
|
-
const { t } = useTranslation();
|
|
22
|
-
const [isDiscountModalOpen, setIsDiscountModalOpen] = useState(false);
|
|
23
|
-
const [discountType, setDiscountType] = useState<'AMOUNT' | 'PERCENT'>('AMOUNT');
|
|
24
|
-
const [discountPercentage, setDiscountPercentage] = useState('');
|
|
25
|
-
const [discountAmount, setDiscountAmount] = useState('');
|
|
26
|
-
const [isApplyingDiscount, setIsApplyingDiscount] = useState(false);
|
|
27
|
-
|
|
28
|
-
const handleFinalizeBill = () => {
|
|
29
|
-
let dispose: () => void;
|
|
30
|
-
dispose = showModal('finalize-bill-confirmation-modal', {
|
|
31
|
-
billUuid,
|
|
32
|
-
onMutate: mutate,
|
|
33
|
-
closeModal: () => dispose(),
|
|
34
|
-
size: 'md',
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const mappedBill = bill ? mapBillProperties(bill) : null;
|
|
39
|
-
const subtotal = mappedBill?.totalAmount ?? 0;
|
|
40
|
-
const netAmount = mappedBill?.netAmount ?? subtotal;
|
|
41
|
-
const discount = Math.max(0, subtotal - netAmount);
|
|
42
|
-
const tenderedAmount = mappedBill?.tenderedAmount ?? 0;
|
|
43
|
-
const amountDue = netAmount - tenderedAmount;
|
|
44
|
-
const isPaid = mappedBill?.status === BillStatus.PAID;
|
|
45
|
-
|
|
46
|
-
const closeDiscountModal = () => {
|
|
47
|
-
if (!isApplyingDiscount) {
|
|
48
|
-
setIsDiscountModalOpen(false);
|
|
49
|
-
setDiscountAmount('');
|
|
50
|
-
setDiscountPercentage('');
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const applyDiscount = async () => {
|
|
55
|
-
const percentage = Number(discountPercentage || 0);
|
|
56
|
-
const fixedAmount = Number(discountAmount || 0);
|
|
57
|
-
const appliedAmount =
|
|
58
|
-
discountType === 'PERCENT' ? Math.round((amountDue * percentage) / 100) : fixedAmount;
|
|
59
|
-
|
|
60
|
-
if (appliedAmount <= 0 || appliedAmount > amountDue) {
|
|
61
|
-
showSnackbar({
|
|
62
|
-
kind: 'error',
|
|
63
|
-
title: t('invalidDiscount', 'Invalid discount'),
|
|
64
|
-
subtitle: t('discountRangeInvalid', 'Discount must be greater than zero and not exceed the balance.'),
|
|
65
|
-
});
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
setIsApplyingDiscount(true);
|
|
70
|
-
try {
|
|
71
|
-
const paymentModes = await fetchPaymentModes();
|
|
72
|
-
const discountMode = paymentModes.find((mode) =>
|
|
73
|
-
['waiver', 'discount', 'waived'].includes(mode.name.trim().toLowerCase()),
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
if (!discountMode) {
|
|
77
|
-
throw new Error(t('discountPaymentModeMissing', 'A waiver or discount payment mode was not found.'));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
await processBillPayment(
|
|
81
|
-
{
|
|
82
|
-
instanceType: discountMode.uuid,
|
|
83
|
-
amount: appliedAmount,
|
|
84
|
-
amountTendered: appliedAmount,
|
|
85
|
-
},
|
|
86
|
-
billUuid,
|
|
87
|
-
);
|
|
88
|
-
await mutate();
|
|
89
|
-
showSnackbar({
|
|
90
|
-
kind: 'success',
|
|
91
|
-
title: t('discountApplied', 'Discount applied'),
|
|
92
|
-
subtitle: t('discountAppliedSuccessfully', 'The discount was applied successfully.'),
|
|
93
|
-
});
|
|
94
|
-
setDiscountAmount('');
|
|
95
|
-
setDiscountPercentage('');
|
|
96
|
-
setIsDiscountModalOpen(false);
|
|
97
|
-
} catch (error: unknown) {
|
|
98
|
-
showSnackbar({
|
|
99
|
-
kind: 'error',
|
|
100
|
-
title: t('discountApplicationFailed', 'Discount application failed'),
|
|
101
|
-
subtitle: error instanceof Error ? error.message : String(error),
|
|
102
|
-
});
|
|
103
|
-
} finally {
|
|
104
|
-
setIsApplyingDiscount(false);
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const discountInputValid =
|
|
109
|
-
discountType === 'PERCENT'
|
|
110
|
-
? discountPercentage !== '' && Number(discountPercentage) >= 1 && Number(discountPercentage) <= 100
|
|
111
|
-
: discountAmount !== '' &&
|
|
112
|
-
Number(discountAmount) >= 1 &&
|
|
113
|
-
Number(discountAmount) <= amountDue;
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<>
|
|
117
|
-
<ModalHeader closeModal={closeModal} title={t('finalizeBill', 'Finalize bill')} />
|
|
118
|
-
<ModalBody>
|
|
119
|
-
{!bill && (isLoading || isValidating) ? (
|
|
120
|
-
<InlineLoading
|
|
121
|
-
title={t('loading', 'Loading...')}
|
|
122
|
-
description={t('loadingPatientBill', 'Loading patient bill...')}
|
|
123
|
-
/>
|
|
124
|
-
) : null}
|
|
125
|
-
{bill && mappedBill ? (
|
|
126
|
-
<>
|
|
127
|
-
<div className={styles.billHeader}>
|
|
128
|
-
<div className={styles.billIdentity}>
|
|
129
|
-
<h3 className={styles.billTitle}>{t('billSummary', 'Bill summary')}</h3>
|
|
130
|
-
<Tag size="sm" type={amountDue <= 0 ? 'green' : isPaid ? 'blue' : 'red'}>
|
|
131
|
-
{mappedBill.status}
|
|
132
|
-
</Tag>
|
|
133
|
-
<div className={styles.billMeta}>
|
|
134
|
-
<span>{mappedBill.patientName}</span>
|
|
135
|
-
<span>{mappedBill.identifier}</span>
|
|
136
|
-
</div>
|
|
137
|
-
<div className={styles.billMeta}>
|
|
138
|
-
<span>
|
|
139
|
-
{t('invoiceNo', 'Invoice #')}: {mappedBill.receiptNumber || '--'}
|
|
140
|
-
</span>
|
|
141
|
-
<span>
|
|
142
|
-
{t('invoiceDate', 'Invoice date')}:{' '}
|
|
143
|
-
{mappedBill.dateCreated
|
|
144
|
-
? formatDate(parseDate(mappedBill.dateCreated), { mode: 'wide', noToday: true, time: false })
|
|
145
|
-
: '--'}
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div>
|
|
151
|
-
<div className={styles.billSummary}>
|
|
152
|
-
<div className={styles.summaryRow}>
|
|
153
|
-
<span>{t('subtotal', 'Subtotal')}</span>
|
|
154
|
-
<span className={styles.summaryValue}>{convertToCurrency(subtotal, 'KES')}</span>
|
|
155
|
-
</div>
|
|
156
|
-
{discount > 0 ? (
|
|
157
|
-
<div className={styles.summaryRow}>
|
|
158
|
-
<span>{t('discount', 'Discount')}</span>
|
|
159
|
-
<span className={styles.discountValue}>-{convertToCurrency(discount, 'KES')}</span>
|
|
160
|
-
</div>
|
|
161
|
-
) : null}
|
|
162
|
-
<div className={styles.summaryRow}>
|
|
163
|
-
<span>{t('totalAmount', 'Total amount')}</span>
|
|
164
|
-
<span className={styles.summaryValue}>{convertToCurrency(netAmount, 'KES')}</span>
|
|
165
|
-
</div>
|
|
166
|
-
<div className={styles.summaryRow}>
|
|
167
|
-
<span>{t('totalPaid', 'Paid')}</span>
|
|
168
|
-
<span className={styles.summaryValue}>{convertToCurrency(tenderedAmount, 'KES')}</span>
|
|
169
|
-
</div>
|
|
170
|
-
<div className={styles.summaryRow}>
|
|
171
|
-
<span>{t('amountDue', 'Balance')}</span>
|
|
172
|
-
<span className={styles.summaryValue}>{convertToCurrency(amountDue, 'KES')}</span>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
<div className={styles.receiptActions}>
|
|
176
|
-
{amountDue > 0 && !isPaid ? (
|
|
177
|
-
<Button kind="secondary" onClick={() => setIsDiscountModalOpen(true)}>
|
|
178
|
-
{t('applyDiscount', 'Apply Discount')}
|
|
179
|
-
</Button>
|
|
180
|
-
) : null}
|
|
181
|
-
{isPaid ? <PrintReceipt billUuid={billUuid} /> : null}
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
<BillLineItems lineItems={bill.lineItems} />
|
|
187
|
-
|
|
188
|
-
<Payments bill={bill} mutate={mutate} onFinalizeBill={handleFinalizeBill} />
|
|
189
|
-
</>
|
|
190
|
-
) : null}
|
|
191
|
-
</ModalBody>
|
|
192
|
-
<ModalFooter>
|
|
193
|
-
<Button kind="secondary" onClick={closeModal}>
|
|
194
|
-
{t('close', 'Close')}
|
|
195
|
-
</Button>
|
|
196
|
-
</ModalFooter>
|
|
197
|
-
|
|
198
|
-
<Modal
|
|
199
|
-
open={isDiscountModalOpen}
|
|
200
|
-
modalHeading={t('applyDiscount', 'Apply Discount')}
|
|
201
|
-
primaryButtonText={isApplyingDiscount ? t('applying', 'Applying...') : t('submit', 'Submit')}
|
|
202
|
-
secondaryButtonText={t('cancel', 'Cancel')}
|
|
203
|
-
primaryButtonDisabled={isApplyingDiscount || !discountInputValid}
|
|
204
|
-
onRequestClose={closeDiscountModal}
|
|
205
|
-
onRequestSubmit={applyDiscount}
|
|
206
|
-
size="sm"
|
|
207
|
-
>
|
|
208
|
-
<div className={styles.discountTypeOptions}>
|
|
209
|
-
<label htmlFor="discount-type-amount">
|
|
210
|
-
<input
|
|
211
|
-
type="radio"
|
|
212
|
-
id="discount-type-amount"
|
|
213
|
-
name="discount-type"
|
|
214
|
-
value="AMOUNT"
|
|
215
|
-
checked={discountType === 'AMOUNT'}
|
|
216
|
-
onChange={() => setDiscountType('AMOUNT')}
|
|
217
|
-
/>{' '}
|
|
218
|
-
{t('amount', 'Amount')}
|
|
219
|
-
</label>
|
|
220
|
-
<label htmlFor="discount-type-percent">
|
|
221
|
-
<input
|
|
222
|
-
type="radio"
|
|
223
|
-
id="discount-type-percent"
|
|
224
|
-
name="discount-type"
|
|
225
|
-
value="PERCENT"
|
|
226
|
-
checked={discountType === 'PERCENT'}
|
|
227
|
-
onChange={() => setDiscountType('PERCENT')}
|
|
228
|
-
/>{' '}
|
|
229
|
-
{t('percentage', 'Percentage')}
|
|
230
|
-
</label>
|
|
231
|
-
</div>
|
|
232
|
-
|
|
233
|
-
{discountType === 'PERCENT' ? (
|
|
234
|
-
<NumberInput
|
|
235
|
-
id="discount-percentage"
|
|
236
|
-
label={t('discountPercentage', 'Discount Percentage')}
|
|
237
|
-
min={0}
|
|
238
|
-
max={100}
|
|
239
|
-
value={discountPercentage}
|
|
240
|
-
invalid={discountPercentage !== '' && (Number(discountPercentage) < 1 || Number(discountPercentage) > 100)}
|
|
241
|
-
invalidText={t('discountPercentageInvalid', 'Percentage must be between 1 and 100')}
|
|
242
|
-
onChange={(_event, state) => setDiscountPercentage(String(state.value))}
|
|
243
|
-
/>
|
|
244
|
-
) : (
|
|
245
|
-
<NumberInput
|
|
246
|
-
id="discount-amount"
|
|
247
|
-
label={t('discountAmount', 'Discount Amount')}
|
|
248
|
-
min={0}
|
|
249
|
-
max={amountDue}
|
|
250
|
-
value={discountAmount}
|
|
251
|
-
invalid={discountAmount !== '' && (Number(discountAmount) < 1 || Number(discountAmount) > amountDue)}
|
|
252
|
-
invalidText={t('discountAmountInvalid', 'Amount must be greater than zero and not exceed the balance')}
|
|
253
|
-
onChange={(_event, state) => setDiscountAmount(String(state.value))}
|
|
254
|
-
/>
|
|
255
|
-
)}
|
|
256
|
-
</Modal>
|
|
257
|
-
</>
|
|
258
|
-
);
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export default FinalizeBill;
|