|
9 | 9 | GST_REFUND_TAX_TYPES, |
10 | 10 | GST_TAX_RATES, |
11 | 11 | GST_TAX_TYPES, |
12 | | -<<<<<<< HEAD |
13 | | - SUBCONTRACTING_DOCTYPES, |
14 | 12 | TAXABLE_GST_TREATMENTS, |
15 | | -======= |
16 | | ->>>>>>> 82699b04 (refactor: Use GST Details for e-Waybill and e-Invoice Transactions (#3227)) |
17 | 13 | ) |
18 | 14 | from india_compliance.gst_india.constants.e_waybill import ( |
19 | 15 | TRANSPORT_MODES, |
@@ -419,55 +415,6 @@ def update_item_tax_details(self, item_details, item): |
419 | 415 | } |
420 | 416 | ) |
421 | 417 |
|
422 | | -<<<<<<< HEAD |
423 | | - def update_item_tax_details_using_taxes(self, item_details, item): |
424 | | - for tax in GST_TAX_TYPES: |
425 | | - item_details.update({f"{tax}_amount": 0, f"{tax}_rate": 0}) |
426 | | - |
427 | | - for row in self.doc.taxes: |
428 | | - if ( |
429 | | - not row.tax_amount |
430 | | - or self.is_purchase_rcm |
431 | | - or row.gst_tax_type not in GST_TAX_TYPES |
432 | | - ): |
433 | | - continue |
434 | | - |
435 | | - tax = row.gst_tax_type |
436 | | - tax_rate = self.rounded( |
437 | | - frappe.parse_json(row.item_wise_tax_detail).get( |
438 | | - item.item_code or item.item_name |
439 | | - )[0], |
440 | | - 3, |
441 | | - ) |
442 | | - |
443 | | - # considers senarios where same item is there multiple times |
444 | | - tax_amount = self.get_progressive_item_tax_amount( |
445 | | - ( |
446 | | - tax_rate * item.qty |
447 | | - if row.charge_type == "On Item Quantity" |
448 | | - else tax_rate * item.taxable_value / 100 |
449 | | - ), |
450 | | - tax, |
451 | | - ) |
452 | | - |
453 | | - item_details.update( |
454 | | - { |
455 | | - f"{tax}_rate": tax_rate, |
456 | | - f"{tax}_amount": tax_amount, |
457 | | - } |
458 | | - ) |
459 | | - |
460 | | - def update_item_tax_details_using_item_gst_details(self, item_details, item): |
461 | | - for tax in GST_TAX_TYPES: |
462 | | - item_details.update( |
463 | | - { |
464 | | - f"{tax}_amount": item.get(f"{tax}_amount"), |
465 | | - f"{tax}_rate": item.get(f"{tax}_rate"), |
466 | | - } |
467 | | - ) |
468 | | - |
469 | | -======= |
470 | | ->>>>>>> 82699b04 (refactor: Use GST Details for e-Waybill and e-Invoice Transactions (#3227)) |
471 | 418 | def get_progressive_item_tax_amount(self, amount, tax_type): |
472 | 419 | """ |
473 | 420 | Helper function to calculate progressive tax amount for an item to remove |
|
0 commit comments