Browse Source

Sep 10: [FIX] Bug Fixed 'account_journal_discount'

pull/332/merge
Cybrosys Technologies 8 months ago
parent
commit
ba85d5c3ae
  1. 2
      account_journal_discount/__manifest__.py
  2. 6
      account_journal_discount/doc/RELEASE_NOTES.md
  3. 4
      account_journal_discount/models/account_move.py

2
account_journal_discount/__manifest__.py

@ -21,7 +21,7 @@
############################################################################# #############################################################################
{ {
'name': 'Journal Discount on Invoices And Bills', 'name': 'Journal Discount on Invoices And Bills',
'version': '16.0.1.0.0', 'version': '16.0.1.0.1',
'category': 'Accounting', 'category': 'Accounting',
'summary': """Create discount journal items for discounts in invoices and 'summary': """Create discount journal items for discounts in invoices and
bills""", bills""",

6
account_journal_discount/doc/RELEASE_NOTES.md

@ -5,3 +5,9 @@
#### ADD #### ADD
- Initial Commit for Journal Discount on Invoices And Bills. - Initial Commit for Journal Discount on Invoices And Bills.
#### 10.09.2024
#### Version 16.0.1.0.1
#### UPDT
- Fixed the issue in calculation of debit and credit value of discounted journal

4
account_journal_discount/models/account_move.py

@ -38,7 +38,7 @@ class AccountMove(models.Model):
if line.discount > 0 and \ if line.discount > 0 and \
line.product_id.categ_id.customer_account_discount_id: line.product_id.categ_id.customer_account_discount_id:
debit_credit_value = abs( debit_credit_value = abs(
float_round((line.price_subtotal - line.price_unit), float_round((line.price_subtotal - (line.quantity * line.price_unit)),
precision_digits= precision_digits=
self.currency_id.decimal_places)) self.currency_id.decimal_places))
self.env['account.move.line'].create({ self.env['account.move.line'].create({
@ -66,7 +66,7 @@ class AccountMove(models.Model):
if line.discount > 0 and \ if line.discount > 0 and \
line.product_id.categ_id.vendor_account_discount_id: line.product_id.categ_id.vendor_account_discount_id:
debit_credit_value = abs( debit_credit_value = abs(
float_round((line.price_subtotal - line.price_unit), float_round((line.price_subtotal - (line.quantity * line.price_unit)),
precision_digits= precision_digits=
self.currency_id.decimal_places)) self.currency_id.decimal_places))
self.env['account.move.line'].with_context( self.env['account.move.line'].with_context(

Loading…
Cancel
Save