refactor: flowaccount move product code to front for product name
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s
This commit is contained in:
parent
a9201f715a
commit
334fb57b46
1 changed files with 9 additions and 5 deletions
|
|
@ -461,7 +461,6 @@ const flowAccount = {
|
|||
const commonBody = {
|
||||
productStructureType: null,
|
||||
type: 3,
|
||||
code: `${code}`,
|
||||
name: body.name,
|
||||
sellDescription: body.detail,
|
||||
sellVatType: 3,
|
||||
|
|
@ -505,9 +504,9 @@ const flowAccount = {
|
|||
};
|
||||
|
||||
const [sellId, agentId] = await Promise.all([
|
||||
createProduct(`${body.name}`, body.price, /true/.test(`${body.vatIncluded}`)),
|
||||
createProduct(`${code} ${body.name}`, body.price, /true/.test(`${body.vatIncluded}`)),
|
||||
createProduct(
|
||||
`${body.name} (ราคาตัวแทน)`,
|
||||
`${code} ${body.name} (ราคาตัวแทน)`,
|
||||
body.agentPrice,
|
||||
/true/.test(`${body.agentPriceVatIncluded}`),
|
||||
),
|
||||
|
|
@ -573,10 +572,15 @@ const flowAccount = {
|
|||
};
|
||||
|
||||
await Promise.all([
|
||||
editProduct(sellPriceId, `${body.name}`, body.price, /true/.test(`${body.vatIncluded}`)),
|
||||
editProduct(
|
||||
sellPriceId,
|
||||
`${body.code} ${body.name}`,
|
||||
body.price,
|
||||
/true/.test(`${body.vatIncluded}`),
|
||||
),
|
||||
editProduct(
|
||||
agentPriceId,
|
||||
`${body.name} (ราคาตัวแทน)`,
|
||||
`${body.code} ${body.name} (ราคาตัวแทน)`,
|
||||
body.agentPrice,
|
||||
/true/.test(`${body.agentPriceVatIncluded}`),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue