@things-factory/tax-invoice 10.0.4 → 10.0.5
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.
|
@@ -28,6 +28,8 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
input {
|
|
31
|
+
background-color: var(--input-field-background, var(--md-sys-color-surface-container-highest));
|
|
32
|
+
color: var(--input-field-color, var(--md-sys-color-on-surface));
|
|
31
33
|
border: var(--border-dim-color);
|
|
32
34
|
padding: var(--spacing-small) var(--spacing-medium);
|
|
33
35
|
max-width: 100px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-detail-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice/tax-invoice-detail-popup.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG/C,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAjE;;QAuIuB,iBAAY,GAAW,EAAE,CAAA;QAC5C,WAAM,GAAQ,EAAE,CAAA;IAkT3B,CAAC;aAzbQ,WAAM,GAAG;QACd,eAAe;QACf,kBAAkB;QAClB,GAAG,CAAA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FT;YACD,SAAS,EAAE,EAAE,EAAE,EAAE;SAClB,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAA;IACtC,CAAC;IAEO,aAAa,CAAC,KAAa;QACjC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACnE,CAAC;;AAlT2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAA0B;AAC5C;IAAR,KAAK,EAAE;;qDAAiB;AAxId,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CA0bjC","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport gql from 'graphql-tag'\nimport { INVOICE_TYPE } from './tax-invoice-list-page'\n\n@customElement('tax-invoice-detail-popup')\nexport class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--md-sys-color-background);\n width: 100%;\n padding: 15px;\n font-size: 14px;\n overflow-y: scroll;\n }\n\n input {\n border: var(--border-dim-color);\n padding: var(--spacing-small) var(--spacing-medium);\n max-width: 100px;\n font: var(--input-font);\n }\n\n table {\n border: solid;\n border-width: 2px 0;\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .title table {\n border-color: #d3dbe5;\n width: 100%;\n height: 33px;\n\n th {\n background-color: #e9edf6;\n }\n td {\n padding-left: 10px;\n }\n }\n\n div.body {\n margin-top: 15px;\n font-size: 14px;\n\n div.data {\n display: flex;\n margin-top: 5px;\n\n table {\n flex: 1;\n\n td,\n th {\n padding: 5px;\n min-width: 60px;\n }\n td {\n padding-left: 8px;\n }\n th.target {\n width: 25px;\n writing-mode: vertical-rl;\n min-width: unset;\n }\n\n &.supplier {\n border-color: #f64843;\n\n td,\n th {\n background-color: #fef5f7;\n border: solid 1.5px #f5b1b1;\n }\n th.target {\n background-color: #fedbde;\n }\n }\n &.buyer {\n border-color: #007ed9;\n\n td,\n th {\n background-color: #f7f7ff;\n border: solid 1.5px #a7bcff;\n }\n th.target {\n background-color: #c6daf6;\n }\n }\n }\n }\n\n div.items,\n div.info,\n div.summary {\n margin-top: 15px;\n\n table {\n width: 100%;\n border-color: #000;\n border-width: 2px 0px 0px 0px;\n\n th {\n background-color: #e9edf5;\n }\n th,\n td {\n border: solid 1.5px #c4d2ff;\n padding: 5px;\n text-align: center;\n }\n }\n }\n\n div.summary {\n display: flex;\n\n & > table {\n flex: 6.7;\n }\n & > div {\n flex: 3.2;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1.5px solid #c4d2ff;\n border-top: 2px solid #000;\n }\n }\n }\n `\n ]\n\n @property({ type: String }) taxInvoiceId: string = ''\n @state() detail: any = {}\n\n render() {\n return html`\n <div class=\"title\">\n <table>\n <tr>\n <th>${i18next.t('field.approval no')}</th>\n <td>${this.detail?.approvalNo?.replace(/(\\S{8})(\\S{8})(\\S{8})/g, '$1-$2-$3')}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"body\">\n <div class=\"invoice-type\">* ${INVOICE_TYPE[this.detail.invoiceType]}</div>\n <div class=\"data\">\n <table class=\"supplier\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice supplier')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.supplierBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.supplierBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.supplierBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.supplierRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.supplierAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.supplierBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.supplierIndustryType}</td>\n </tr>\n <tr>\n <th rowspan=\"2\">${i18next.t('field.email')}</th>\n <td rowspan=\"2\" colspan=\"3\">${this.detail.supplierContactEmail}</td>\n </tr>\n <tr></tr>\n </table>\n\n <table class=\"buyer\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice buyer')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.buyerBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.buyerBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.buyerBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.buyerRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.buyerAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.buyerBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.buyerIndustryType}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer1stContactEmail}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer2ndContactEmail}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"info\">\n <table>\n <colgroup>\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"40%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.issue date')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.modification reason')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n <tr>\n <td>${this.detail.issueDate?.split('T')[0]}</td>\n <td>${this._numberFormat(this.detail.supplyAmount)}</td>\n <td>${this._numberFormat(this.detail.taxAmount)}</td>\n <td>${this.detail.modificationReason}</td>\n <td>${this.detail.remark0}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"items\">\n <table>\n <colgroup>\n <col width=\"4%\" />\n <col width=\"4%\" />\n <col width=\"15%\" />\n <col width=\"9%\" />\n <col width=\"9%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.tax invoice month')}</th>\n <th>${i18next.t('field.tax invoice day')}</th>\n <th>${i18next.t('field.tax invoice item name')}</th>\n <th>${i18next.t('field.tax invoice ea')}</th>\n <th>${i18next.t('field.tax invoice quantity')}</th>\n <th>${i18next.t('field.tax invoice price')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n\n ${this.detail.taxInvoiceItems?.map(\n item => html`\n <tr>\n <td>${item.supplyDate.split('-')[1]}</td>\n <td>${item.supplyDate.split('-')[2]?.split('T')[0]}</td>\n <td>${item.itemName}</td>\n <td>${item.specification}</td>\n <td>${item.quantity}</td>\n <td>${this._numberFormat(item.unitPrice)}</td>\n <td>${this._numberFormat(item.supplyPrice)}</td>\n <td>${this._numberFormat(item.taxPrice)}</td>\n <td>${item.remark}</td>\n </tr>\n `\n )}\n </table>\n </div>\n\n <div class=\"summary\">\n <table>\n <colgroup>\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.total amount')}</th>\n <th>${i18next.t('field.tax invoice payment cash')}</th>\n <th>${i18next.t('field.tax invoice payment check')}</th>\n <th>${i18next.t('field.tax invoice payment promissory note')}</th>\n <th>${i18next.t('field.tax invoice payment accounts receivable')}</th>\n </tr>\n <tr>\n <td>${this._numberFormat(this.detail.totalAmount)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCash)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCheck)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountPromissoryNote)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountAccountsReceivable)}</td>\n </tr>\n </table>\n <div>\n ${i18next.t('text.tax invoice description payment', {\n value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`)\n })}\n </div>\n </div>\n </div>\n `\n }\n\n async updated(changed) {\n if (changed.has('taxInvoiceId')) {\n this.detail = await this.getTaxInvoiceDetailById(this.taxInvoiceId)\n }\n }\n\n private async getTaxInvoiceDetailById(id: string) {\n if (!id) return {}\n\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n responses: taxInvoice(id: $id) {\n id\n category\n approvalNo\n originalApprovalNo\n issueDate\n signatureDate\n invoiceType\n purpose\n revisedReason\n remark0\n remark1\n remark2\n supplierBusinessRegistrationCategory\n supplierBusinessRegistrationNumber\n supplierBranchIdentification\n supplierBusinessName\n supplierRepresentativeName\n supplierAddress\n supplierBusinessType\n supplierIndustryType\n supplierDepartment\n supplierContactName\n supplierContactPhone\n supplierContactEmail\n supplierContactCellPhone\n buyerBusinessRegistrationCategory\n buyerBusinessRegistrationNumber\n buyerBranchIdentification\n buyerBusinessName\n buyerRepresentativeName\n buyerAddress\n buyerBusinessType\n buyerIndustryType\n buyer1stDepartment\n buyer1stContactName\n buyer1stContactPhone\n buyer1stContactEmail\n buyer1stContactCellPhone\n buyer2ndDepartment\n buyer2ndContactName\n buyer2ndContactPhone\n buyer2ndContactEmail\n buyer2ndContactCellPhone\n agentBusinessRegistrationCategory\n agentBusinessRegistrationNumber\n agentBranchIdentification\n agentBusinessName\n agentRepresentativeName\n agentAddress\n agentBusinessType\n agentIndustryType\n agentDepartment\n agentContactName\n agentContactPhone\n agentContactEmail\n agentContactCellPhone\n paymentAmountCash\n paymentAmountCheck\n paymentAmountPromissoryNote\n paymentAmountAccountsReceivable\n supplyAmount\n taxAmount\n totalAmount\n createdAt\n updater {\n id\n name\n }\n updatedAt\n\n taxInvoiceItems {\n id\n sequence\n supplyDate\n itemName\n specification\n quantity\n unitPrice\n supplyPrice\n taxPrice\n remark\n }\n }\n }\n `,\n variables: { id }\n })\n\n return response.data.responses || {}\n }\n\n private _numberFormat(value: number): string {\n return !value ? '' : new Intl.NumberFormat('en-US').format(value)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tax-invoice-detail-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice/tax-invoice-detail-popup.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC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AAC;IACH,CAAC;IAEO,KAAK,CAAC,uBAAuB,CAAC,EAAU;QAC9C,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,CAAA;QAElB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuFT;YACD,SAAS,EAAE,EAAE,EAAE,EAAE;SAClB,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAA;IACtC,CAAC;IAEO,aAAa,CAAC,KAAa;QACjC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACnE,CAAC;;AAlT2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAA0B;AAC5C;IAAR,KAAK,EAAE;;qDAAiB;AA1Id,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CA4bjC","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport gql from 'graphql-tag'\nimport { INVOICE_TYPE } from './tax-invoice-list-page'\n\n@customElement('tax-invoice-detail-popup')\nexport class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--md-sys-color-background);\n width: 100%;\n padding: 15px;\n font-size: 14px;\n overflow-y: scroll;\n }\n\n input {\n background-color: var(--input-field-background, var(--md-sys-color-surface-container-highest));\n color: var(--input-field-color, var(--md-sys-color-on-surface));\n border: var(--border-dim-color);\n padding: var(--spacing-small) var(--spacing-medium);\n max-width: 100px;\n font: var(--input-font);\n }\n\n table {\n border: solid;\n border-width: 2px 0;\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .title table {\n border-color: #d3dbe5;\n width: 100%;\n height: 33px;\n\n th {\n background-color: #e9edf6;\n }\n td {\n padding-left: 10px;\n }\n }\n\n div.body {\n margin-top: 15px;\n font-size: 14px;\n\n div.data {\n display: flex;\n margin-top: 5px;\n\n table {\n flex: 1;\n\n td,\n th {\n padding: 5px;\n min-width: 60px;\n }\n td {\n padding-left: 8px;\n }\n th.target {\n width: 25px;\n writing-mode: vertical-rl;\n min-width: unset;\n }\n\n &.supplier {\n border-color: #f64843;\n\n td,\n th {\n background-color: #fef5f7;\n border: solid 1.5px #f5b1b1;\n }\n th.target {\n background-color: #fedbde;\n }\n }\n &.buyer {\n border-color: #007ed9;\n\n td,\n th {\n background-color: #f7f7ff;\n border: solid 1.5px #a7bcff;\n }\n th.target {\n background-color: #c6daf6;\n }\n }\n }\n }\n\n div.items,\n div.info,\n div.summary {\n margin-top: 15px;\n\n table {\n width: 100%;\n border-color: #000;\n border-width: 2px 0px 0px 0px;\n\n th {\n background-color: #e9edf5;\n }\n th,\n td {\n border: solid 1.5px #c4d2ff;\n padding: 5px;\n text-align: center;\n }\n }\n }\n\n div.summary {\n display: flex;\n\n & > table {\n flex: 6.7;\n }\n & > div {\n flex: 3.2;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1.5px solid #c4d2ff;\n border-top: 2px solid #000;\n }\n }\n }\n `\n ]\n\n @property({ type: String }) taxInvoiceId: string = ''\n @state() detail: any = {}\n\n render() {\n return html`\n <div class=\"title\">\n <table>\n <tr>\n <th>${i18next.t('field.approval no')}</th>\n <td>${this.detail?.approvalNo?.replace(/(\\S{8})(\\S{8})(\\S{8})/g, '$1-$2-$3')}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"body\">\n <div class=\"invoice-type\">* ${INVOICE_TYPE[this.detail.invoiceType]}</div>\n <div class=\"data\">\n <table class=\"supplier\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice supplier')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.supplierBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.supplierBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.supplierBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.supplierRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.supplierAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.supplierBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.supplierIndustryType}</td>\n </tr>\n <tr>\n <th rowspan=\"2\">${i18next.t('field.email')}</th>\n <td rowspan=\"2\" colspan=\"3\">${this.detail.supplierContactEmail}</td>\n </tr>\n <tr></tr>\n </table>\n\n <table class=\"buyer\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice buyer')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.buyerBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.buyerBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.buyerBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.buyerRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.buyerAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.buyerBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.buyerIndustryType}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer1stContactEmail}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer2ndContactEmail}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"info\">\n <table>\n <colgroup>\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"40%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.issue date')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.modification reason')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n <tr>\n <td>${this.detail.issueDate?.split('T')[0]}</td>\n <td>${this._numberFormat(this.detail.supplyAmount)}</td>\n <td>${this._numberFormat(this.detail.taxAmount)}</td>\n <td>${this.detail.modificationReason}</td>\n <td>${this.detail.remark0}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"items\">\n <table>\n <colgroup>\n <col width=\"4%\" />\n <col width=\"4%\" />\n <col width=\"15%\" />\n <col width=\"9%\" />\n <col width=\"9%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.tax invoice month')}</th>\n <th>${i18next.t('field.tax invoice day')}</th>\n <th>${i18next.t('field.tax invoice item name')}</th>\n <th>${i18next.t('field.tax invoice ea')}</th>\n <th>${i18next.t('field.tax invoice quantity')}</th>\n <th>${i18next.t('field.tax invoice price')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n\n ${this.detail.taxInvoiceItems?.map(\n item => html`\n <tr>\n <td>${item.supplyDate.split('-')[1]}</td>\n <td>${item.supplyDate.split('-')[2]?.split('T')[0]}</td>\n <td>${item.itemName}</td>\n <td>${item.specification}</td>\n <td>${item.quantity}</td>\n <td>${this._numberFormat(item.unitPrice)}</td>\n <td>${this._numberFormat(item.supplyPrice)}</td>\n <td>${this._numberFormat(item.taxPrice)}</td>\n <td>${item.remark}</td>\n </tr>\n `\n )}\n </table>\n </div>\n\n <div class=\"summary\">\n <table>\n <colgroup>\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.total amount')}</th>\n <th>${i18next.t('field.tax invoice payment cash')}</th>\n <th>${i18next.t('field.tax invoice payment check')}</th>\n <th>${i18next.t('field.tax invoice payment promissory note')}</th>\n <th>${i18next.t('field.tax invoice payment accounts receivable')}</th>\n </tr>\n <tr>\n <td>${this._numberFormat(this.detail.totalAmount)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCash)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCheck)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountPromissoryNote)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountAccountsReceivable)}</td>\n </tr>\n </table>\n <div>\n ${i18next.t('text.tax invoice description payment', {\n value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`)\n })}\n </div>\n </div>\n </div>\n `\n }\n\n async updated(changed) {\n if (changed.has('taxInvoiceId')) {\n this.detail = await this.getTaxInvoiceDetailById(this.taxInvoiceId)\n }\n }\n\n private async getTaxInvoiceDetailById(id: string) {\n if (!id) return {}\n\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n responses: taxInvoice(id: $id) {\n id\n category\n approvalNo\n originalApprovalNo\n issueDate\n signatureDate\n invoiceType\n purpose\n revisedReason\n remark0\n remark1\n remark2\n supplierBusinessRegistrationCategory\n supplierBusinessRegistrationNumber\n supplierBranchIdentification\n supplierBusinessName\n supplierRepresentativeName\n supplierAddress\n supplierBusinessType\n supplierIndustryType\n supplierDepartment\n supplierContactName\n supplierContactPhone\n supplierContactEmail\n supplierContactCellPhone\n buyerBusinessRegistrationCategory\n buyerBusinessRegistrationNumber\n buyerBranchIdentification\n buyerBusinessName\n buyerRepresentativeName\n buyerAddress\n buyerBusinessType\n buyerIndustryType\n buyer1stDepartment\n buyer1stContactName\n buyer1stContactPhone\n buyer1stContactEmail\n buyer1stContactCellPhone\n buyer2ndDepartment\n buyer2ndContactName\n buyer2ndContactPhone\n buyer2ndContactEmail\n buyer2ndContactCellPhone\n agentBusinessRegistrationCategory\n agentBusinessRegistrationNumber\n agentBranchIdentification\n agentBusinessName\n agentRepresentativeName\n agentAddress\n agentBusinessType\n agentIndustryType\n agentDepartment\n agentContactName\n agentContactPhone\n agentContactEmail\n agentContactCellPhone\n paymentAmountCash\n paymentAmountCheck\n paymentAmountPromissoryNote\n paymentAmountAccountsReceivable\n supplyAmount\n taxAmount\n totalAmount\n createdAt\n updater {\n id\n name\n }\n updatedAt\n\n taxInvoiceItems {\n id\n sequence\n supplyDate\n itemName\n specification\n quantity\n unitPrice\n supplyPrice\n taxPrice\n remark\n }\n }\n }\n `,\n variables: { id }\n })\n\n return response.data.responses || {}\n }\n\n private _numberFormat(value: number): string {\n return !value ? '' : new Intl.NumberFormat('en-US').format(value)\n }\n}\n"]}
|