@things-factory/tax-invoice 6.2.90 → 6.2.92
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/client/pages/tax-invoice/tax-invoice-detail-popup.ts +5 -0
- package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +339 -105
- package/client/route.ts +1 -1
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +5 -0
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +11 -5
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +325 -99
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
- package/dist-client/route.js +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/translations/ko.json +4 -1
package/client/route.ts
CHANGED
|
@@ -368,10 +368,15 @@ TaxInvoiceDetailPopup.styles = [
|
|
|
368
368
|
td,
|
|
369
369
|
th {
|
|
370
370
|
padding: 5px;
|
|
371
|
+
min-width: 60px;
|
|
372
|
+
}
|
|
373
|
+
td {
|
|
374
|
+
padding-left: 8px;
|
|
371
375
|
}
|
|
372
376
|
th.target {
|
|
373
377
|
width: 25px;
|
|
374
378
|
writing-mode: vertical-rl;
|
|
379
|
+
min-width: unset;
|
|
375
380
|
}
|
|
376
381
|
|
|
377
382
|
&.supplier {
|
|
@@ -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,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,GAAG,EAAE,IA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,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;SACpE;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;;AAhbM,4BAAM,GAAG;IACd,eAAe;IACf,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2HF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAA0B;AACrD;IAAC,KAAK,EAAE;;qDAAiB;AAnId,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAkbjC;SAlbY,qBAAqB","sourcesContent":["import '@material/mwc-icon'\nimport '@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(--main-section-background-color);\n width: 100%;\n padding: 15px;\n font-size: 14px;\n overflow-y: scroll;\n }\n\n input {\n border: var(--border-dark-color);\n padding: var(--padding-narrow) var(--padding-default);\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 }\n th.target {\n width: 25px;\n writing-mode: vertical-rl;\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 =>\n 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>${i18next.t('text.tax invoice description payment', { value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`) })}</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,oBAAoB,CAAA;AAC3B,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;IA+S3B,CAAC;IA7SC,MAAM;;QACJ,OAAO,IAAI,CAAA;;;;kBAIG,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;kBAC9B,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,UAAU,0CAAE,OAAO,CAAC,wBAAwB,EAAE,UAAU,CAAC;;;;;;sCAMlD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;;;;;;;;;;;+CAW5B,OAAO,CAAC,CAAC,CAAC,4BAA4B,CAAC;oBAClE,OAAO,CAAC,CAAC,CAAC,0CAA0C,CAAC;oBACrD,MAAA,MAAA,IAAI,CAAC,MAA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;;;;;;;;;;;;;;;;;;;;KAgIF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAA0B;AACrD;IAAC,KAAK,EAAE;;qDAAiB;AAxId,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAubjC;SAvbY,qBAAqB","sourcesContent":["import '@material/mwc-icon'\nimport '@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(--main-section-background-color);\n width: 100%;\n padding: 15px;\n font-size: 14px;\n overflow-y: scroll;\n }\n\n input {\n border: var(--border-dark-color);\n padding: var(--padding-narrow) var(--padding-default);\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 =>\n 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>${i18next.t('text.tax invoice description payment', { value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`) })}</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"]}
|
|
@@ -40,8 +40,8 @@ interface TaxInvoice {
|
|
|
40
40
|
issueNo?: string;
|
|
41
41
|
approvalNo?: string;
|
|
42
42
|
originalApprovalNo?: string;
|
|
43
|
-
issueDate:
|
|
44
|
-
signatureDate?:
|
|
43
|
+
issueDate: string;
|
|
44
|
+
signatureDate?: string;
|
|
45
45
|
invoiceType: InvoiceType;
|
|
46
46
|
purpose: Purpose;
|
|
47
47
|
remark0?: string;
|
|
@@ -54,11 +54,10 @@ interface TaxInvoice {
|
|
|
54
54
|
supplyAmount: number;
|
|
55
55
|
taxAmount?: number;
|
|
56
56
|
totalAmount: number;
|
|
57
|
-
taxInvoiceItems?: TaxInvoiceItem[];
|
|
58
57
|
}
|
|
59
58
|
interface TaxInvoiceItem {
|
|
60
|
-
sequence
|
|
61
|
-
supplyDate:
|
|
59
|
+
sequence: number;
|
|
60
|
+
supplyDate: string;
|
|
62
61
|
itemName: string;
|
|
63
62
|
specification: string;
|
|
64
63
|
quantity: number;
|
|
@@ -70,10 +69,13 @@ interface TaxInvoiceItem {
|
|
|
70
69
|
declare const TaxInvoiceSendPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
71
70
|
export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
|
|
72
71
|
static styles: import("lit").CSSResult[];
|
|
72
|
+
private today;
|
|
73
73
|
private taxInvoiceForm;
|
|
74
74
|
supplier: Supplier;
|
|
75
75
|
buyer: Buyer;
|
|
76
76
|
taxInvoice: TaxInvoice;
|
|
77
|
+
private defaultTaxInvoiceItem;
|
|
78
|
+
taxInvoiceItems: TaxInvoiceItem[];
|
|
77
79
|
get context(): {
|
|
78
80
|
title: string;
|
|
79
81
|
help: string;
|
|
@@ -96,5 +98,9 @@ export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
|
|
|
96
98
|
_sendTaxInvoice(num: string): Promise<void>;
|
|
97
99
|
private _numberFormat;
|
|
98
100
|
private _onInputTaxInvoice;
|
|
101
|
+
private _onInputItem;
|
|
102
|
+
private _onAddInvoiceItem;
|
|
103
|
+
private _onRemoveInvoiceItem;
|
|
104
|
+
private _setTaxInvoiceSummaryCalc;
|
|
99
105
|
}
|
|
100
106
|
export {};
|