Merge lp:~openbig/bigconsulting/ending_balance into lp:bigconsulting
- ending_balance
- Merge into addons
Proposed by
gpa(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 109 |
Proposed branch: | lp:~openbig/bigconsulting/ending_balance |
Merge into: | lp:bigconsulting |
Diff against target: |
320 lines (+113/-31) 3 files modified
account_invoice_cash_discount/account_invoice_cash_discount.py (+58/-6) account_invoice_cash_discount/account_invoice_cash_discount_view.xml (+50/-24) account_invoice_cash_discount/wizard/invoice_statement_payment.py (+5/-1) |
To merge this branch: | bzr merge lp:~openbig/bigconsulting/ending_balance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
openbig | Pending | ||
Review via email: mp+36537@code.launchpad.net |
Commit message
Description of the change
Improvement for the Ending Balance
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_invoice_cash_discount/account_invoice_cash_discount.py' | |||
2 | --- account_invoice_cash_discount/account_invoice_cash_discount.py 2010-09-23 15:13:30 +0000 | |||
3 | +++ account_invoice_cash_discount/account_invoice_cash_discount.py 2010-09-24 09:43:39 +0000 | |||
4 | @@ -645,6 +645,43 @@ | |||
5 | 645 | class account_bank_statement(osv.osv): | 645 | class account_bank_statement(osv.osv): |
6 | 646 | _inherit="account.bank.statement" | 646 | _inherit="account.bank.statement" |
7 | 647 | 647 | ||
8 | 648 | def _end_balance(self, cursor, user, ids, name, attr, context=None): | ||
9 | 649 | res_currency_obj = self.pool.get('res.currency') | ||
10 | 650 | res_users_obj = self.pool.get('res.users') | ||
11 | 651 | |||
12 | 652 | res = {} | ||
13 | 653 | |||
14 | 654 | company_currency_id = res_users_obj.browse(cursor, user, user, | ||
15 | 655 | context=context).company_id.currency_id.id | ||
16 | 656 | statements = self.browse(cursor, user, ids, context=context) | ||
17 | 657 | for statement in statements: | ||
18 | 658 | res[statement.id] = statement.balance_start | ||
19 | 659 | currency_id = statement.currency.id | ||
20 | 660 | for line in statement.move_line_ids: | ||
21 | 661 | if line.debit > 0: | ||
22 | 662 | if line.account_id.id == \ | ||
23 | 663 | statement.journal_id.default_debit_account_id.id: | ||
24 | 664 | res[statement.id] += res_currency_obj.compute(cursor, | ||
25 | 665 | user, company_currency_id, currency_id, | ||
26 | 666 | line.debit, context=context) | ||
27 | 667 | else: | ||
28 | 668 | if line.account_id.id == \ | ||
29 | 669 | statement.journal_id.default_credit_account_id.id: | ||
30 | 670 | res[statement.id] -= res_currency_obj.compute(cursor, | ||
31 | 671 | user, company_currency_id, currency_id, | ||
32 | 672 | line.credit, context=context) | ||
33 | 673 | if statement.state == 'draft': | ||
34 | 674 | for line in statement.line_ids: | ||
35 | 675 | res[statement.id] += line.amount - line.cash_discount | ||
36 | 676 | |||
37 | 677 | for r in res: | ||
38 | 678 | res[r] = round(res[r], 2) | ||
39 | 679 | return res | ||
40 | 680 | |||
41 | 681 | _columns = { | ||
42 | 682 | 'balance_end': fields.function(_end_balance, method=True, string='Balance'), | ||
43 | 683 | } | ||
44 | 684 | |||
45 | 648 | def button_confirm(self, cr, uid, ids, context={}): | 685 | def button_confirm(self, cr, uid, ids, context={}): |
46 | 649 | done = [] | 686 | done = [] |
47 | 650 | tax_obj = self.pool.get('account.tax') | 687 | tax_obj = self.pool.get('account.tax') |
48 | @@ -884,7 +921,7 @@ | |||
49 | 884 | 'amount_currency': 0.0, | 921 | 'amount_currency': 0.0, |
50 | 885 | 'currency_id': currency_id, | 922 | 'currency_id': currency_id, |
51 | 886 | }, context=context) | 923 | }, context=context) |
53 | 887 | 924 | ||
54 | 888 | currency_diff2 = account_move_line_obj.create(cr, uid, { | 925 | currency_diff2 = account_move_line_obj.create(cr, uid, { |
55 | 889 | 'name': move.name, | 926 | 'name': move.name, |
56 | 890 | 'date': move.date, | 927 | 'date': move.date, |
57 | @@ -920,7 +957,7 @@ | |||
58 | 920 | 'amount_currency': 0.0, | 957 | 'amount_currency': 0.0, |
59 | 921 | 'currency_id': currency_id, | 958 | 'currency_id': currency_id, |
60 | 922 | }, context=context) | 959 | }, context=context) |
62 | 923 | 960 | ||
63 | 924 | currency_diff2 = account_move_line_obj.create(cr, uid, { | 961 | currency_diff2 = account_move_line_obj.create(cr, uid, { |
64 | 925 | 'name': move.name, | 962 | 'name': move.name, |
65 | 926 | 'date': move.date, | 963 | 'date': move.date, |
66 | @@ -939,15 +976,14 @@ | |||
67 | 939 | 976 | ||
68 | 940 | if move_line_data.invoice.currency_id.id != company_currency_id: | 977 | if move_line_data.invoice.currency_id.id != company_currency_id: |
69 | 941 | torec.append(currency_diff1) | 978 | torec.append(currency_diff1) |
71 | 942 | 979 | ||
72 | 943 | new_end_value += amount+st_tax_amount-newline_sum | 980 | new_end_value += amount+st_tax_amount-newline_sum |
73 | 944 | |||
74 | 945 | if st.currency.id <> company_currency_id: | 981 | if st.currency.id <> company_currency_id: |
75 | 946 | amount_currency = res_currency_obj.compute(cr, uid, company_currency_id, st.currency.id, | 982 | amount_currency = res_currency_obj.compute(cr, uid, company_currency_id, st.currency.id, |
76 | 947 | (amount+st_tax_amount-newline_sum), context=context, | 983 | (amount+st_tax_amount-newline_sum), context=context, |
77 | 948 | account=acc_cur) | 984 | account=acc_cur) |
78 | 949 | currency_id = st.currency.id | 985 | currency_id = st.currency.id |
80 | 950 | 986 | ||
81 | 951 | account_move_line_obj.create(cr, uid, { | 987 | account_move_line_obj.create(cr, uid, { |
82 | 952 | 'name': move.name, | 988 | 'name': move.name, |
83 | 953 | 'date': move.date, | 989 | 'date': move.date, |
84 | @@ -964,10 +1000,10 @@ | |||
85 | 964 | 'currency_id': currency_id, | 1000 | 'currency_id': currency_id, |
86 | 965 | }, context=context) | 1001 | }, context=context) |
87 | 966 | 1002 | ||
88 | 1003 | |||
89 | 967 | account_move_line_obj.write(cr, uid, [x.id for x in | 1004 | account_move_line_obj.write(cr, uid, [x.id for x in |
90 | 968 | account_move_obj.browse(cr, uid, move_id, | 1005 | account_move_obj.browse(cr, uid, move_id, |
91 | 969 | context=context).line_id], {'statement_id': st.id,}) | 1006 | context=context).line_id], {'statement_id': st.id,}) |
92 | 970 | |||
93 | 971 | for line in account_move_line_obj.browse(cr, uid, [x.id for x in | 1007 | for line in account_move_line_obj.browse(cr, uid, [x.id for x in |
94 | 972 | account_move_obj.browse(cr, uid, move_id, | 1008 | account_move_obj.browse(cr, uid, move_id, |
95 | 973 | context=context).line_id], | 1009 | context=context).line_id], |
96 | @@ -976,6 +1012,7 @@ | |||
97 | 976 | if line.state <> 'valid': | 1012 | if line.state <> 'valid': |
98 | 977 | raise osv.except_osv(_('Error !'), | 1013 | raise osv.except_osv(_('Error !'), |
99 | 978 | _('Account move line "%s" is not valid') % line.name) | 1014 | _('Account move line "%s" is not valid') % line.name) |
100 | 1015 | |||
101 | 979 | if move.reconcile_id and move.reconcile_id.line_ids: | 1016 | if move.reconcile_id and move.reconcile_id.line_ids: |
102 | 980 | torec += map(lambda x: x.id, move.reconcile_id.line_ids) | 1017 | torec += map(lambda x: x.id, move.reconcile_id.line_ids) |
103 | 981 | #try: | 1018 | #try: |
104 | @@ -998,7 +1035,13 @@ | |||
105 | 998 | #### to write the balace value in the ending balance | 1035 | #### to write the balace value in the ending balance |
106 | 999 | balance_end_value = 0.0 | 1036 | balance_end_value = 0.0 |
107 | 1000 | balance_start_value = self.browse(cr, uid, st.id, context=context).balance_start | 1037 | balance_start_value = self.browse(cr, uid, st.id, context=context).balance_start |
108 | 1038 | |||
109 | 1039 | if st.currency.id <> company_currency_id: | ||
110 | 1040 | new_end_value = res_currency_obj.compute(cr, uid, company_currency_id, st.currency.id, | ||
111 | 1041 | new_end_value, context=context, | ||
112 | 1042 | account=acc_cur) | ||
113 | 1001 | balance_end_value = balance_start_value + new_end_value | 1043 | balance_end_value = balance_start_value + new_end_value |
114 | 1044 | |||
115 | 1002 | self.write(cr, uid, done, {'state':'confirm','balance_end_real':balance_end_value}, context=context) | 1045 | self.write(cr, uid, done, {'state':'confirm','balance_end_real':balance_end_value}, context=context) |
116 | 1003 | 1046 | ||
117 | 1004 | return True | 1047 | return True |
118 | @@ -1012,6 +1055,9 @@ | |||
119 | 1012 | 'tax_type': fields.selection([('tax_included','Tax included'), | 1055 | 'tax_type': fields.selection([('tax_included','Tax included'), |
120 | 1013 | ('tax_excluded','Tax excluded')], | 1056 | ('tax_excluded','Tax excluded')], |
121 | 1014 | 'Tax method', required=True,), | 1057 | 'Tax method', required=True,), |
122 | 1058 | 'cash_discount': fields.float('Cash Discount'), | ||
123 | 1059 | 'transferred_amount': fields.float('Transferred'), | ||
124 | 1060 | |||
125 | 1015 | } | 1061 | } |
126 | 1016 | 1062 | ||
127 | 1017 | def onchange_account_id(self, cr, uid, ids, account_id, context=None): | 1063 | def onchange_account_id(self, cr, uid, ids, account_id, context=None): |
128 | @@ -1026,7 +1072,13 @@ | |||
129 | 1026 | result['tax_id'] = False | 1072 | result['tax_id'] = False |
130 | 1027 | 1073 | ||
131 | 1028 | return {'value': result} | 1074 | return {'value': result} |
132 | 1075 | |||
133 | 1076 | def onchange_cash_discount(self, cr, uid, ids, amount, cash_discount, context=None): | ||
134 | 1077 | return {'value': {'transferred_amount': amount - cash_discount}} | ||
135 | 1029 | 1078 | ||
136 | 1079 | def onchange_transferred_amount(self, cr, uid, ids, amount, transferred_amount, context=None): | ||
137 | 1080 | return {'value': {'cash_discount': amount - transferred_amount}} | ||
138 | 1081 | |||
139 | 1030 | def onchange_type(self, cr, uid, ids, type, context=None): | 1082 | def onchange_type(self, cr, uid, ids, type, context=None): |
140 | 1031 | result={} | 1083 | result={} |
141 | 1032 | tax_id = self.pool.get('account.tax').search(cr, uid, []) | 1084 | tax_id = self.pool.get('account.tax').search(cr, uid, []) |
142 | 1033 | 1085 | ||
143 | === modified file 'account_invoice_cash_discount/account_invoice_cash_discount_view.xml' | |||
144 | --- account_invoice_cash_discount/account_invoice_cash_discount_view.xml 2010-08-11 12:51:31 +0000 | |||
145 | +++ account_invoice_cash_discount/account_invoice_cash_discount_view.xml 2010-09-24 09:43:39 +0000 | |||
146 | @@ -46,27 +46,27 @@ | |||
147 | 46 | </field> | 46 | </field> |
148 | 47 | </record> | 47 | </record> |
149 | 48 | 48 | ||
151 | 49 | <record id="bank_statement_form_view1" model="ir.ui.view"> | 49 | <record id="bank_statement_form_view1" model="ir.ui.view"> |
152 | 50 | <field name="name">account.bank.statement.form</field> | 50 | <field name="name">account.bank.statement.form</field> |
153 | 51 | <field name="model">account.bank.statement</field> | 51 | <field name="model">account.bank.statement</field> |
154 | 52 | <field name="type">form</field> | 52 | <field name="type">form</field> |
155 | 53 | <field name="inherit_id" ref="account.view_bank_statement_form"/> | 53 | <field name="inherit_id" ref="account.view_bank_statement_form"/> |
156 | 54 | <field name="arch" type="xml"> | 54 | <field name="arch" type="xml"> |
158 | 55 | <xpath expr="//button[@string='Import Invoice']" position="replace"> | 55 | <xpath expr="//button[@string='Import Invoice']" position="replace"> |
159 | 56 | <button name="%(wizard_populate_statement_from_inv1)d" type="action" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}"/> | 56 | <button name="%(wizard_populate_statement_from_inv1)d" type="action" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}"/> |
161 | 57 | </xpath> | 57 | </xpath> |
162 | 58 | </field> | 58 | </field> |
163 | 59 | </record> | 59 | </record> |
164 | 60 | 60 | ||
166 | 61 | <record id="bank_statement_reconcile_form_view1" model="ir.ui.view"> | 61 | <record id="bank_statement_reconcile_form_view1" model="ir.ui.view"> |
167 | 62 | <field name="name">account.bank.statement.reconcile.form</field> | 62 | <field name="name">account.bank.statement.reconcile.form</field> |
168 | 63 | <field name="model">account.bank.statement.reconcile</field> | 63 | <field name="model">account.bank.statement.reconcile</field> |
169 | 64 | <field name="type">form</field> | 64 | <field name="type">form</field> |
170 | 65 | <field name="inherit_id" ref="account.view_bank_statement_reconcile"/> | 65 | <field name="inherit_id" ref="account.view_bank_statement_reconcile"/> |
171 | 66 | <field name="arch" type="xml"> | 66 | <field name="arch" type="xml"> |
175 | 67 | <field name="total_new" position="replace"> | 67 | <field name="total_new" position="replace"> |
176 | 68 | <field name="total_new" string="Total Write Off / Cash Discount"/> | 68 | <field name="total_new" string="Total Write Off / Cash Discount"/> |
177 | 69 | </field> | 69 | </field> |
178 | 70 | </field> | 70 | </field> |
179 | 71 | </record> | 71 | </record> |
180 | 72 | 72 | ||
181 | @@ -92,13 +92,13 @@ | |||
182 | 92 | <field name="type">form</field> | 92 | <field name="type">form</field> |
183 | 93 | <field name="inherit_id" ref="account.view_bank_statement_reconcile"/> | 93 | <field name="inherit_id" ref="account.view_bank_statement_reconcile"/> |
184 | 94 | <field name="arch" type="xml"> | 94 | <field name="arch" type="xml"> |
187 | 95 | <xpath expr="//tree[@string='Write-Off']" position="replace"> | 95 | <xpath expr="//tree[@string='Write-Off']" position="replace"> |
188 | 96 | <tree editable="bottom" string="Write-Off and Cash-Discount"> | 96 | <tree editable="bottom" string="Write-Off and Cash-Discount"> |
189 | 97 | <field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/> | 97 | <field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/> |
190 | 98 | <field name="amount"/> | 98 | <field name="amount"/> |
191 | 99 | <field name="name"/> | 99 | <field name="name"/> |
192 | 100 | </tree> | 100 | </tree> |
194 | 101 | </xpath> | 101 | </xpath> |
195 | 102 | </field> | 102 | </field> |
196 | 103 | </record> | 103 | </record> |
197 | 104 | 104 | ||
198 | @@ -108,10 +108,10 @@ | |||
199 | 108 | <field name="type">form</field> | 108 | <field name="type">form</field> |
200 | 109 | <field name="inherit_id" ref="account.view_payment_term_line_form"/> | 109 | <field name="inherit_id" ref="account.view_payment_term_line_form"/> |
201 | 110 | <field name="arch" type="xml"> | 110 | <field name="arch" type="xml"> |
206 | 111 | <field name="days2" position="after"> | 111 | <field name="days2" position="after"> |
207 | 112 | <field name="compl_cash_discount"/> | 112 | <field name="compl_cash_discount"/> |
208 | 113 | <field name="day_tolerance" required="1" /> | 113 | <field name="day_tolerance" required="1" /> |
209 | 114 | </field> | 114 | </field> |
210 | 115 | </field> | 115 | </field> |
211 | 116 | </record> | 116 | </record> |
212 | 117 | 117 | ||
213 | @@ -143,25 +143,25 @@ | |||
214 | 143 | </group> | 143 | </group> |
215 | 144 | </form> | 144 | </form> |
216 | 145 | </field> | 145 | </field> |
218 | 146 | </record> | 146 | </record> |
219 | 147 | 147 | ||
221 | 148 | <record id="action_res_company_wizard" model="ir.actions.act_window"> | 148 | <record id="action_res_company_wizard" model="ir.actions.act_window"> |
222 | 149 | <field name="name">Account set in Company</field> | 149 | <field name="name">Account set in Company</field> |
223 | 150 | <field name="type">ir.actions.act_window</field> | 150 | <field name="type">ir.actions.act_window</field> |
224 | 151 | <field name="res_model">res.company.wizard</field> | 151 | <field name="res_model">res.company.wizard</field> |
225 | 152 | <field name="view_type">form</field> | 152 | <field name="view_type">form</field> |
226 | 153 | <field name="view_mode">form</field> | 153 | <field name="view_mode">form</field> |
227 | 154 | <field name="target">new</field> | 154 | <field name="target">new</field> |
229 | 155 | </record> | 155 | </record> |
230 | 156 | 156 | ||
232 | 157 | <record id="config_wizard_res_company_wizard" model="ir.actions.todo"> | 157 | <record id="config_wizard_res_company_wizard" model="ir.actions.todo"> |
233 | 158 | <field name="name">Account set in Company</field> | 158 | <field name="name">Account set in Company</field> |
234 | 159 | <field name="note">This Configuration step use to set default Account</field> | 159 | <field name="note">This Configuration step use to set default Account</field> |
235 | 160 | <field name="action_id" ref="action_res_company_wizard"/> | 160 | <field name="action_id" ref="action_res_company_wizard"/> |
240 | 161 | </record> | 161 | </record> |
241 | 162 | 162 | ||
242 | 163 | 163 | ||
243 | 164 | <record model="ir.ui.view" id="view_bank_statement_reconcile_view122"> | 164 | <record model="ir.ui.view" id="view_bank_statement_reconcile_view122"> |
244 | 165 | <field name="name">account.bank.statement.reconcile.form</field> | 165 | <field name="name">account.bank.statement.reconcile.form</field> |
245 | 166 | <field name="model">account.bank.statement.reconcile</field> | 166 | <field name="model">account.bank.statement.reconcile</field> |
246 | 167 | <field name="inherit_id" ref="account.view_bank_statement_reconcile" /> | 167 | <field name="inherit_id" ref="account.view_bank_statement_reconcile" /> |
247 | @@ -173,7 +173,7 @@ | |||
248 | 173 | </field> | 173 | </field> |
249 | 174 | </record> | 174 | </record> |
250 | 175 | 175 | ||
252 | 176 | <record id="view_move_line_tree1" model="ir.ui.view"> | 176 | <record id="view_move_line_tree1" model="ir.ui.view"> |
253 | 177 | <field name="name">account.move.line.tree</field> | 177 | <field name="name">account.move.line.tree</field> |
254 | 178 | <field name="model">account.move.line</field> | 178 | <field name="model">account.move.line</field> |
255 | 179 | <field name="type">tree</field> | 179 | <field name="type">tree</field> |
256 | @@ -194,7 +194,7 @@ | |||
257 | 194 | <field name="type">form</field> | 194 | <field name="type">form</field> |
258 | 195 | <field name="arch" type="xml"> | 195 | <field name="arch" type="xml"> |
259 | 196 | <field name="account_id" position="replace"> | 196 | <field name="account_id" position="replace"> |
261 | 197 | <field name="account_id" on_change="onchange_account_id(account_id)"/> | 197 | <field name="account_id" on_change="onchange_account_id(account_id)"/> |
262 | 198 | </field> | 198 | </field> |
263 | 199 | </field> | 199 | </field> |
264 | 200 | </record> | 200 | </record> |
265 | @@ -236,6 +236,32 @@ | |||
266 | 236 | </field> | 236 | </field> |
267 | 237 | </field> | 237 | </field> |
268 | 238 | </record> | 238 | </record> |
269 | 239 | |||
270 | 240 | <record model="ir.ui.view" id="view_bank_statement_tax_tree1"> | ||
271 | 241 | <field name="name">account.bank.statement.tree1</field> | ||
272 | 242 | <field name="model">account.bank.statement</field> | ||
273 | 243 | <field name="inherit_id" ref="account.view_bank_statement_form"/> | ||
274 | 244 | <field name="type">form</field> | ||
275 | 245 | <field name="arch" type="xml"> | ||
276 | 246 | <xpath expr="//field[@name='line_ids']/tree/field[@name='amount']" position="after"> | ||
277 | 247 | <field name="cash_discount" on_change="onchange_cash_discount(amount,cash_discount)"/> | ||
278 | 248 | <field name="transferred_amount" on_change="onchange_transferred_amount(amount,transferred_amount)"/> | ||
279 | 249 | </xpath> | ||
280 | 250 | </field> | ||
281 | 251 | </record> | ||
282 | 239 | 252 | ||
283 | 253 | <record model="ir.ui.view" id="view_bank_statement_tax_form1"> | ||
284 | 254 | <field name="name">account.bank.statement.form1</field> | ||
285 | 255 | <field name="model">account.bank.statement</field> | ||
286 | 256 | <field name="inherit_id" ref="account.view_bank_statement_form"/> | ||
287 | 257 | <field name="type">form</field> | ||
288 | 258 | <field name="arch" type="xml"> | ||
289 | 259 | <xpath expr="//field[@name='line_ids']/form/field[@name='amount']" position="after"> | ||
290 | 260 | <field name="cash_discount" on_change="onchange_cash_discount(amount,cash_discount)"/> | ||
291 | 261 | <field name="transferred_amount" on_change="onchange_transferred_amount(amount,transferred_amount)"/> | ||
292 | 262 | </xpath> | ||
293 | 263 | </field> | ||
294 | 264 | </record> | ||
295 | 265 | |||
296 | 240 | </data> | 266 | </data> |
297 | 241 | </openerp> | 267 | </openerp> |
298 | 242 | 268 | ||
299 | === modified file 'account_invoice_cash_discount/wizard/invoice_statement_payment.py' | |||
300 | --- account_invoice_cash_discount/wizard/invoice_statement_payment.py 2010-09-21 12:22:46 +0000 | |||
301 | +++ account_invoice_cash_discount/wizard/invoice_statement_payment.py 2010-09-24 09:43:39 +0000 | |||
302 | @@ -115,7 +115,9 @@ | |||
303 | 115 | obj_inv = pool.get('account.invoice') | 115 | obj_inv = pool.get('account.invoice') |
304 | 116 | tax_obj = pool.get('account.tax') | 116 | tax_obj = pool.get('account.tax') |
305 | 117 | invoice_tax_obj = pool.get("account.invoice.tax") | 117 | invoice_tax_obj = pool.get("account.invoice.tax") |
307 | 118 | 118 | ||
308 | 119 | discount = 0.0 | ||
309 | 120 | |||
310 | 119 | statement = statement_obj.browse(cursor, user, data['id'], context=context) | 121 | statement = statement_obj.browse(cursor, user, data['id'], context=context) |
311 | 120 | # for each selected move lines | 122 | # for each selected move lines |
312 | 121 | for line in line_obj.browse(cursor, user, line_ids, context=context): | 123 | for line in line_obj.browse(cursor, user, line_ids, context=context): |
313 | @@ -230,6 +232,8 @@ | |||
314 | 230 | 'ref': line.ref, | 232 | 'ref': line.ref, |
315 | 231 | 'reconcile_id': reconcile_id, | 233 | 'reconcile_id': reconcile_id, |
316 | 232 | 'date':line_date, #time.strftime('%Y-%m-%d'), #line.date_maturity or, | 234 | 'date':line_date, #time.strftime('%Y-%m-%d'), #line.date_maturity or, |
317 | 235 | 'cash_discount': discount, | ||
318 | 236 | 'transferred_amount': cal_invoice_amount - discount, | ||
319 | 233 | }, context=context) | 237 | }, context=context) |
320 | 234 | return {} | 238 | return {} |
321 | 235 | 239 |