mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +00:00
update foreach with for loop
This commit is contained in:
parent
1ad66be110
commit
9085170b02
@ -181,7 +181,7 @@ async function generateB2bData(rows) {
|
|||||||
async function generateB2clData(invoices) {
|
async function generateB2clData(invoices) {
|
||||||
const b2cl = [];
|
const b2cl = [];
|
||||||
|
|
||||||
invoices.forEach(async (invoice) => {
|
for (let invoice of invoices) {
|
||||||
|
|
||||||
const stateInvoiceRecord = {
|
const stateInvoiceRecord = {
|
||||||
pos: stateCodeMap[invoice.place.toUpperCase()],
|
pos: stateCodeMap[invoice.place.toUpperCase()],
|
||||||
@ -223,8 +223,7 @@ async function generateB2clData(invoices) {
|
|||||||
stateInvoiceRecord.inv.push(invRecord);
|
stateInvoiceRecord.inv.push(invRecord);
|
||||||
b2cl.push(stateInvoiceRecord);
|
b2cl.push(stateInvoiceRecord);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
|
||||||
|
|
||||||
return b2cl;
|
return b2cl;
|
||||||
}
|
}
|
||||||
@ -232,7 +231,7 @@ async function generateB2clData(invoices) {
|
|||||||
async function generateB2csData(invoices) {
|
async function generateB2csData(invoices) {
|
||||||
const b2cs = [];
|
const b2cs = [];
|
||||||
|
|
||||||
invoices.forEach(async (invoice) => {
|
for (let invoice of invoices) {
|
||||||
|
|
||||||
const pos = invoice.place.toUpperCase();
|
const pos = invoice.place.toUpperCase();
|
||||||
|
|
||||||
@ -251,7 +250,7 @@ async function generateB2csData(invoices) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b2cs.push(invRecord);
|
b2cs.push(invRecord);
|
||||||
});
|
}
|
||||||
|
|
||||||
return b2cs;
|
return b2cs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user