Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
140
Merge Requests
140
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f91c1f2c
Commit
f91c1f2c
authored
Nov 04, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invoice: do not display tax lines with 0 quantity.
Also simplify a bit the code
parent
ea5cf6d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml
...teItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml
+8
-11
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml
View file @
f91c1f2c
...
...
@@ -197,15 +197,11 @@ for line in getSubLineList(context):\n
display_id = \'title\'\n
variation_description = \', \'.join([x[0] for x in line.getVariationCategoryItemList(display_id=display_id)])\n
desc = (\'%s %s\' % (desc[0], variation_description), )\n
is_tax=0\n
portal_preferences = context.getPortalObject().portal_preferences\n
if portal_preferences.getPreferredTaxUseList()==[] :\n
use_of_tax="use/trade/tax"\n
is_tax=line.isMemberOf(use_of_tax) \n
else:\n
tax_list=portal_preferences.getPreferredTaxUseList() \n
for use_of_tax in tax_list:\n
is_tax = is_tax or line.isMemberOf(use_of_tax)\n
is_tax = 0\n
for tax_use in (context.getPortalObject().portal_preferences.getPreferredTaxUseList() or ["use/trade/tax"]):\n
if line.isMemberOf(tax_use):\n
is_tax = 1\n
break\n
\n
#set the not_tax_line with the tax_number and the tax_line with the tax_name\n
tax_number=\'\'\n
...
...
@@ -247,8 +243,9 @@ for line in getSubLineList(context):\n
}\n
\n
if line_dict[\'use_type_tax\']:\n
total_tax_price+=line.getTotalPrice() or 0.0\n
line_tax.append(unicodeDict(line_dict.copy()))\n
if line.getQuantity():\n
total_tax_price+=line.getTotalPrice() or 0.0\n
line_tax.append(unicodeDict(line_dict.copy()))\n
else:\n
number_line_not_tax = number_line_not_tax+1\n
line_dict[\'number_not_tax_line\'] = number_line_not_tax\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment