Improved reports compitable with new report engine (ref:nch)
bzr revid: hda@hda-20090513064023-l9zc8vpyi3tcl159
This commit is contained in:
@@ -57,9 +57,12 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,-1"/>
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -85,17 +88,18 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
|
||||
<blockTableStyle id="TrLevel">
|
||||
@@ -122,7 +126,6 @@
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level2"
|
||||
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
<paraStyle name="Level1"
|
||||
@@ -158,7 +161,7 @@
|
||||
<para style="P12a">Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">Account</para>
|
||||
<para style="P12b">Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Debit</para>
|
||||
@@ -173,11 +176,11 @@
|
||||
<tr>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td>
|
||||
|
||||
<para style="P14">
|
||||
<font color="white">[[ ...*(a['level']) ]]</font> [[ a['name'] ]]
|
||||
<font>[[ (a['level']<3 and setTag('tr','tr',{'style':'TrLevel'+str(a['level']), 'paraStyle':('Level'+str(a['level']))})) or removeParentNode('font') ]]</font>
|
||||
<font>[[ (a['level']>2 and setTag('tr','tr',{'style':'TrLevel', 'paraStyle':('Level')})) or removeParentNode('font') ]] </font>
|
||||
<font color="white">[[ '...'*(a['level']) ]]</font> [[ a['name'] ]]</para>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font>
|
||||
@@ -194,4 +197,4 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -23,79 +23,17 @@ import time
|
||||
import pooler
|
||||
from report import report_sxw
|
||||
|
||||
parents = {
|
||||
'tr':1,
|
||||
'li':1,
|
||||
'story': 0,
|
||||
'section': 0
|
||||
}
|
||||
|
||||
class account_invoice_1(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_invoice_1, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'invoice_lines': self.invoice_lines,
|
||||
'repeat_In':self.repeat_In,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def repeat_In(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]):
|
||||
self._node.data = ''
|
||||
node = self._find_parent(self._node, nodes_parent or parents)
|
||||
ns = node.nextSibling
|
||||
|
||||
value=['tax_types','quantity','uos','price_unit','discount','price_subtotal','currency']
|
||||
type=['string','string','string','string','string','string','string']
|
||||
width=[62,38,29,67,53,53,27]
|
||||
td=7
|
||||
|
||||
tableFlag=0
|
||||
|
||||
if not lst:
|
||||
lst.append(1)
|
||||
for ns in node.childNodes :
|
||||
if tableFlag==1:
|
||||
break
|
||||
if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td :
|
||||
tableFlag=1
|
||||
|
||||
width_str = ns._attrs['colWidths'].nodeValue
|
||||
ns.removeAttribute('colWidths')
|
||||
total_td = td * len(value)
|
||||
|
||||
if not width:
|
||||
for v in value:
|
||||
width.append(30)
|
||||
for v in range(len(value)):
|
||||
width_str +=',%d'%width[v]
|
||||
|
||||
ns.setAttribute('colWidths',width_str)
|
||||
|
||||
child_list = ns.childNodes
|
||||
|
||||
for child in child_list:
|
||||
if child.nodeName=='tr':
|
||||
lc = child.childNodes[1]
|
||||
# for t in range(td):
|
||||
i=0
|
||||
for v in value:
|
||||
t2="[[%s['type']=='text' and removeParentNode('tr')]]"%(name)
|
||||
t1= "[[ %s['%s'] ]]"%(name,v)
|
||||
t3="[[ %s['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]]"%name
|
||||
newnode = lc.cloneNode(1)
|
||||
|
||||
newnode.childNodes[1].lastChild.data = t1 + t2 +t3
|
||||
# newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]]
|
||||
child.appendChild(newnode)
|
||||
newnode=False
|
||||
i+=1
|
||||
|
||||
|
||||
return super(account_invoice_1,self).repeatIn(lst, name, nodes_parent=False)
|
||||
self._node = None
|
||||
|
||||
def invoice_lines(self,invoice):
|
||||
|
||||
result =[]
|
||||
sub_total={}
|
||||
info=[]
|
||||
@@ -107,7 +45,6 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
for id in range(0,len(ids)):
|
||||
info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy())
|
||||
list_in_seq[info]=info.sequence
|
||||
# invoice_list +=[info]
|
||||
i=1
|
||||
j=0
|
||||
final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
|
||||
@@ -116,11 +53,9 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
sum_flag[j]=-1
|
||||
for entry in invoice_list:
|
||||
res={}
|
||||
|
||||
if entry.state=='article':
|
||||
self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,))
|
||||
tax_ids=self.cr.fetchall()
|
||||
|
||||
if tax_ids==[]:
|
||||
res['tax_types']=''
|
||||
else:
|
||||
@@ -187,14 +122,14 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
res['price_subtotal']=''
|
||||
res['currency']=''
|
||||
elif entry.state=='line':
|
||||
res['quantity']='____________'
|
||||
res['quantity']='_______________'
|
||||
res['price_unit']='______________'
|
||||
res['discount']='____________'
|
||||
res['tax_types']='_________________'
|
||||
res['tax_types']='____________________'
|
||||
res['uos']='_____'
|
||||
res['name']='________________________________________'
|
||||
res['price_subtotal']='_______________________'
|
||||
res['currency']='_______'
|
||||
res['name']='_______________________________________________'
|
||||
res['price_subtotal']='____________'
|
||||
res['currency']='____'
|
||||
elif entry.state=='break':
|
||||
res['type']=entry.state
|
||||
res['name']=entry.name
|
||||
|
||||
@@ -130,8 +130,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Document</font>
|
||||
<font face="Times-Roman">:</font>
|
||||
<font face="Times-Roman">Document:</font>
|
||||
<font face="Times-Roman">[[o.name]]</font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
@@ -143,7 +142,7 @@
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="198.0,62.0,67.0,67.0,53.0,80.0" style="Tableau6">
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description</para>
|
||||
@@ -166,64 +165,80 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeat_In(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,198.0" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('tr')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents"><font>[[ a['type']=='title' and ( setTag('font','font',{'size':'11.5'})) ]][[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['type']=='text' and removeParentNode('font') or a['name'] ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="447.0,80.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21">[[ a['note']=='' and removeParentNode('table') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="198.0,62.0,67.0,67.0,53.0,80.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('tr')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,216.0,62,38,29,67,53,53" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para><font color="white"></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="215.0,313.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -281,16 +296,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Table Contents">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -23,12 +23,6 @@
|
||||
import time
|
||||
from report import report_sxw
|
||||
import pooler
|
||||
parents = {
|
||||
'tr':1,
|
||||
'li':1,
|
||||
'story': 0,
|
||||
'section': 0
|
||||
}
|
||||
|
||||
class account_invoice_with_message(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
@@ -37,67 +31,13 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
'time': time,
|
||||
'spcl_msg': self.spcl_msg,
|
||||
'invoice_lines': self.invoice_lines,
|
||||
'repeat_In':self.repeat_In,
|
||||
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def repeat_In(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]):
|
||||
self._node.data = ''
|
||||
node = self._find_parent(self._node, nodes_parent or parents)
|
||||
ns = node.nextSibling
|
||||
|
||||
value=['tax_types','quantity','uos','price_unit','discount','price_subtotal','currency']
|
||||
type=['string','string','string','string','string','string','string']
|
||||
width=[62,42,20,62,51,50,24]
|
||||
td=7
|
||||
|
||||
tableFlag=0
|
||||
|
||||
if not lst:
|
||||
lst.append(1)
|
||||
for ns in node.childNodes :
|
||||
if tableFlag==1:
|
||||
break
|
||||
if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td :
|
||||
tableFlag=1
|
||||
|
||||
width_str = ns._attrs['colWidths'].nodeValue
|
||||
ns.removeAttribute('colWidths')
|
||||
total_td = td * len(value)
|
||||
|
||||
if not width:
|
||||
for v in value:
|
||||
width.append(30)
|
||||
for v in range(len(value)):
|
||||
width_str +=',%d'%width[v]
|
||||
|
||||
ns.setAttribute('colWidths',width_str)
|
||||
|
||||
child_list = ns.childNodes
|
||||
|
||||
for child in child_list:
|
||||
if child.nodeName=='tr':
|
||||
lc = child.childNodes[1]
|
||||
# for t in range(td):
|
||||
i=0
|
||||
for v in value:
|
||||
t2="[[%s['type']=='text' and removeParentNode('tr')]]"%(name)
|
||||
t1= "[[ %s['%s'] ]]"%(name,v)
|
||||
t3="[[ %s['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]]"%name
|
||||
newnode = lc.cloneNode(1)
|
||||
|
||||
newnode.childNodes[1].lastChild.data = t1 + t2 +t3
|
||||
# newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]]
|
||||
child.appendChild(newnode)
|
||||
newnode=False
|
||||
i+=1
|
||||
|
||||
return super(account_invoice_with_message,self).repeatIn(lst, name, nodes_parent=False)
|
||||
|
||||
def spcl_msg(self, form):
|
||||
account_msg_data = pooler.get_pool(self.cr.dbname).get('notify.message').browse(self.cr, self.uid, form['message'])
|
||||
msg = account_msg_data.msg
|
||||
msg = account_msg_data.msg
|
||||
return msg
|
||||
|
||||
|
||||
@@ -113,7 +53,6 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
for id in range(0,len(ids)):
|
||||
info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy())
|
||||
list_in_seq[info]=info.sequence
|
||||
# invoice_list +=[info]
|
||||
i=1
|
||||
j=0
|
||||
final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
|
||||
@@ -198,9 +137,9 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
res['discount']='____________'
|
||||
res['tax_types']='_________________'
|
||||
res['uos']='_____'
|
||||
res['name']='________________________________________'
|
||||
res['price_subtotal']='_______________________'
|
||||
res['currency']='_______'
|
||||
res['name']='_____________________________________________'
|
||||
res['price_subtotal']='_____________________'
|
||||
res['currency']='_'
|
||||
elif entry.state=='break':
|
||||
res['type']=entry.state
|
||||
res['name']=entry.name
|
||||
|
||||
@@ -130,8 +130,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Document</font>
|
||||
<font face="Times-Roman">:</font>
|
||||
<font face="Times-Roman">Document:</font>
|
||||
<font face="Times-Roman">[[o.name]]</font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
@@ -166,64 +165,80 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeat_In(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,216.0" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('tr')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents"><font>[[ a['type']=='title' and ( setTag('font','font',{'size':'11.5'})) ]][[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['type']=='text' and removeParentNode('font') or a['name'] ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21">[[ a['note']=='' and removeParentNode('table') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('tr')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,216.0,62,38,29,67,53,53" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para><font color="white"></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="215.0,313.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -281,16 +296,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Table Contents">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
<section>
|
||||
<para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para>
|
||||
|
||||
Reference in New Issue
Block a user