2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

update foreach with for loop

This commit is contained in:
Ankit Singhaniya 2021-12-28 20:41:40 +05:30
parent 39bad5bd83
commit 99dfc93129

View File

@ -181,7 +181,7 @@ async function generateB2bData(rows) {
async function generateB2clData(invoices) {
const b2cl = [];
invoices.forEach(async (invoice) => {
for (let invoice of invoices) {
const stateInvoiceRecord = {
pos: stateCodeMap[invoice.place.toUpperCase()],
@ -223,8 +223,7 @@ async function generateB2clData(invoices) {
stateInvoiceRecord.inv.push(invRecord);
b2cl.push(stateInvoiceRecord);
}
})
}
return b2cl;
}
@ -232,7 +231,7 @@ async function generateB2clData(invoices) {
async function generateB2csData(invoices) {
const b2cs = [];
invoices.forEach(async (invoice) => {
for (let invoice of invoices) {
const pos = invoice.place.toUpperCase();
@ -251,7 +250,7 @@ async function generateB2csData(invoices) {
}
b2cs.push(invRecord);
});
}
return b2cs;
}