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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
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
...
@@ -197,15 +197,11 @@ for line in getSubLineList(context):\n
display_id = \'title\'\n
display_id = \'title\'\n
variation_description = \', \'.join([x[0] for x in line.getVariationCategoryItemList(display_id=display_id)])\n
variation_description = \', \'.join([x[0] for x in line.getVariationCategoryItemList(display_id=display_id)])\n
desc = (\'%s %s\' % (desc[0], variation_description), )\n
desc = (\'%s %s\' % (desc[0], variation_description), )\n
is_tax=0\n
is_tax = 0\n
portal_preferences = context.getPortalObject().portal_preferences\n
for tax_use in (context.getPortalObject().portal_preferences.getPreferredTaxUseList() or ["use/trade/tax"]):\n
if portal_preferences.getPreferredTaxUseList()==[] :\n
if line.isMemberOf(tax_use):\n
use_of_tax="use/trade/tax"\n
is_tax = 1\n
is_tax=line.isMemberOf(use_of_tax) \n
break\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
\n
\n
#set the not_tax_line with the tax_number and the tax_line with the tax_name\n
#set the not_tax_line with the tax_number and the tax_line with the tax_name\n
tax_number=\'\'\n
tax_number=\'\'\n
...
@@ -247,8 +243,9 @@ for line in getSubLineList(context):\n
...
@@ -247,8 +243,9 @@ for line in getSubLineList(context):\n
}\n
}\n
\n
\n
if line_dict[\'use_type_tax\']:\n
if line_dict[\'use_type_tax\']:\n
total_tax_price+=line.getTotalPrice() or 0.0\n
if line.getQuantity():\n
line_tax.append(unicodeDict(line_dict.copy()))\n
total_tax_price+=line.getTotalPrice() or 0.0\n
line_tax.append(unicodeDict(line_dict.copy()))\n
else:\n
else:\n
number_line_not_tax = number_line_not_tax+1\n
number_line_not_tax = number_line_not_tax+1\n
line_dict[\'number_not_tax_line\'] = number_line_not_tax\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