kts-component-invoice-operate 1.2.21 → 1.2.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -242,7 +242,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
242
242
  setList([])
243
243
  }
244
244
  }, [visible])
245
-
245
+
246
246
  return (
247
247
  <>
248
248
  <InputAntd readOnly value={props.value} addonAfter={<Button size="small" type="link" onClick={() => { setVisible(true) }} >点击选择</Button>} />
@@ -290,7 +290,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
290
290
  if (!good) return;
291
291
 
292
292
  // const name = getItemName(good.itemName, values.shorthand);
293
-
293
+
294
294
  good.itemName = getItemName(good.itemName, values.shorthand); // `*${values.shorthand}*${name}`;
295
295
  good.taxClassificationCode = values.taxClassificationCode;
296
296
  good.taxRate = values.taxRate;
@@ -301,19 +301,25 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
301
301
  const taxRate = chain(bignumber(values.taxRate)).dotDivide(bignumber(100)).add(bignumber(1)).done();
302
302
 
303
303
  // 是否含税
304
- if (s.goodsListState.isTaxIncluded) {
305
- const lineAmountExcludeTax = chain(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
306
- const priceExcludeTax = good.priceIncludeTax ? chain(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined
304
+ const lineAmountExcludeTax = chain(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
305
+ const priceExcludeTax = good.priceIncludeTax ? chain(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined
307
306
 
308
- good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
309
- good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined;
310
- } else {
311
- const lineAmountIncludeTax = chain(bignumber(good.lineAmountExcludeTax)).multiply(taxRate).done();
312
- const priceIncludeTax = good.priceExcludeTax ? chain(bignumber(good.priceExcludeTax)).multiply(taxRate).done() : undefined
307
+ good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
308
+ good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined;
313
309
 
314
- good.lineAmountIncludeTax = lineAmountIncludeTax.toNumber().toFixed(2);
315
- good.priceIncludeTax = (priceIncludeTax ? format15(priceIncludeTax.toNumber()) : undefined) || undefined;
316
- }
310
+ // if (s.goodsListState.isTaxIncluded) {
311
+ // const lineAmountExcludeTax = chain(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
312
+ // const priceExcludeTax = good.priceIncludeTax ? chain(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined
313
+
314
+ // good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
315
+ // good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined;
316
+ // } else {
317
+ // const lineAmountIncludeTax = chain(bignumber(good.lineAmountExcludeTax)).multiply(taxRate).done();
318
+ // const priceIncludeTax = good.priceExcludeTax ? chain(bignumber(good.priceExcludeTax)).multiply(taxRate).done() : undefined
319
+
320
+ // good.lineAmountIncludeTax = lineAmountIncludeTax.toNumber().toFixed(2);
321
+ // good.priceIncludeTax = (priceIncludeTax ? format15(priceIncludeTax.toNumber()) : undefined) || undefined;
322
+ // }
317
323
 
318
324
  good.taxAmount = countTaxAmount(good.lineAmountIncludeTax || 0, s.goodsListState.deduction, values.taxRate);
319
325
  });