tango-app-api-payment-subscription 3.5.8 → 3.5.10
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/package.json +2 -2
- package/src/controllers/bankTransaction.controller.js +100 -51
- package/src/controllers/brandsBilling.controller.js +110 -21
- package/src/controllers/estimate.controller.js +141 -68
- package/src/controllers/invoice.controller.js +137 -6
- package/src/dtos/validation.dtos.js +3 -0
- package/src/hbs/estimateEmail.hbs +78 -0
- package/src/hbs/estimatePdf.hbs +1632 -118
- package/src/hbs/invoicePdf.hbs +37 -105
- package/src/routes/invoice.routes.js +4 -2
- package/src/services/estimate.service.js +4 -0
package/src/hbs/invoicePdf.hbs
CHANGED
|
@@ -1639,15 +1639,15 @@
|
|
|
1639
1639
|
</div>
|
|
1640
1640
|
<div class="frame-554">
|
|
1641
1641
|
<div class="account-number">Account Number</div>
|
|
1642
|
-
<div class="_50200027441433">
|
|
1642
|
+
<div class="_50200027441433">50200027441433</div>
|
|
1643
1643
|
</div>
|
|
1644
1644
|
<div class="frame-54">
|
|
1645
1645
|
<div class="ifsc-code">IFSC Code</div>
|
|
1646
|
-
<div class="hdfc-0000269">
|
|
1646
|
+
<div class="hdfc-0000269">HDFC0000386</div>
|
|
1647
1647
|
</div>
|
|
1648
1648
|
<div class="frame-532">
|
|
1649
1649
|
<div class="payment-type">Payment Type</div>
|
|
1650
|
-
<div class="virtual-acc">
|
|
1650
|
+
<div class="virtual-acc">Online</div>
|
|
1651
1651
|
</div>
|
|
1652
1652
|
<div class="frame-543">
|
|
1653
1653
|
<div class="swift-code">SWIFT Code</div>
|
|
@@ -1655,7 +1655,7 @@
|
|
|
1655
1655
|
</div>
|
|
1656
1656
|
<div class="frame-542">
|
|
1657
1657
|
<div class="branch">Branch</div>
|
|
1658
|
-
<div class="rs-puram-coimbatore">
|
|
1658
|
+
<div class="rs-puram-coimbatore">Santhome, Chennai</div>
|
|
1659
1659
|
</div>
|
|
1660
1660
|
</div>
|
|
1661
1661
|
</div>
|
|
@@ -1667,107 +1667,39 @@
|
|
|
1667
1667
|
<div class="frame-9162">
|
|
1668
1668
|
<div class="thanks-for-your-business">Annexure-1</div>
|
|
1669
1669
|
</div>
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
<
|
|
1680
|
-
|
|
1681
|
-
</
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
<
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
<
|
|
1692
|
-
|
|
1693
|
-
</
|
|
1694
|
-
{{
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
<
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1704
|
-
<div class="text3">{{storeId}}</div>
|
|
1705
|
-
</div>
|
|
1706
|
-
{{/each}}
|
|
1707
|
-
</div>
|
|
1708
|
-
<div class="column" style="max-width: 175px;">
|
|
1709
|
-
<div class="table-header-cell" style="padding: 13px 60px 12px 22px; background-color:#D0D5DD;">
|
|
1710
|
-
<div class="table-header">
|
|
1711
|
-
<div class="text2">Deployment Date</div>
|
|
1712
|
-
</div>
|
|
1713
|
-
</div>
|
|
1714
|
-
{{#each annuxureData}}
|
|
1715
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1716
|
-
<div class="text3">{{edgefirstFileDate}}</div>
|
|
1717
|
-
</div>
|
|
1718
|
-
{{/each}}
|
|
1719
|
-
</div>
|
|
1720
|
-
<div class="column" style="max-width: 130px;" >
|
|
1721
|
-
<div class="table-header-cell" style="padding: 13px 60px 12px 22px; background-color:#D0D5DD;">
|
|
1722
|
-
<div class="table-header">
|
|
1723
|
-
<div class="text6">Billing Days</div>
|
|
1724
|
-
</div>
|
|
1725
|
-
</div>
|
|
1726
|
-
{{#each annuxureData}}
|
|
1727
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1728
|
-
<div class="text7">{{workingdays}}</div>
|
|
1729
|
-
</div>
|
|
1730
|
-
{{/each}}
|
|
1731
|
-
|
|
1732
|
-
</div>
|
|
1733
|
-
<div class="column" style="max-width: 90px;">
|
|
1734
|
-
<div class="table-header-cell" style="padding: 13px 30px 12px 22px; background-color:#D0D5DD;">
|
|
1735
|
-
<div class="table-header">
|
|
1736
|
-
<div class="text6">Qty</div>
|
|
1737
|
-
</div>
|
|
1738
|
-
</div>
|
|
1739
|
-
{{#each annuxureData}}
|
|
1740
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1741
|
-
<div class="text7">{{units}}</div>
|
|
1742
|
-
</div>
|
|
1743
|
-
{{/each}}
|
|
1744
|
-
</div>
|
|
1745
|
-
<div class="column" style="max-width: 150px;">
|
|
1746
|
-
<div class="table-header-cell" style="padding: 13px 30px 12px 22px; background-color:#D0D5DD;">
|
|
1747
|
-
<div class="table-header">
|
|
1748
|
-
<div class="text6">Unit Price</div>
|
|
1749
|
-
</div>
|
|
1750
|
-
</div>
|
|
1751
|
-
{{#each annuxureData}}
|
|
1752
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1753
|
-
<div class="text7">{{../currencyType}} {{standardPrice}}<br>{{unitBasis}}</div>
|
|
1754
|
-
</div>
|
|
1755
|
-
{{/each}}
|
|
1756
|
-
</div>
|
|
1757
|
-
<div class="column">
|
|
1758
|
-
<div class="table-header-cell" style="padding: 13px 60px 12px 22px; background-color:#D0D5DD;">
|
|
1759
|
-
<div class="table-header">
|
|
1760
|
-
<div class="text6">Price Per Month</div>
|
|
1761
|
-
</div>
|
|
1762
|
-
</div>
|
|
1763
|
-
{{#each annuxureData}}
|
|
1764
|
-
<div class="table-cell" style="height: 70px !important;">
|
|
1765
|
-
<div class="text7">{{../currencyType}} {{runningCost}}</div>
|
|
1766
|
-
</div>
|
|
1767
|
-
{{/each}}
|
|
1768
|
-
</div>
|
|
1769
|
-
</div>
|
|
1770
|
-
</div>
|
|
1670
|
+
<!-- Annexure rendered as a fixed-layout table so it always fits the
|
|
1671
|
+
page width and paginates cleanly (the previous flex column-per-
|
|
1672
|
+
field layout used huge hardcoded paddings that overflowed the
|
|
1673
|
+
1000px page and clipped the header). -->
|
|
1674
|
+
<table class="annexure-table"
|
|
1675
|
+
style="width:100%; border-collapse:collapse; table-layout:fixed; margin-top:8px; font-family:sans-serif;">
|
|
1676
|
+
<thead>
|
|
1677
|
+
<tr style="background-color:#D0D5DD;">
|
|
1678
|
+
<th style="text-align:left; padding:12px 10px; font-size:14px; color:#1D2939; width:20%;">Store Name</th>
|
|
1679
|
+
<th style="text-align:left; padding:12px 10px; font-size:14px; color:#1D2939; width:13%;">Products</th>
|
|
1680
|
+
<th style="text-align:left; padding:12px 10px; font-size:14px; color:#1D2939; width:10%;">Store ID</th>
|
|
1681
|
+
<th style="text-align:left; padding:12px 10px; font-size:14px; color:#1D2939; width:14%;">Deployment Date</th>
|
|
1682
|
+
<th style="text-align:center; padding:12px 10px; font-size:14px; color:#1D2939; width:9%;">Billing Days</th>
|
|
1683
|
+
<th style="text-align:center; padding:12px 10px; font-size:14px; color:#1D2939; width:7%;">Qty</th>
|
|
1684
|
+
<th style="text-align:right; padding:12px 10px; font-size:14px; color:#1D2939; width:13%;">Unit Price</th>
|
|
1685
|
+
<th style="text-align:right; padding:12px 10px; font-size:14px; color:#1D2939; width:14%;">Price Per Month</th>
|
|
1686
|
+
</tr>
|
|
1687
|
+
</thead>
|
|
1688
|
+
<tbody>
|
|
1689
|
+
{{#each annuxureData}}
|
|
1690
|
+
<tr style="border-bottom:1px solid #eaecf0;">
|
|
1691
|
+
<td style="text-align:left; padding:12px 10px; font-size:13px; color:#475467; word-break:break-word;">{{storeName}}</td>
|
|
1692
|
+
<td style="text-align:left; padding:12px 10px; font-size:13px; color:#475467; word-break:break-word;">{{productName}}</td>
|
|
1693
|
+
<td style="text-align:left; padding:12px 10px; font-size:13px; color:#475467;">{{storeId}}</td>
|
|
1694
|
+
<td style="text-align:left; padding:12px 10px; font-size:13px; color:#475467;">{{edgefirstFileDate}}</td>
|
|
1695
|
+
<td style="text-align:center; padding:12px 10px; font-size:13px; color:#475467; font-weight:700;">{{workingdays}}</td>
|
|
1696
|
+
<td style="text-align:center; padding:12px 10px; font-size:13px; color:#475467;">{{units}}</td>
|
|
1697
|
+
<td style="text-align:right; padding:12px 10px; font-size:13px; color:#475467;">{{../currencyType}} {{standardPrice}}<br><span style="color:#98a2b3; font-size:11px;">{{unitBasis}}</span></td>
|
|
1698
|
+
<td style="text-align:right; padding:12px 10px; font-size:13px; color:#475467; font-weight:700;">{{../currencyType}} {{runningCost}}</td>
|
|
1699
|
+
</tr>
|
|
1700
|
+
{{/each}}
|
|
1701
|
+
</tbody>
|
|
1702
|
+
</table>
|
|
1771
1703
|
<div style="display:flex; justify-content:flex-end; margin-top:14px; padding-right:10px;">
|
|
1772
1704
|
<div class="text6" style="font-weight:700;">Total: {{currencyType}} {{annuxureTotal}}</div>
|
|
1773
1705
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
-
import { createInvoice, invoiceDownload, invoiceDownloadBulk, clientInvoiceList, creditTransactionlist, pendingInvoices, applyDiscount, migrateInvoice, PaymentStatusChange, checkPaymentStatus, getInvoice, invoiceAnnexure, updateInvoice, getClientBasePricing, deleteInvoice, approveInvoiceCsm, approveInvoiceFinance, approveInvoiceApproval, recordPayment } from '../controllers/invoice.controller.js';
|
|
2
|
+
import { createInvoice, invoiceDownload, invoiceDownloadBulk, clientInvoiceList, creditTransactionlist, pendingInvoices, applyDiscount, migrateInvoice, PaymentStatusChange, checkPaymentStatus, getInvoice, invoiceAnnexure, invoiceBankDetails, updateInvoice, getClientBasePricing, deleteInvoice, approveInvoiceCsm, approveInvoiceFinance, approveInvoiceApproval, recordPayment } from '../controllers/invoice.controller.js';
|
|
3
3
|
import { isAllowedSessionHandler, accessVerification, validate } from 'tango-app-api-middleware';
|
|
4
4
|
import { getInvoiceHeads, updateInvoiceHeads } from '../controllers/applicationDefault.controllers.js';
|
|
5
5
|
import { uploadBankStatement, bankTransactionList, resolveOptions, resolveBankTransaction } from '../controllers/bankTransaction.controller.js';
|
|
6
|
-
import { estimateList, createEstimate, updateEstimate, getEstimate, estimateStatusUpdate, deleteEstimate, downloadEstimate } from '../controllers/estimate.controller.js';
|
|
6
|
+
import { estimateList, createEstimate, updateEstimate, getEstimate, estimateStatusUpdate, deleteEstimate, downloadEstimate, sendEstimate } from '../controllers/estimate.controller.js';
|
|
7
7
|
import { updateInvoiceHeadsSchema } from '../dtos/validation.dtos.js';
|
|
8
8
|
export const invoiceRouter = express.Router();
|
|
9
9
|
|
|
@@ -35,6 +35,7 @@ invoiceRouter.post( '/recordPayment', isAllowedSessionHandler, superadminBypass(
|
|
|
35
35
|
invoiceRouter.post( '/checkPaymentStatus', checkPaymentStatus );
|
|
36
36
|
invoiceRouter.get( '/getInvoice/:invoiceId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), getInvoice );
|
|
37
37
|
invoiceRouter.get( '/invoiceAnnexure/:invoiceId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), invoiceAnnexure );
|
|
38
|
+
invoiceRouter.get( '/invoiceBankDetails/:invoiceId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), invoiceBankDetails );
|
|
38
39
|
invoiceRouter.put( '/updateInvoice', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), updateInvoice );
|
|
39
40
|
invoiceRouter.get( '/getClientBasePricing/:clientId', isAllowedSessionHandler, getClientBasePricing );
|
|
40
41
|
invoiceRouter.delete( '/deleteInvoice/:invoiceId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), deleteInvoice );
|
|
@@ -58,6 +59,7 @@ invoiceRouter.post( '/bankStatement/resolve', isAllowedSessionHandler, superadmi
|
|
|
58
59
|
invoiceRouter.post( '/estimate/list', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), estimateList );
|
|
59
60
|
invoiceRouter.post( '/estimate/create', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), createEstimate );
|
|
60
61
|
invoiceRouter.post( '/estimate/update', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), updateEstimate );
|
|
62
|
+
invoiceRouter.post( '/estimate/send', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), sendEstimate );
|
|
61
63
|
invoiceRouter.post( '/estimate/download/:estimateId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), downloadEstimate );
|
|
62
64
|
invoiceRouter.get( '/estimate/:estimateId', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [] } ] } ), getEstimate );
|
|
63
65
|
invoiceRouter.post( '/estimate/statusUpdate', isAllowedSessionHandler, superadminBypass( { userType: [ 'tango' ], access: [ { featureName: 'TangoAdmin', name: 'invoiceApproval', permissions: [ 'isEdit' ] } ] } ), estimateStatusUpdate );
|
|
@@ -20,6 +20,10 @@ export const updateOne = async ( filter, update ) => {
|
|
|
20
20
|
return await model.estimateModel.updateOne( filter, update );
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
export const deleteOne = async ( filter ) => {
|
|
24
|
+
return await model.estimateModel.deleteOne( filter );
|
|
25
|
+
};
|
|
26
|
+
|
|
23
27
|
export const count = async ( query = {} ) => {
|
|
24
28
|
return await model.estimateModel.countDocuments( query );
|
|
25
29
|
};
|