mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +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) {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user