Commit c2cf58c9 authored by Lingnan Wu's avatar Lingnan Wu Committed by Kazuhiko Shiozaki

add HTML based invoice generation.

parent 7eea96ef
...@@ -101,6 +101,18 @@ def getVatId(vat_id):\n ...@@ -101,6 +101,18 @@ def getVatId(vat_id):\n
s += \'%s: %s\' % (translateString(\'VAT ID\'), vat_id)\n s += \'%s: %s\' % (translateString(\'VAT ID\'), vat_id)\n
return s\n return s\n
\n \n
def getCorporateRegCode(reg_code):\n
s = \'\'\n
if reg_code:\n
s += \'%s: %s\' % (translateString(\'Corporate Registration Code\'), reg_code)\n
return s\n
\n
def getSocialCapital(reg_cap):\n
s = \'\'\n
if reg_cap:\n
s += \'%s: %s€\' % (translateString(\'Social Capital\'), reg_cap)\n
return s\n
\n
preferred_date_order = context.getPortalObject().portal_preferences\\\n preferred_date_order = context.getPortalObject().portal_preferences\\\n
.getPreferredDateOrder() or \'ymd\'\n .getPreferredDateOrder() or \'ymd\'\n
separator = \'/\'\n separator = \'/\'\n
...@@ -113,7 +125,7 @@ def getOrderedDate(date):\n ...@@ -113,7 +125,7 @@ def getOrderedDate(date):\n
\n \n
def getPaymentConditionText(order):\n def getPaymentConditionText(order):\n
if \'custom\' == order.getPaymentConditionTradeDate():\n if \'custom\' == order.getPaymentConditionTradeDate():\n
return order.getPaymentConditionPaymentDate()\n return getOrderedDate(order.getPaymentConditionPaymentDate())\n
end_of_month = order.getPaymentConditionPaymentEndOfMonth()\n end_of_month = order.getPaymentConditionPaymentEndOfMonth()\n
days = order.getPaymentConditionPaymentTerm()\n days = order.getPaymentConditionPaymentTerm()\n
if days:\n if days:\n
...@@ -131,21 +143,16 @@ def getTaxLineList(order):\n ...@@ -131,21 +143,16 @@ def getTaxLineList(order):\n
tax_line_list.sort(key=lambda line:line.getTitle())\n tax_line_list.sort(key=lambda line:line.getTitle())\n
return tax_line_list\n return tax_line_list\n
\n \n
\n
\n
line_base_contribution_list = []\n line_base_contribution_list = []\n
number = 0\n number = 0\n
line_novat_totalprice = 0\n tax_free_line_totalprice = 0\n
line_list = []\n line_list = []\n
line_not_vat = []\n line_not_tax = []\n
line_vat = []\n line_tax = []\n
line_not_vat_has_no_vat = {}\n line_tax_no_rate = {}\n
total_price = 0.0\n total_price = 0.0\n
total_vat = 0.0\n total_tax_price = 0.0\n
total_vat_price = 0.0\n number_line_not_tax = 0\n
vat_total_list = []\n
taxnumber = 0\n
taxname = \'\'\n
\n \n
def unicodeDict(d):\n def unicodeDict(d):\n
for k, v in d.items():\n for k, v in d.items():\n
...@@ -188,22 +195,32 @@ for line in getSubLineList(context):\n ...@@ -188,22 +195,32 @@ for line in getSubLineList(context):\n
if request.get(\'international_form\'):\n if request.get(\'international_form\'):\n
display_id = \'title\'\n display_id = \'title\'\n
desc = (\', \'.join([x[0] for x in line.getVariationCategoryItemList(display_id=display_id)]),)\n desc = (\', \'.join([x[0] for x in line.getVariationCategoryItemList(display_id=display_id)]),)\n
is_vat=0\n is_tax=0\n
portal_preferences = context.getPortalObject().portal_preferences\n portal_preferences = context.getPortalObject().portal_preferences\n
if portal_preferences.getPreferredTaxUseList()==[] :\n if portal_preferences.getPreferredTaxUseList()==[] :\n
vat="use/trade/tax"\n use_of_tax="use/trade/tax"\n
is_vat=line.isMemberOf(vat) \n is_tax=line.isMemberOf(use_of_tax) \n
else:\n else:\n
vatlist=portal_preferences.getPreferredTaxUseList() \n tax_list=portal_preferences.getPreferredTaxUseList() \n
for vat in vatlist:\n for use_of_tax in tax_list:\n
is_vat = is_vat or line.isMemberOf(vat)\n is_tax = is_tax or line.isMemberOf(use_of_tax)\n
if not is_vat:\n \n
if line.getBaseContribution() not in line_base_contribution_list:\n #set the not_tax_line with the tax_number and the tax_line with the tax_name\n
line_base_contribution_list.append(line.getBaseContribution())\n tax_number=\'\'\n
taxnumber=line_base_contribution_list.index(line.getBaseContribution())+1\n tax_name=\'\'\n
if not is_tax:\n
if line.getBaseContributionList()==[]:\n
tax_number=\'0\'\n
else:\n else:\n
taxname=line.getBaseContribution()\n for contribution in line.getBaseContributionList():\n
\n if contribution not in line_base_contribution_list:\n
line_base_contribution_list.append(contribution)\n
if tax_number==\'\':\n
tax_number=str(line_base_contribution_list.index(contribution)+1)\n
else:\n
tax_number=tax_number+\',\'+str(line_base_contribution_list.index(contribution)+1)\n
else:\n
tax_name=line.getBaseApplication()\n
line_dict = {\n line_dict = {\n
\'style_name\': \'Table_20_Contents\',\n \'style_name\': \'Table_20_Contents\',\n
\'left_style_name\': \'Table_20_Contents_20_Left\',\n \'left_style_name\': \'Table_20_Contents_20_Left\',\n
...@@ -215,10 +232,10 @@ for line in getSubLineList(context):\n ...@@ -215,10 +232,10 @@ for line in getSubLineList(context):\n
\'description\': desc,\n \'description\': desc,\n
\'base_contribution\':line.getBaseContribution() or None,\n \'base_contribution\':line.getBaseContribution() or None,\n
\'use_type\':line.getResourceValue().getUse() or \'\',\n \'use_type\':line.getResourceValue().getUse() or \'\',\n
\'use_type_tax\':is_vat,\n \'use_type_tax\':is_tax,\n
\'total_quantity\': line.getTotalQuantity() or \'\',\n \'total_quantity\': line.getTotalQuantity() or \'\',\n
\'tax_name\':taxname or \'\',\n \'tax_name\':tax_name or \'\',\n
\'tax_number\':taxnumber or \'\',\n \'tax_number\':tax_number or \'\',\n
\'quantity_unit\': line.getQuantityUnitTranslatedTitle() or (\n \'quantity_unit\': line.getQuantityUnitTranslatedTitle() or (\n
line.getResource() and line.getResourceValue().getQuantityUnitTranslatedTitle()) or \'\',\n line.getResource() and line.getResourceValue().getQuantityUnitTranslatedTitle()) or \'\',\n
\'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n \'stop_date\': getOrderedDate(line.getStopDate()) or \'\',\n
...@@ -228,29 +245,32 @@ for line in getSubLineList(context):\n ...@@ -228,29 +245,32 @@ 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_vat_price+=line.getTotalPrice() or 0.0\n total_tax_price+=line.getTotalPrice() or 0.0\n
line_vat.append(unicodeDict(line_dict.copy()))\n line_tax.append(unicodeDict(line_dict.copy()))\n
else:\n else:\n
number_line_not_tax = number_line_not_tax+1\n
line_dict[\'number_not_tax_line\'] = number_line_not_tax\n
total_price += line.getTotalPrice() or 0.0\n total_price += line.getTotalPrice() or 0.0\n
line_not_vat.append(unicodeDict(line_dict.copy()))\n line_not_tax.append(unicodeDict(line_dict.copy()))\n
#if one line of product hasn\'t tax, the tax table need to add a taxrate=0 line\n
if line_dict[\'base_contribution\'] is None:\n if line_dict[\'base_contribution\'] is None:\n
line_novat_totalprice = line_novat_totalprice + line_dict[\'total_price\']\n tax_free_line_totalprice = tax_free_line_totalprice + line_dict[\'total_price\']\n
line_not_vat_has_no_vat = {\n line_tax_no_rate = {\n
\'tax_name\': None ,\n \'tax_name\': None ,\n
\'total_quantity\': line_novat_totalprice,\n \'total_quantity\': tax_free_line_totalprice,\n
\'base_price\': 0.00 ,\n \'base_price\': 0.00 ,\n
\'total_price\': 0.00 ,\n \'total_price\': 0.00 ,\n
}\n }\n
line_list.append(unicodeDict(line_dict.copy()))\n line_list.append(unicodeDict(line_dict.copy()))\n
if line_not_vat_has_no_vat != {} :\n if line_tax_no_rate != {} :\n
line_vat.append(unicodeDict(line_not_vat_has_no_vat.copy()))\n line_tax.append(unicodeDict(line_tax_no_rate.copy()))\n
for line_each in line_vat:\n for line_each in line_tax:\n
if line_each[\'tax_name\'] in line_base_contribution_list :\n if line_each[\'tax_name\'] in line_base_contribution_list :\n
vatNumber=line_base_contribution_list.index(line_each[\'tax_name\'])+1\n number_tax_line=line_base_contribution_list.index(line_each[\'tax_name\'])+1\n
else:\n else:\n
vatNumber=0\n number_tax_line=0\n
line_each.update({\'vat_number\': vatNumber})\n line_each.update({\'number_tax_line\': number_tax_line})\n
line_vat.sort(key=lambda obj:obj.get(\'vat_number\'))\n line_tax.sort(key=lambda obj:obj.get(\'number_tax_line\'))\n
\n \n
inch_cm_ratio = 2.54 / 100.0\n inch_cm_ratio = 2.54 / 100.0\n
\n \n
...@@ -263,6 +283,12 @@ class EmptyOrganisation:\n ...@@ -263,6 +283,12 @@ class EmptyOrganisation:\n
return \'\'\n return \'\'\n
def getDefaultAddressRegionTitle(self):\n def getDefaultAddressRegionTitle(self):\n
return \'\'\n return \'\'\n
def getTelephoneText(self):\n
return \'\'\n
def getFaxText(self):\n
return \'\'\n
def getEmailText(self):\n
return \'\'\n
def getDefaultImagePath(self):\n def getDefaultImagePath(self):\n
return \'\'\n return \'\'\n
def getDefaultImageHeight(self):\n def getDefaultImageHeight(self):\n
...@@ -306,32 +332,40 @@ if destination_administration is None:\n ...@@ -306,32 +332,40 @@ if destination_administration is None:\n
data_dict = {\n data_dict = {\n
\'source_section_title\': source_section.getProperty(\'corporate_name\') or\\\n \'source_section_title\': source_section.getProperty(\'corporate_name\') or\\\n
source_section.getTitle(),\n source_section.getTitle(),\n
\'source_section_image_path\': context.getSourceSectionValue() is not None\\\n \'source_section_image_path\': source_section is not None\\\n
and context.getSourceSectionValue().getDefaultImagePath() or \'\',\n and source_section.getDefaultImagePath() or \'\',\n
\'source_section_image_width\': context.getSourceSectionValue() is not None\\\n \'source_section_image_width\': source_section is not None\\\n
and context.getSourceSectionValue().getDefaultImageWidth() is not None\\\n and source_section.getDefaultImageWidth() is not None\\\n
and context.getSourceSectionValue().getDefaultImageWidth() \\\n and source_section.getDefaultImageWidth() \\\n
* inch_cm_ratio or \'\',\n * inch_cm_ratio or \'\',\n
\'source_section_image_height\': context.getSourceSectionValue() is not None\\\n \'source_section_image_height\': source_section is not None\\\n
and context.getSourceSectionValue().getDefaultImageHeight() is not None\\\n and source_section.getDefaultImageHeight() is not None\\\n
and context.getSourceSectionValue().getDefaultImageHeight() \\\n and source_section.getDefaultImageHeight() \\\n
* inch_cm_ratio or \'\',\n * inch_cm_ratio or \'\',\n
\'source_section_address\': getOneLineAddress(\n \'source_section_address\': getOneLineAddress(\n
context.getSourceSection() and\n context.getSourceSection() and\n
context.getSourceSectionValue().getDefaultAddressText() or \'\',\n source_section.getDefaultAddressText() or \'\',\n
context.getSourceSection() and \n context.getSourceSection() and \n
context.getSourceSectionValue().getDefaultAddressRegionTitle() or \'\'),\n source_section.getDefaultAddressRegionTitle() or \'\'),\n
\'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and \\\n \'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and \\\n
context.getSourceSectionValue().getTelephoneText() or \'\',\n source_section.getTelephoneText() or \'\',\n
context.getSourceSection() and \\\n context.getSourceSection() and \\\n
context.getSourceSectionValue().getFaxText() or \'\'),\n source_section.getFaxText() or \'\'),\n
\'source_section_email\': getEmail(context.getSourceSection() and\n \'source_section_email\': getEmail(context.getSourceSection() and\n
context.getSourceSectionValue().getEmailText() or \'\'),\n source_section.getEmailText() or \'\'),\n
\'source_section_vatid\': getVatId(context.getSourceSection() and\\\n \'source_section_vatid\': getVatId(context.getSourceSection() and\\\n
getattr(context.getSourceSectionValue(), \'getVatCode\', None)\\\n getattr(source_section, \'getVatCode\', None)\\\n
is not None and\\\n is not None and\\\n
context.getSourceSectionValue().getVatCode() or \'\'),\n source_section.getVatCode() or \'\'),\n
\n \'source_section_corporateregcode\': getCorporateRegCode(context.getSourceSection() and\\\n
getattr(source_section, \'getCorporateRegistrationCode\', None)\\\n
is not None and\\\n
source_section.getCorporateRegistrationCode() or \'\'),\n
\'source_section_registeredcapital\': getSocialCapital(context.getSourceSection() and\\\n
getattr(source_section, \'getSocialCapital\', None)\\\n
is not None and\\\n
source_section.getSocialCapital() or \'\'),\n
\n
\'source_administration_title\': \\\n \'source_administration_title\': \\\n
source_administration.getProperty(\'corporate_name\') \\\n source_administration.getProperty(\'corporate_name\') \\\n
or source_administration.getTitle(),\n or source_administration.getTitle(),\n
...@@ -349,17 +383,17 @@ data_dict = {\n ...@@ -349,17 +383,17 @@ data_dict = {\n
\'source_title\': source.getProperty(\'corporate_name\') or source.getTitle(),\n \'source_title\': source.getProperty(\'corporate_name\') or source.getTitle(),\n
\'source_address\': getOneLineAddress(\n \'source_address\': getOneLineAddress(\n
context.getSource() and\n context.getSource() and\n
context.getSourceValue().getDefaultAddressText() or \'\',\n source.getDefaultAddressText() or \'\',\n
context.getSource() and \n context.getSource() and \n
context.getSourceValue().getDefaultAddressRegionTitle() or \'\'),\n source.getDefaultAddressRegionTitle() or \'\'),\n
\'source_telfax\': getPhoneAndFax(context.getSource() and \\\n \'source_telfax\': getPhoneAndFax(context.getSource() and \\\n
context.getSourceValue().getTelephoneText() or \'\',\n source.getTelephoneText() or \'\',\n
context.getSource() and \\\n context.getSource() and \\\n
context.getSourceValue().getFaxText() or \'\'),\n source.getFaxText() or \'\'),\n
\'source_email\': getEmail(context.getSource() and\n \'source_email\': getEmail(context.getSource() and\n
context.getSourceValue().getEmailText() or \'\'),\n source.getEmailText() or \'\'),\n
\'source_vatid\': getVatId(context.getSource() and\n \'source_vatid\': getVatId(context.getSource() and\n
context.getSourceValue().getProperty(\'vat_code\', \'\') or \'\'),\n source.getProperty(\'vat_code\', \'\') or \'\'),\n
\n \n
\'source_decision_title\': context.getSourceDecisionTitle() or \'\',\n \'source_decision_title\': context.getSourceDecisionTitle() or \'\',\n
\'source_decision_image_path\': context.getSourceDecisionValue(portal_type=\'Organisation\') is not None\\\n \'source_decision_image_path\': context.getSourceDecisionValue(portal_type=\'Organisation\') is not None\\\n
...@@ -419,7 +453,7 @@ data_dict = {\n ...@@ -419,7 +453,7 @@ data_dict = {\n
context.getDestinationSection() and context.getDestinationSectionValue().getFaxText() or \'\'),\n context.getDestinationSection() and context.getDestinationSectionValue().getFaxText() or \'\'),\n
\'destination_section_email\': getEmail(context.getDestinationSection() and context.getDestinationSectionValue().getEmailText() or \'\'),\n \'destination_section_email\': getEmail(context.getDestinationSection() and context.getDestinationSectionValue().getEmailText() or \'\'),\n
\'destination_section_vatid\': getVatId(context.getDestinationSection() and\n \'destination_section_vatid\': getVatId(context.getDestinationSection() and\n
context.getDestinationSectionValue().getProperty(\'vat_code\') or \'\'),\n context.getDestinationSectionValue().getVatCode() or \'\'),\n
\n \n
\'destination_administration_title\':\\\n \'destination_administration_title\':\\\n
destination_administration.getProperty(\'corporate_name\') or \\\n destination_administration.getProperty(\'corporate_name\') or \\\n
...@@ -450,16 +484,13 @@ data_dict = {\n ...@@ -450,16 +484,13 @@ data_dict = {\n
\'payment_condition\': getPaymentConditionText(context),\n \'payment_condition\': getPaymentConditionText(context),\n
\'delivery_mode\': context.getDeliveryModeTranslatedTitle() or \'\',\n \'delivery_mode\': context.getDeliveryModeTranslatedTitle() or \'\',\n
\'incoterm\': context.getIncoterm() and context.getIncotermValue().getCodification() or \'\',\n \'incoterm\': context.getIncoterm() and context.getIncotermValue().getCodification() or \'\',\n
\n \'total_price\':total_price+total_tax_price,\n
\'vat_name_list\':line_base_contribution_list,\n \'total_price_exclude_tax\': total_price,\n
\'total_price\':total_price+total_vat_price,\n \'total_tax_price\':total_tax_price,\n
\'total_price_novat\': total_price,\n
\'vat_list\': total_vat,\n
\'vat_total_price\':total_vat_price,\n
\'description\': getFieldAsLineList(context.getDescription()),\n \'description\': getFieldAsLineList(context.getDescription()),\n
\'specialise_title\': context.getProperty(\'specialise_title\',\'\'),\n \'specialise_title\': context.getProperty(\'specialise_title\',\'\'),\n
\'line_vat\':line_vat,\n \'line_tax\':line_tax,\n
\'line_not_vat\':line_not_vat,\n \'line_not_tax\':line_not_tax,\n
\'line_list\': line_list,\n \'line_list\': line_list,\n
}\n }\n
\n \n
......
...@@ -747,7 +747,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -747,7 +747,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<text:p text:style-name=\'Item_20_Table_20_Title_20_Left\'><span tal:replace=\'orig_message\'/></text:p>\n <text:p text:style-name=\'Item_20_Table_20_Title_20_Left\'><span tal:replace=\'orig_message\'/></text:p>\n
<text:p text:style-name=\'Item_20_Table_20_Title_20_Left\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n <text:p text:style-name=\'Item_20_Table_20_Title_20_Left\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table1.A2\' office:value-type=\'string\' tal:define=\'orig_string string:Vat Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n <table:table-cell table:style-name=\'Table1.A2\' office:value-type=\'string\' tal:define=\'orig_string string:Tax Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'Item_20_Table_20_Title_20_Left\'><span tal:replace=\'orig_message\'/></text:p>\n <text:p text:style-name=\'Item_20_Table_20_Title_20_Left\'><span tal:replace=\'orig_message\'/></text:p>\n
<text:p text:style-name=\'Item_20_Table_20_Title_20_Left\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n <text:p text:style-name=\'Item_20_Table_20_Title_20_Left\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n
</table:table-cell>\n </table:table-cell>\n
...@@ -761,14 +761,13 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -761,14 +761,13 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
</table:table-cell>\n </table:table-cell>\n
</table:table-row>\n </table:table-row>\n
</table:table-header-rows>\n </table:table-header-rows>\n
<tal:block tal:define="global list_number python: 0">\n <tal:block>\n
<table:table-row table:style-name=\'Table1.3\' tal:repeat=\'line_dict python:data_dict["line_not_vat"]\'>\n <table:table-row table:style-name=\'Table1.3\' tal:repeat=\'line_dict python:data_dict["line_not_tax"]\'>\n
<tal:block tal:omit-tag=\'\' tal:define=\'style_name python:line_dict["style_name"];\n <tal:block tal:omit-tag=\'\' tal:define=\'style_name python:line_dict["style_name"];\n
left_style_name python:line_dict["left_style_name"];\n left_style_name python:line_dict["left_style_name"];\n
right_style_name python:line_dict["right_style_name"];\n right_style_name python:line_dict["right_style_name"];\'>\n
global list_number python: list_number + 1\'>\n
<table:table-cell table:style-name=\'Table1.A3\' office:value-type=\'string\'>\n <table:table-cell table:style-name=\'Table1.A3\' office:value-type=\'string\'>\n
<text:p text:style-name=\'Table_20_Contents_20_Left\' tal:content= \'list_number\' tal:attributes=\'text:style-name left_style_name\'>100</text:p>\n <text:p text:style-name=\'Table_20_Contents_20_Left\' tal:content= \'python:line_dict["number_not_tax_line"]\' tal:attributes=\'text:style-name left_style_name\'>100</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table1.A3\' office:value-type=\'string\'>\n <table:table-cell table:style-name=\'Table1.A3\' office:value-type=\'string\'>\n
<text:p text:style-name=\'Table_20_Contents\'\n <text:p text:style-name=\'Table_20_Contents\'\n
...@@ -878,14 +877,14 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -878,14 +877,14 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<table:table-cell table:style-name="Table3.A1" office:value-type="string">\n <table:table-cell table:style-name="Table3.A1" office:value-type="string">\n
<text:p text:style-name="Table_20_Contents"/>\n <text:p text:style-name="Table_20_Contents"/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name="Table3.D2" table:number-columns-spanned="3" office:value-type=\'string\' tal:define=\'orig_string string:Total Excluding VAT; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n <table:table-cell table:style-name="Table3.D2" table:number-columns-spanned="3" office:value-type=\'string\' tal:define=\'orig_string string:Total Excluding Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'Table_20_Heading\'><span tal:replace=\'orig_message\'/>:</text:p>\n <text:p text:style-name=\'Table_20_Heading\'><span tal:replace=\'orig_message\'/>:</text:p>\n
<text:p text:style-name=\'Table_20_Heading\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</text:p> \n <text:p text:style-name=\'Table_20_Heading\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</text:p> \n
</table:table-cell>\n </table:table-cell>\n
<table:covered-table-cell/>\n <table:covered-table-cell/>\n
<table:covered-table-cell/>\n <table:covered-table-cell/>\n
<table:table-cell table:style-name="Table3.G2" office:value-type="string">\n <table:table-cell table:style-name="Table3.G2" office:value-type="string">\n
<text:p text:style-name=\'Table_20_Contents_20_Right\' tal:content=\'python: price_renderer(data_dict["total_price_novat"])\'>800.000,00</text:p>\n <text:p text:style-name=\'Table_20_Contents_20_Right\' tal:content=\'python: price_renderer(data_dict["total_price_exclude_tax"])\'>800.000,00</text:p>\n
</table:table-cell>\n </table:table-cell>\n
</table:table-row>\n </table:table-row>\n
<table:table-row table:style-name="Table3.3">\n <table:table-row table:style-name="Table3.3">\n
...@@ -917,7 +916,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -917,7 +916,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<table:table-cell table:style-name="Table3.A1" office:value-type="string">\n <table:table-cell table:style-name="Table3.A1" office:value-type="string">\n
<text:p text:style-name="Table_20_Contents"/>\n <text:p text:style-name="Table_20_Contents"/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.D4\' office:value-type=\'string\' tal:define=\'orig_string string:Vat Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n <table:table-cell table:style-name=\'Table3.D4\' office:value-type=\'string\' tal:define=\'orig_string string:Tax Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'P9\'><span tal:replace=\'orig_message\'/></text:p>\n <text:p text:style-name=\'P9\'><span tal:replace=\'orig_message\'/></text:p>\n
<text:p text:style-name=\'P9\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n <text:p text:style-name=\'P9\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n
</table:table-cell>\n </table:table-cell>\n
...@@ -929,12 +928,12 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -929,12 +928,12 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<text:p text:style-name=\'P8\'><span tal:replace=\'orig_message\'/></text:p>\n <text:p text:style-name=\'P8\'><span tal:replace=\'orig_message\'/></text:p>\n
<text:p text:style-name=\'P8\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n <text:p text:style-name=\'P8\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.D4\' office:value-type=\'string\' tal:define=\'orig_string string:Vat Price; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n <table:table-cell table:style-name=\'Table3.D4\' office:value-type=\'string\' tal:define=\'orig_string string:Tax Price; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'P8\'><span tal:replace=\'orig_message\'/></text:p>\n <text:p text:style-name=\'P8\'><span tal:replace=\'orig_message\'/></text:p>\n
<text:p text:style-name=\'P8\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n <text:p text:style-name=\'P8\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</table:table-row>\n </table:table-row>\n
<tal:block tal:repeat=\'line_vat_dict python:data_dict["line_vat"]\'>\n <tal:block tal:repeat=\'line_tax_dict python:data_dict["line_tax"]\'>\n
<table:table-row table:style-name=\'Table3.5\'>\n <table:table-row table:style-name=\'Table3.5\'>\n
<table:table-cell table:style-name=\'Table3.A2\' office:value-type=\'string\'>\n <table:table-cell table:style-name=\'Table3.A2\' office:value-type=\'string\'>\n
<text:p text:style-name=\'Table_20_Contents\'/>\n <text:p text:style-name=\'Table_20_Contents\'/>\n
...@@ -947,47 +946,47 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -947,47 +946,47 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
</table:table-cell>\n </table:table-cell>\n
<tal:block tal:define="global ">\n <tal:block tal:define="global ">\n
<table:table-cell table:style-name=\'Table3.D5\'\n <table:table-cell table:style-name=\'Table3.D5\'\n
tal:condition="python: line_vat_dict[\'vat_number\'] != \'\'"\n tal:condition="python: line_tax_dict[\'number_tax_line\'] != \'\'"\n
office:value-type=\'float\'\n office:value-type=\'float\'\n
tal:attributes=\'office:value line_vat_dict/vat_number\'>\n tal:attributes=\'office:value line_tax_dict/number_tax_line\'>\n
<text:p text:style-name="P6" tal:content="python: line_vat_dict[\'vat_number\']">:</text:p>\n <text:p text:style-name="P6" tal:content="python: line_tax_dict[\'number_tax_line\']">:</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.D5\'\n <table:table-cell table:style-name=\'Table3.D5\'\n
office:value-type=\'string\'\n office:value-type=\'string\'\n
tal:condition="python: line_vat_dict[\'vat_number\'] == \'\'"> \n tal:condition="python: line_tax_dict[\'number_tax_line\'] == \'\'"> \n
<text:p text:style-name=\'P6\'/>\n <text:p text:style-name=\'P6\'/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.E5\'\n <table:table-cell table:style-name=\'Table3.E5\'\n
tal:condition="python: line_vat_dict[\'total_quantity\'] != \'\'"\n tal:condition="python: line_tax_dict[\'total_quantity\'] != \'\'"\n
office:value-type=\'float\'\n office:value-type=\'float\'\n
tal:attributes=\'office:value line_vat_dict/total_quantity\'> \n tal:attributes=\'office:value line_tax_dict/total_quantity\'> \n
<text:p text:style-name=\'Table_20_Heading\' tal:content="python: price_renderer(line_vat_dict[\'total_quantity\'])">qty</text:p>\n <text:p text:style-name=\'Table_20_Heading\' tal:content="python: price_renderer(line_tax_dict[\'total_quantity\'])">qty</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.E5\'\n <table:table-cell table:style-name=\'Table3.E5\'\n
office:value-type=\'string\'\n office:value-type=\'string\'\n
tal:condition="python: line_vat_dict[\'total_quantity\'] == \'\'"> \n tal:condition="python: line_tax_dict[\'total_quantity\'] == \'\'"> \n
<text:p text:style-name=\'Table_20_Heading\'/>\n <text:p text:style-name=\'Table_20_Heading\'/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name=\'Table3.F5\'\n <table:table-cell table:style-name=\'Table3.F5\'\n
tal:condition="python: line_vat_dict[\'base_price\'] != \'\'"\n tal:condition="python: line_tax_dict[\'base_price\'] != \'\'"\n
office:value-type=\'float\'\n office:value-type=\'float\'\n
tal:attributes=\'office:value line_vat_dict/base_price\'>\n tal:attributes=\'office:value line_tax_dict/base_price\'>\n
<text:p text:style-name=\'Table_20_Heading\' tal:content="python: quantity_renderer(line_vat_dict[\'base_price\']*100*1.00)+\'%\'">:</text:p>\n <text:p text:style-name=\'Table_20_Heading\' tal:content="python: quantity_renderer(line_tax_dict[\'base_price\']*100*1.00)+\'%\'">:</text:p>\n
</table:table-cell> \n </table:table-cell> \n
<table:table-cell table:style-name=\'Table3.F5\'\n <table:table-cell table:style-name=\'Table3.F5\'\n
office:value-type=\'string\'\n office:value-type=\'string\'\n
tal:condition="python: line_vat_dict[\'base_price\'] == \'\'"> \n tal:condition="python: line_tax_dict[\'base_price\'] == \'\'"> \n
<text:p text:style-name=\'Table_20_Heading\'/>\n <text:p text:style-name=\'Table_20_Heading\'/>\n
</table:table-cell> \n </table:table-cell> \n
<table:table-cell table:style-name=\'Table3.G5\'\n <table:table-cell table:style-name=\'Table3.G5\'\n
tal:condition="python: line_vat_dict[\'total_price\'] != \'\'"\n tal:condition="python: line_tax_dict[\'total_price\'] != \'\'"\n
office:value-type=\'float\'\n office:value-type=\'float\'\n
tal:attributes=\'office:value line_vat_dict/total_price\'>\n tal:attributes=\'office:value line_tax_dict/total_price\'>\n
<text:p text:style-name=\'Table_20_Heading\' tal:content="python: price_renderer(line_vat_dict[\'total_price\'])">:</text:p>\n <text:p text:style-name=\'Table_20_Heading\' tal:content="python: price_renderer(line_tax_dict[\'total_price\'])">:</text:p>\n
</table:table-cell> \n </table:table-cell> \n
<table:table-cell table:style-name=\'Table3.G5\'\n <table:table-cell table:style-name=\'Table3.G5\'\n
office:value-type=\'string\'\n office:value-type=\'string\'\n
tal:condition="python: line_vat_dict[\'total_price\'] == \'\'"> \n tal:condition="python: line_tax_dict[\'total_price\'] == \'\'"> \n
<text:p text:style-name=\'Table_20_Heading\'/>\n <text:p text:style-name=\'Table_20_Heading\'/>\n
</table:table-cell> \n </table:table-cell> \n
</tal:block>\n </tal:block>\n
...@@ -1015,6 +1014,23 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -1015,6 +1014,23 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<table:table-cell table:style-name="Table3.G8">\n <table:table-cell table:style-name="Table3.G8">\n
<text:p text:style-name="Table_20_Contents_20_Right"/>\n <text:p text:style-name="Table_20_Contents_20_Right"/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name="Table3.D2" table:number-columns-spanned="3" office:value-type=\'string\' tal:define=\'orig_string string:Total Including VAT; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'Table_20_Heading\'><span tal:replace=\'orig_message\'/> :</text:p>\n
<text:p text:style-name=\'Table_20_Heading\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</text:p> \n
</table:table-cell>\n
<table:covered-table-cell/>\n
<table:covered-table-cell/>\n
<table:table-cell table:style-name=\'Table3.G2\'\n
tal:condition="python: data_dict[\'total_price\'] != \'\'"\n
office:value-type=\'float\'\n
tal:attributes=\'office:value data_dict/total_price\'>\n
<text:p text:style-name=\'Table_20_Contents_20_Right\' tal:content="python: price_renderer(data_dict[\'total_price\'])">:</text:p>\n
</table:table-cell> \n
<table:table-cell table:style-name=\'Table3.G2\'\n
office:value-type=\'string\'\n
tal:condition="python: data_dict[\'total_price\'] == \'\'"> \n
<text:p text:style-name=\'Table_20_Contents_20_Right\'/>\n
</table:table-cell> \n
</table:table-row>\n </table:table-row>\n
<table:table-row table:style-name="Table3.2">\n <table:table-row table:style-name="Table3.2">\n
<table:table-cell table:style-name="Table3.A2" office:value-type="string">\n <table:table-cell table:style-name="Table3.A2" office:value-type="string">\n
...@@ -1026,7 +1042,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu ...@@ -1026,7 +1042,7 @@ MQAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAACAAIAngAAAOkyAAAAAA==</string> </valu
<table:table-cell table:style-name="Table3.A1" office:value-type="string">\n <table:table-cell table:style-name="Table3.A1" office:value-type="string">\n
<text:p text:style-name="Table_20_Contents"/>\n <text:p text:style-name="Table_20_Contents"/>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:style-name="Table3.D2" table:number-columns-spanned="3" office:value-type=\'string\' tal:define=\'orig_string string:Total Including VAT; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n <table:table-cell table:style-name="Table3.D2" table:number-columns-spanned="3" office:value-type=\'string\' tal:define=\'orig_string string:Total Including Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<text:p text:style-name=\'Table_20_Heading\'><span tal:replace=\'orig_message\'/> :</text:p>\n <text:p text:style-name=\'Table_20_Heading\'><span tal:replace=\'orig_message\'/> :</text:p>\n
<text:p text:style-name=\'Table_20_Heading\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</text:p> \n <text:p text:style-name=\'Table_20_Heading\' tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</text:p> \n
</table:table-cell>\n </table:table-cell>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts58866282.8</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>SaleInvoiceTransaction_getPrintout.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
/* From http://www.jonathantneal.com/examples/invoice/style.css */\n
/* reset */\n
\n
*\n
{\n
border: 0;\n
box-sizing: content-box;\n
color: inherit;\n
font-family: inherit;\n
font-size: inherit;\n
font-style: inherit;\n
font-weight: inherit;\n
line-height: inherit;\n
list-style: none;\n
margin: 0;\n
padding: 0;\n
text-decoration: none;\n
vertical-align: top;\n
}\n
\n
/* heading */\n
\n
h1 { font: bold 100% sans-serif; letter-spacing: 0.5em; text-align: center; text-transform: uppercase; }\n
\n
/* table */\n
table { page-break-inside: avoid}\n
tr { page-break-inside:avoid ,page-break-after:avoid,page-break-before:avoid}\n
table { font-size: 75%; table-layout: fixed; width: 100%; }\n
table { border-collapse: separate; border-spacing: 2px; }\n
th, td { border-width: 1px; padding: 0.5em; position: relative; text-align: left; }\n
th, td { border-radius: 0.25em; border-style: solid; }\n
th { background: #EEE; border-color: #BBB; }\n
td { border-color: #DDD; }\n
\n
/* page */\n
\n
html { font: 16px/1 \'Open Sans\', sans-serif; overflow: auto; padding: 0.5in; }\n
html { background: #999; cursor: default; }\n
\n
body { box-sizing: border-box; min-height: 11in; margin: 0 auto; overflow: hidden; padding: 0.5in; width: 8.5in; }\n
body { background: #FFF; border-radius: 1px; box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5); }\n
\n
/* header */\n
\n
header { margin: 0 0 3em; }\n
header:after { clear: both; content: ""; display: table; }\n
\n
header h1 {background: #EEE; border-style: solid; border-color: #DDD; border-radius: 0.25em; margin: 0 0 1em; padding: 0.5em 0; }\n
header address { float: left; font-size: 75%; font-style: normal; line-height: 1.25; margin: 0 1em 1em 0; }\n
header address p { margin: 0 0 0.25em; }\n
header span, header img { display: block; float: right; }\n
header span { margin: 0 0 1em 1em; max-height: 25%; max-width: 60%; position: relative; }\n
header img { max-height: 100%; max-width: 100%; }\n
header input { cursor: pointer; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; height: 100%; left: 0; opacity: 0; position: absolute; top: 0; width: 100%; }\n
\n
/* article */\n
\n
article, article address, table.meta { margin: 0 0 2em; }\n
article:after { clear: both; content: ""; display: table; }\n
/* article h1 { clip: rect(0 0 0 0); position: absolute; } */\n
article h2:after { \n
content: ":";\n
font-size: 1em;\n
}\n
\n
article address { float: left; font-size: 125%; font-weight: bold; }\n
\n
\n
/* table detail */\n
table.detail { clear: both; width: 100%; margin: 0 0 2em;}\n
table.detail td:nth-child(1) { text-align: right; width: 10%; background: #EEE; border-color: #BBB; }\n
table.detail td:nth-child(2) { text-align: left; width: 28%; }\n
table.detail td:nth-child(3) { text-align: right; width: 10%; background: #EEE; border-color: #BBB; }\n
table.detail td:nth-child(4) { text-align: left; width: 28%; }\n
table.detail td:nth-child(5) { height:100%; text-align: left; width: 24%; padding: 0px;}\n
\n
/* inner table in detail*/\n
table.inner-table {\n
height:100%;\n
border-collapse: collapse;\n
border-style: hidden;\n
}\n
table.inner-table td:nth-child(1) { width: 10%; background: #EEE; border-color: #BBB; }\n
table.inner-table td:nth-child(2) { width: 10%; }\n
\n
/* table items */\n
\n
table.inventory { clear: both; width: 100%; margin: 0 0 2em; }\n
table.inventory th { font-weight: bold; text-align: center; }\n
\n
table.inventory th:nth-child(1) { width: 5%; }\n
table.inventory th:nth-child(2) { width: 15%; }\n
table.inventory th:nth-child(3) { width: 15%; }\n
table.inventory th:nth-child(4) { width: 18%; }\n
table.inventory th:nth-child(5) { width: 10%; }\n
table.inventory th:nth-child(6) { width: 7%; }\n
table.inventory th:nth-child(7) { width: 7%; }\n
table.inventory th:nth-child(8) { width: 10%; }\n
table.inventory th:nth-child(9) { width: 13%; }\n
\n
table.inventory td:nth-child(1) { text-align: right; }\n
table.inventory td:nth-child(2) { text-align: left; }\n
table.inventory td:nth-child(3) { text-align: left; }\n
table.inventory td:nth-child(4) { text-align: left; }\n
table.inventory td:nth-child(5) { text-align: right; }\n
table.inventory td:nth-child(6) { text-align: right; }\n
table.inventory td:nth-child(7) { text-align: right; }\n
table.inventory td:nth-child(8) { text-align: right; }\n
table.inventory td:nth-child(9) { text-align: right; }\n
\n
\n
/* table balance */\n
\n
table.balance { float: right; width: 46%; margin: 0 0 2em; }\n
table.balance th, table.balance td { width: 50%; text-align: right;}\n
table.balance{ clear: both; }\n
table.balance th{ width: 37.5%; }\n
table.balance td{ width: 12.5%; }\n
\n
/* table tax */\n
\n
table.tax { float: right; clear: both; width: 50%; }\n
table.tax th { font-weight: bold; text-align: center; }\n
table.tax td { text-align: right; }\n
table.tax { margin: 0 0 2em; }\n
\n
/* aside */\n
\n
aside h1 { border: none; border-width: 0 0 1px; margin: 0 0 1em; }\n
aside h1 { border-color: #999; border-bottom-style: solid; }\n
\n
/* bottom */\n
\n
footer {\n
font-size: 0.50em;\n
width: 100%;\n
clear: both;\n
text-align: right;\n
margin-top: 3em;\n
}\n
\n
@media print {\n
* { -webkit-print-color-adjust: exact; }\n
html { background: none; padding: 0; }\n
body { box-shadow: none; margin: 0; }\n
span:empty { display: none; }\n
}\n
\n
@page { margin: 0; }
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5187</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SaleInvoiceTransaction_getPrintout.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<!doctype html>\n
<html tal:define="data_dict here/Invoice_getODTDataDict;\n
set_precision python: request.set(\'precision\', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));\n
quantity_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_quantity/render_pdf;\n
price_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_total_price/render_pdf;\n
default_language python:test(request.get(\'international_form\'), \'en\', here.Localizer.get_selected_language());">\n
<head>\n
<meta charset="utf-8">\n
<title>Invoice</title>\n
<link rel="stylesheet" href="SaleInvoiceTransaction_getPrintout.css">\n
<link rel="license" href="http://www.opensource.org/licenses/mit-license/">\n
</head>\n
<body>\n
<header>\n
<h1>Invoice</h1>\n
<table class="company-info">\n
<tbody>\n
<td>\n
<div tal:content="python: data_dict[\'source_section_title\']"></div>\n
<div tal:content="python: data_dict[\'source_section_registeredcapital\']"></div>\n
<div tal:content="python: data_dict[\'source_section_address\']"></div>\n
<div tal:content="python: data_dict[\'source_section_telfax\']"></div>\n
<div tal:content="python: data_dict[\'source_section_email\']"></div>\n
<div tal:content="python: data_dict[\'source_section_corporateregcode\']"></div>\n
<div tal:content="python: data_dict[\'source_section_vatid\']"></div>\n
</td>\n
<td>\n
<!-- Please review -->\n
<span tal:define="logo_path python: \'%s?display=default_image?pre_converted_only=True&quality=75.0&display=thumbnail&format=png\' % data_dict[\'source_section_image_path\'];">\n
<img alt="" tal:attributes="src logo_path;" >\n
</span>\n
</td>\n
</tbody>\n
</table>\n
</header>\n
<article>\n
<table class="detail">\n
<tbody>\n
<tr>\n
<td class="detail-first">\n
<tal:block tal:define="orig_string string: Supplier;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
</td>\n
<td width="30%">\n
<div tal:content="python:data_dict[\'source_section_title\']">Nexedi SA</div>\n
<div tal:content=\'python:data_dict["source_section_address"]\'>270 bd Clémenceau, 59700 Marcq-en-Baroeul, France</div>\n
<div tal:content=\'python:data_dict["source_section_telfax"]\'>Tel: +33(0)9-51085055, Fax: +33(0)3-20 72 99 25</div>\n
<div tal:content=\'python:data_dict["source_section_email"]\'>Email: info@nexedi.com</div>\n
<div tal:condition=\'data_dict/source_section_vatid\' tal:content=\'python:data_dict["source_section_vatid"]\'>VAT ID: FR72440047504</div> \n
</td>\n
<td>\n
<tal:block tal:define="orig_string string: Client;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
</td>\n
<td>\n
<div tal:content=\'python: data_dict["destination_section_title"]\'>Astrium Geo-Information Services, Infoterra GmbH</div>\n
<div tal:content=\'python: data_dict["destination_section_address"]\'>Claude-Dornier-Strasse, 88090 Immenstaad, Germany</div>\n
<div tal:content=\'python: data_dict["destination_section_telfax"]\'>Tel: +49(0)-7545 8 5982, Fax: +49(0)-7545 8 1337</div>\n
<div tal:content=\'python: data_dict["destination_section_email"]\'>Email: volker.mueller@astrium.eads.net</div>\n
<div tal:content=\'python: data_dict["destination_section_vatid"]\' tal:condition="data_dict/destination_section_vatid">VAT ID: DE197540174</div>\n
</td>\n
<td>\n
<table class="inner-table">\n
<tr>\n
<td tal:define=\'orig_string string: Invoice Number; \n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content=\'python:data_dict["reference"]\'>8223</span>\n
</td>\n
</tr>\n
<tr>\n
<td tal:define=\'orig_string string: Document Date;\n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content="data_dict/start_date">2012/07/18</span>\n
</td>\n
</tr>\n
<tr>\n
<td tal:define=\'orig_string string: Currency;\n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content=\'python:data_dict["currency"]\'>EUR</span>\n
</td>\n
</tr>\n
</table>\n
</td> \n
</tr>\n
<td>\n
<tal:block tal:define="orig_string string: Ship From;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<p><span tal:replace=\'orig_message\'/>:</p>\n
<p tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</p>\n
</tal:block>\n
</td>\n
<td>\n
<div tal:content=\'python:data_dict["source_title"]\'>name</div>\n
<div tal:content=\'python:data_dict["source_address"]\'>address</div>\n
<div tal:content=\'python:data_dict["source_telfax"]\'>tel, fax</div>\n
<div tal:condition="data_dict/source_vatid" tal:content=\'python:data_dict["source_vatid"]\'>vat id</div>\n
</td>\n
<td>\n
<tal:block tal:define="orig_string string: Ship To;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<p><span tal:replace=\'orig_message\'/>:</p>\n
<p tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</p>\n
</tal:block>\n
</td>\n
<td>\n
<div tal:content=\'python:data_dict["destination_title"]\'>name</div>\n
<div tal:content=\'python:data_dict["destination_address"]\'>address</div>\n
<div tal:content=\'python:data_dict["destination_telfax"]\'>tel, fax</div>\n
<div tal:condition="data_dict/destination_vatid" tal:content=\'python:data_dict["destination_vatid"]\'>vat id</div>\n
</td>\n
<td>\n
<table class="inner-table">\n
<tr>\n
<td tal:define=\'orig_string string:Payment; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content=\'python:data_dict["payment_condition"]\'>60 days</span>\n
</td>\n
</tr>\n
<tr>\n
<td tal:define=\'orig_string string:Delivery Mode; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content=\'python:data_dict["delivery_mode"]\'>del mode</span>\n
</td>\n
</tr>\n
<tr>\n
<td tal:define=\'orig_string string:Incoterm; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</td>\n
<td>\n
<span tal:content=\'python:data_dict["incoterm"]\'>incoterm</span>\n
</td>\n
</tr>\n
</table>\n
</td>\n
<tr>\n
</tr>\n
</tbody>\n
</table>\n
<table class="inventory">\n
<thead>\n
<tr>\n
<th tal:define=\'orig_string string:Line; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Your Item No.; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Our Item No.; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Description; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Quantity; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Unit; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Tax Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Unit Price; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Total Price; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
</tr>\n
</thead>\n
<tbody>\n
<tal:block tal:repeat=\'line_dict python:data_dict["line_not_tax"]\'>\n
<tr>\n
<td><span tal:content="python: line_dict[\'number_not_tax_line\']"></span></td>\n
<td><span tal:content="python: line_dict[\'source_reference\']"></span></td>\n
<td><span tal:content="python: line_dict[\'reference\']"></span></td>\n
<td>\n
<span>\n
<tal:block tal:repeat="line line_dict/description">\n
<tal:block tal:replace="line"/>\n
<text:line-break tal:condition="not:repeat/line/end"/>\n
</tal:block>\n
</span>\n
</td>\n
<td><span tal:content="python: quantity_renderer(line_dict[\'total_quantity\'])"></span></td>\n
<td><span tal:content="python: line_dict[\'quantity_unit\']"></span></td>\n
<td><span tal:content="python: line_dict[\'tax_number\']"></span></td>\n
<td><span tal:content="python: price_renderer(line_dict[\'base_price\'])"></span></td>\n
<td><span tal:content="python: price_renderer(line_dict[\'total_price\'])"></span></td>\n
</tr>\n
</tal:block>\n
</tbody>\n
</table>\n
<table class="balance">\n
<tr>\n
<th tal:define=\'orig_string string:Total Excluding Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span> \n
</th>\n
<td><span tal:content="python: price_renderer(data_dict[\'total_price_exclude_tax\'])"></span></td>\n
</tr>\n
</table>\n
<table class="tax">\n
<thead>\n
<tr>\n
<th tal:define=\'orig_string string:Tax Code; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Amount; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Rate; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:Tax Price; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
</tr>\n
</thead>\n
<tbody>\n
<tal:block tal:repeat=\'line_tax_dict python:data_dict["line_tax"]\'>\n
<tr>\n
<td tal:condition="python: line_tax_dict[\'number_tax_line\'] != \'\'">\n
<span tal:content="python: line_tax_dict[\'number_tax_line\']">:</span>\n
</td>\n
<td tal:condition="python: line_tax_dict[\'total_quantity\'] != \'\'"> \n
<span tal:content="python: price_renderer(line_tax_dict[\'total_quantity\'])">qty</span>\n
</td>\n
<td tal:condition="python: line_tax_dict[\'base_price\'] != \'\'">\n
<span tal:content="python: quantity_renderer(line_tax_dict[\'base_price\']*100*1.00)+\'%\'">:</span>\n
</td> \n
<td tal:condition="python: line_tax_dict[\'total_price\'] != \'\'">\n
<span tal:content="python: price_renderer(line_tax_dict[\'total_price\'])">:</span>\n
</td> \n
</tr>\n
</tal:block>\n
</tbody>\n
</table>\n
<table class="balance">\n
<tr>\n
<th tal:define=\'orig_string string:Total Including Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/> :</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span> \n
</th>\n
<td tal:condition="python: data_dict[\'total_price\'] != \'\'" tal:attributes=\'office:value data_dict/total_price\'>\n
<span tal:content="python: price_renderer(data_dict[\'total_price\'])">:</span>\n
</td> \n
</tr>\n
</table>\n
<table>\n
<td tal:define=\'orig_string string:Notes; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<p><span tal:replace=\'orig_message\'/><span tal:omit-tag=\'\' tal:condition=\'python:translated_message != orig_message\'> / <span tal:replace=\'translated_message\'/></span>:</p>\n
</td>\n
</table>\n
</article>\n
<footer>Generated with ERP5 - Open Source ERP suite (www.erp5.org)</footer>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleInvoiceTransaction_getPrintout</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_printer</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_printer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts58844315.59</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>SaleInvoiceTransaction_getEpsonPrintout.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
//if the price number length > 13 use the Scientific notation,\n
//if the length==11,12,13 , just need to remove the number after Decimal point\n
function priceControl(price,builder){\n
var content=parseFloat(price).toFixed(2);\n
var content_len=content.length;\n
if(content_len>13)\n
content=parseFloat(content).toExponential(4);\n
else if(content_len>10&&content_len<14)\n
content=parseInt(content);\n
builder.addText(content);\n
}\n
\n
function printInvoiceOnEpson(){\n
// create print data builder object\n
var builder = new epson.ePOSBuilder();\n
\n
// initialize (ank mode, smoothing)\n
builder.addTextLang(\'en\').addTextSmooth(true);\n
\n
//add logo\n
builder.addTextAlign(builder.ALIGN_CENTER);\n
var canvas = $(\'#canvas\')[0];\n
var context = canvas.getContext(\'2d\');\n
context.drawImage($(\'#company_logo\')[0], 0, 0, 330, 75);\n
builder.addImage(context, 0, 0, 330, 75);\n
builder.addFeed();\n
\n
//add company information\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addTextSize(1, 1);\n
$("#company-info div").each(function(){\n
builder.addText($(this).text());\n
builder.addFeed();\n
});\n
\n
//add products information\n
builder.addTextSize(2, 1);\n
builder.addTextStyle(false, false, true);\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addText($.trim($("#invoice_information_title").text()));\n
builder.addTextSize(1, 1);\n
builder.addFeedLine(2);\n
$("#invoice_information_detail div").each(function(){\n
$(this).find("span").each(function(i){\n
if(i==0){\n
builder.addTextStyle(false, false, true);\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addText($.trim($(this).text()));\n
}\n
else{\n
builder.addTextStyle(false, false, false);\n
builder.addTextPosition(350);\n
builder.addText($.trim($(this).text()));\n
} \n
});\n
builder.addFeed();\n
});\n
builder.addFeed();\n
\n
//add products line\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addTextSize(1, 1);\n
builder.addTextFont(builder.FONT_C);\n
builder.addTextStyle(false, false, true);\n
$("#invoice_line thead tr").each(function(j){\n
var textPosition=0;\n
$(this).find("th").each(function(i){\n
builder.addTextPosition(textPosition);\n
builder.addText($.trim($(this).text()));\n
switch(i)\n
{\n
case 0:\n
textPosition+=100;\n
break;\n
case 1:\n
textPosition+=100; \n
break;\n
case 2:\n
textPosition+=125; \n
break;\n
case 3:\n
textPosition+=60;\n
break;\n
} \n
});\n
});\n
builder.addFeed();\n
builder.addTextStyle(false, false, false);\n
$("#invoice_line tbody tr").each(function(){\n
var textPosition=0;\n
$(this).find("td").each(function(i){\n
builder.addTextPosition(textPosition);\n
switch(i)\n
{\n
case 0:\n
var content=$.trim($(this).text());\n
content_len=content.length;\n
if(content_len>8)\n
content=content.substr(0,2)+"..."+content.substr(content_len-4,3)\n
builder.addText(content);\n
textPosition+=100;\n
break;\n
case 1:\n
var content=parseFloat($.trim($(this).text())).toFixed(1);\n
var content_len=content.length;\n
if(content_len>10)\n
content=parseFloat(content).toExponential(2);\n
else if(content_len>8&&content_len<11)\n
content=parseInt(content);\n
builder.addText(content);\n
textPosition+=100;\n
break;\n
case 2:\n
priceControl($.trim($(this).text()),builder)\n
textPosition+=125;\n
break;\n
case 3:\n
var content=$.trim($(this).text());\n
var content_len=content.length;\n
content=content.substr(0,5);\n
builder.addText(content);\n
textPosition+=60;\n
break;\n
case 4:\n
priceControl($.trim($(this).text()),builder)\n
break;\n
}\n
});\n
builder.addFeed();\n
});\n
\n
//add total excluding tax price\n
builder.addTextPosition(360);\n
builder.addText("===========");\n
builder.addFeed();\n
builder.addTextSize(1, 2);\n
builder.addTextStyle(false, false, true);\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addTextPosition(130);\n
builder.addText($.trim($("#total_without_tax tr th").text()));\n
builder.addTextPosition(385);\n
priceControl($.trim($("#total_without_tax tr td").text()),builder)\n
builder.addFeedLine(4);\n
\n
//add the tax line\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addTextSize(1, 1);\n
builder.addTextFont(builder.FONT_C);\n
builder.addTextStyle(false, false, true);\n
$("#tax thead tr").each(function(j){\n
var textPosition=100;\n
$(this).find("th").each(function(i){\n
builder.addTextPosition(textPosition);\n
builder.addText($.trim($(this).text()));\n
switch(i)\n
{\n
case 0:\n
textPosition+=60;\n
break;\n
case 1:\n
textPosition+=125;\n
break;\n
case 2:\n
textPosition+=100;\n
break;\n
}\n
});\n
});\n
builder.addFeed();\n
builder.addTextStyle(false, false, false);\n
$("#tax tbody tr").each(function(){\n
var textPosition=100;\n
$(this).find("td").each(function(i){\n
builder.addTextPosition(textPosition);\n
switch(i)\n
{\n
case 0:\n
builder.addText($.trim($(this).text()));\n
textPosition+=60;\n
break;\n
case 1:\n
priceControl($.trim($(this).text()),builder);\n
textPosition+=125;\n
break;\n
case 2:\n
builder.addText($.trim($(this).text()));\n
textPosition+=100;\n
break;\n
case 3:\n
priceControl($.trim($(this).text()),builder);\n
break;\n
}\n
});\n
builder.addFeed();\n
});\n
builder.addFeed();\n
\n
//add total excluding tax price\n
builder.addTextPosition(360);\n
builder.addText("===========");\n
builder.addFeed();\n
builder.addTextSize(1, 2);\n
builder.addTextStyle(false, false, true);\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
builder.addTextPosition(130);\n
builder.addText($.trim($("#total_price tr th").text()));\n
builder.addTextPosition(385);\n
priceControl($.trim($("#total_price tr td").text()),builder)\n
builder.addFeedLine(4);\n
\n
// append date and time\n
builder.addTextSize(1, 1);\n
builder.addTextAlign(builder.ALIGN_LEFT);\n
var now = new Date();\n
builder.addText(now.toDateString() + \' \' + now.toTimeString().slice(0, 8) + \'\\n\');\n
\n
// append paper cutting\n
builder.addCut(); \n
\n
// create print object\n
var url = \'http://\' + \'192.168.192.168\' + \'/cgi-bin/epos/service.cgi?devid=\' + \'local_printer\' + \'&timeout=\' + \'10000\';\n
var epos = new epson.ePOSPrint(url);\n
\n
// register callback function\n
epos.onreceive = function (res) {\n
// print failure\n
if (!res.success) {\n
console.log("no response")\n
}\n
}\n
\n
// register callback function\n
epos.onerror = function (err) {\n
console.log("error")\n
}\n
\n
// send\n
epos.send(builder.toString());\n
}
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6931</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<!doctype html>\n
<html tal:define="data_dict here/Invoice_getODTDataDict;\n
set_precision python: request.set(\'precision\', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));\n
quantity_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_quantity/render_pdf;\n
price_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_total_price/render_pdf;\n
default_language python:test(request.get(\'international_form\'), \'en\', here.Localizer.get_selected_language());">\n
<head>\n
<meta charset="utf-8">\n
<title>Invoice</title>\n
<script type="text/javascript" src="jquery/core/jquery.js"></script>\n
<script type="text/javascript" src="epos-print-2.0.0.js"></script>\n
<script type="text/javascript" src="SaleInvoiceTransaction_getEpsonPrintout.js"></script>\n
<link rel="license" href="http://www.opensource.org/licenses/mit-license/">\n
</head>\n
<body>\n
<header>\n
<h2 id="invoice_title" tal:define=\'orig_string string:Invoice; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:content=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:content=\'translated_message\'/></span>\n
</h2>\n
<div tal:define="logo_path python: \'%s?display=default_image?pre_converted_only=True&quality=75.0&display=thumbnail&format=png\' % data_dict[\'source_section_image_path\'];">\n
<canvas id="canvas" width="512" style="display:none;" height="480"></canvas>\n
<img id="company_logo" alt="" tal:attributes="src logo_path;" width="250" height="45">\n
</div>\n
<div id="company-info">\n
<div style="font-weight:bold" tal:content="python: data_dict[\'source_section_title\']"></div>\n
<div tal:content="python: data_dict[\'source_section_registeredcapital\']"></div>\n
<div tal:content="python: data_dict[\'source_section_address\']"></div>\n
<div tal:content="python: data_dict[\'source_section_telfax\']"></div>\n
<div tal:content="python: data_dict[\'source_section_email\']"></div>\n
<div tal:content="python: data_dict[\'source_section_corporateregcode\']"></div>\n
<div tal:content="python: data_dict[\'source_section_vatid\']"></div>\n
<div>\n
</header>\n
<br> \n
<article>\n
<div id="detail">\n
<div id="supplier">\n
<div id="supplier_title">\n
<tal:block tal:define="orig_string string: Supplier;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<span style="font-weight:bold"><span tal:replace=\'orig_message\'/>:</span>\n
<span style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</tal:block>\n
</div>\n
<div id="supplier_detail">\n
<div tal:content="python:data_dict[\'source_section_title\']">Nexedi SA</div>\n
<div tal:content=\'python:data_dict["source_section_address"]\'>270 bd Clémenceau, 59700 Marcq-en-Baroeul, France</div>\n
<div tal:content=\'python:data_dict["source_section_telfax"]\'>Tel: +33(0)9-51085055, Fax: +33(0)3-20 72 99 25</div>\n
<div tal:content=\'python:data_dict["source_section_email"]\'>Email: info@nexedi.com</div>\n
<div tal:condition=\'data_dict/source_section_vatid\' tal:content=\'python:data_dict["source_section_vatid"]\'>VAT ID: FR72440047504</div> \n
</div>\n
</div>\n
<br>\n
<div id="client">\n
<div id="client_title">\n
<tal:block tal:define="orig_string string: Client;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<span style="font-weight:bold"><span tal:replace=\'orig_message\'/>:</span>\n
<span style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</tal:block>\n
</div>\n
<div id="client_detail">\n
<div tal:content=\'python: data_dict["destination_section_title"]\'>Astrium Geo-Information Services, Infoterra GmbH</div>\n
<div tal:content=\'python: data_dict["destination_section_address"]\'>Claude-Dornier-Strasse, 88090 Immenstaad, Germany</div>\n
<div tal:content=\'python: data_dict["destination_section_telfax"]\'>Tel: +49(0)-7545 8 5982, Fax: +49(0)-7545 8 1337</div>\n
<div tal:content=\'python: data_dict["destination_section_email"]\'>Email: volker.mueller@astrium.eads.net</div>\n
<div tal:content=\'python: data_dict["destination_section_vatid"]\' tal:condition="data_dict/destination_section_vatid">VAT ID: DE197540174</div>\n
</div>\n
</div>\n
<br>\n
<div id="ship_from">\n
<div id="ship_from_title">\n
<tal:block tal:define="orig_string string: Ship From;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<p style="font-weight:bold"><span tal:replace=\'orig_message\'/>:</p>\n
<p style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</p>\n
</tal:block>\n
</div>\n
<div id="ship_from_detail">\n
<div tal:content=\'python:data_dict["source_title"]\'>name</div>\n
<div tal:content=\'python:data_dict["source_address"]\'>address</div>\n
<div tal:content=\'python:data_dict["source_telfax"]\'>tel, fax</div>\n
<div tal:condition="data_dict/source_vatid" tal:content=\'python:data_dict["source_vatid"]\'>vat id</div>\n
</div>\n
</div>\n
<br>\n
<div id="ship_to">\n
<div id="ship_to_title">\n
<tal:block tal:define="orig_string string: Ship To;\n
orig_message python: here.Base_translateString(orig_string, lang=default_language);\n
translated_message python: here.Base_translateString(orig_string);">\n
<p style="font-weight:bold"><span tal:replace=\'orig_message\'/>:</p>\n
<p style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</p>\n
</tal:block>\n
</div>\n
<div id="ship_to_detail">\n
<div tal:content=\'python:data_dict["destination_title"]\'>name</div>\n
<div tal:content=\'python:data_dict["destination_address"]\'>address</div>\n
<div tal:content=\'python:data_dict["destination_telfax"]\'>tel, fax</div>\n
<div tal:condition="data_dict/destination_vatid" tal:content=\'python:data_dict["destination_vatid"]\'>vat id</div>\n
</div>\n
</div>\n
<br>\n
<div id="invoice_information">\n
<div id="invoice_information_title">\n
<tal:block tal:define=\'orig_string string: Invoice; \n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span style="font-weight:bold"><span tal:replace=\'orig_message\'/></span>\n
<span style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</tal:block>\n
</div>\n
<div id="invoice_information_detail">\n
<div>\n
<tal:block tal:define=\'orig_string string: Invoice Number; \n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content=\'python:data_dict["reference"]\'>8223</span>\n
</div>\n
<div>\n
<tal:block tal:define=\'orig_string string: Document Date;\n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content="data_dict/start_date">2012/07/18</span>\n
</div>\n
<div>\n
<tal:block tal:define=\'orig_string string: Currency;\n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content=\'python:data_dict["currency"]\'>EUR</span>\n
</div>\n
<div>\n
<tal:block tal:define=\'orig_string string:Payment; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content=\'python:data_dict["payment_condition"]\'>60 days</span>\n
</div>\n
<div>\n
<tal:block tal:define=\'orig_string string:Delivery Mode; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content=\'python:data_dict["delivery_mode"]\'>del mode</span>\n
</div>\n
<div>\n
<tal:block tal:define=\'orig_string string:Incoterm; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span>\n
</tal:block>\n
<span tal:content=\'python:data_dict["incoterm"]\'>incoterm</span>\n
</div>\n
</div>\n
</div>\n
</div>\n
<br>\n
<div id="product_detail_title">\n
<span tal:define=\'orig_string string: Products details; \n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span style="font-weight:bold"><span tal:replace=\'orig_message\'/></span>\n
<span style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</span>\n
</div>\n
\n
<table id="invoice_line">\n
<thead>\n
<tr>\n
<th tal:define=\'orig_string string:PROD; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:QTY; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:U/P; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:TAX; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
<th tal:define=\'orig_string string:PRICE; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th>\n
</tr>\n
</thead>\n
<tbody>\n
<tal:block tal:repeat=\'line_dict python:data_dict["line_not_tax"]\'>\n
<tr>\n
<td>\n
<span>\n
<tal:block tal:repeat="line line_dict/description">\n
<tal:block tal:replace="line"/>\n
<text:line-break tal:condition="not:repeat/line/end"/>\n
</tal:block>\n
</span>\n
</td>\n
<td><span tal:content="python: line_dict[\'total_quantity\']"></span></td>\n
<td><span tal:content="python: line_dict[\'base_price\']"></span></td>\n
<td><span tal:content="python: line_dict[\'tax_number\']"></span></td>\n
<td><span tal:content="python: line_dict[\'total_price\']"></span></td>\n
</tr>\n
</tal:block>\n
</tbody>\n
</table>\n
\n
<br>\n
<table id="total_without_tax">\n
<tr>\n
<th tal:define=\'orig_string string:Total Excluding Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/>:</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span> \n
</th>\n
<td><span tal:content="python: data_dict[\'total_price_exclude_tax\']"></span></td>\n
</tr>\n
</table>\n
\n
<div id="tax_detail_title">\n
<span tal:define=\'orig_string string: Tax details; \n
orig_message python: unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8");\n
translated_message python: unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span style="font-weight:bold"><span tal:replace=\'orig_message\'/></span>\n
<span style="font-weight:bold" tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</span>\n
</div>\n
\n
<table id="tax">\n
<thead>\n
<tr>\n
<th tal:define=\'orig_string string:TAX; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th> \n
<th tal:define=\'orig_string string:AMT; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th> \n
<th tal:define=\'orig_string string:RATE; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th> \n
<th tal:define=\'orig_string string:PRICE; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/></span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/></span>\n
</th> \n
</tr>\n
</thead>\n
<tbody>\n
<tal:block tal:repeat=\'line_tax_dict python:data_dict["line_tax"]\'>\n
<tr>\n
<td tal:condition="python: line_tax_dict[\'number_tax_line\'] != \'\'">\n
<span tal:content="python: line_tax_dict[\'number_tax_line\']">:</span>\n
</td>\n
<td tal:condition="python: line_tax_dict[\'total_quantity\'] != \'\'"> \n
<span tal:content="python: line_tax_dict[\'total_quantity\']">qty</span>\n
</td>\n
<td tal:condition="python: line_tax_dict[\'base_price\'] != \'\'">\n
<span tal:content="python: quantity_renderer(line_tax_dict[\'base_price\']*100*1.00)+\'%\'">:</span>\n
</td> \n
<td tal:condition="python: line_tax_dict[\'total_price\'] != \'\'">\n
<span tal:content="python: line_tax_dict[\'total_price\']">:</span>\n
</td> \n
</tr>\n
</tal:block>\n
</tbody>\n
</table>\n
<table id="total_price">\n
<tr>\n
<th tal:define=\'orig_string string:Total Including Tax; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<span><span tal:replace=\'orig_message\'/> :</span>\n
<span tal:condition=\'python:translated_message != orig_message\'><span tal:replace=\'translated_message\'/>:</span> \n
</th>\n
<td tal:condition="python: data_dict[\'total_price\'] != \'\'" tal:attributes=\'office:value data_dict/total_price\'>\n
<span tal:content="python: data_dict[\'total_price\']">:</span>\n
</td> \n
</tr>\n
</table>\n
<table>\n
<td tal:define=\'orig_string string:Notes; orig_message python:unicode(here.Base_translateString(orig_string, lang=default_language),"utf-8"); translated_message python:unicode(here.Base_translateString(orig_string),"utf-8")\'>\n
<p><span tal:replace=\'orig_message\'/><span tal:omit-tag=\'\' tal:condition=\'python:translated_message != orig_message\'> / <span tal:replace=\'translated_message\'/></span>:</p>\n
</td>\n
</table>\n
</article>\n
<footer>Generated with ERP5 - Open Source ERP suite (www.erp5.org)</footer>\n
<button onclick=\'printInvoiceOnEpson()\'>Print by Epson</button>\n
\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleInvoiceTransaction_getEpsonPrintout</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts57897042.09</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>epos-print-2.0.0.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*! ePOS-Print API Version 2.0.0 Copyright (C) SEIKO EPSON CORPORATION 2011. All rights reserved. */\n
(function(window){function ePOSBuilder(){this.message="";this.halftone=0;this.brightness=1;this.FONT_A="font_a";this.FONT_B="font_b";this.FONT_C="font_c";this.FONT_SPECIAL_A="special_a";this.FONT_SPECIAL_B="special_b";this.ALIGN_LEFT="left";this.ALIGN_CENTER="center";this.ALIGN_RIGHT="right";this.COLOR_NONE="none";this.COLOR_1="color_1";this.COLOR_2="color_2";this.COLOR_3="color_3";this.COLOR_4="color_4";this.FEED_PEELING="peeling";this.FEED_CUTTING="cutting";this.FEED_CURRENT_TOF="current_tof";this.FEED_NEXT_TOF="next_tof";this.MODE_MONO="mono";this.MODE_GRAY16="gray16";this.BARCODE_UPC_A="upc_a";this.BARCODE_UPC_E="upc_e";this.BARCODE_EAN13="ean13";this.BARCODE_JAN13="jan13";this.BARCODE_EAN8="ean8";this.BARCODE_JAN8="jan8";this.BARCODE_CODE39="code39";this.BARCODE_ITF="itf";this.BARCODE_CODABAR="codabar";this.BARCODE_CODE93="code93";this.BARCODE_CODE128="code128";this.BARCODE_GS1_128="gs1_128";this.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL="gs1_databar_omnidirectional";this.BARCODE_GS1_DATABAR_TRUNCATED="gs1_databar_truncated";this.BARCODE_GS1_DATABAR_LIMITED="gs1_databar_limited";this.BARCODE_GS1_DATABAR_EXPANDED="gs1_databar_expanded";this.HRI_NONE="none";this.HRI_ABOVE="above";this.HRI_BELOW="below";this.HRI_BOTH="both";this.SYMBOL_PDF417_STANDARD="pdf417_standard";this.SYMBOL_PDF417_TRUNCATED="pdf417_truncated";this.SYMBOL_QRCODE_MODEL_1="qrcode_model_1";this.SYMBOL_QRCODE_MODEL_2="qrcode_model_2";this.SYMBOL_MAXICODE_MODE_2="maxicode_mode_2";this.SYMBOL_MAXICODE_MODE_3="maxicode_mode_3";this.SYMBOL_MAXICODE_MODE_4="maxicode_mode_4";this.SYMBOL_MAXICODE_MODE_5="maxicode_mode_5";this.SYMBOL_MAXICODE_MODE_6="maxicode_mode_6";this.SYMBOL_GS1_DATABAR_STACKED="gs1_databar_stacked";this.SYMBOL_GS1_DATABAR_STACKED_OMNIDIRECTIONAL="gs1_databar_stacked_omnidirectional";this.SYMBOL_GS1_DATABAR_EXPANDED_STACKED="gs1_databar_expanded_stacked";this.LEVEL_0="level_0";this.LEVEL_1="level_1";this.LEVEL_2="level_2";this.LEVEL_3="level_3";this.LEVEL_4="level_4";this.LEVEL_5="level_5";this.LEVEL_6="level_6";this.LEVEL_7="level_7";this.LEVEL_8="level_8";this.LEVEL_L="level_l";this.LEVEL_M="level_m";this.LEVEL_Q="level_q";this.LEVEL_H="level_h";this.LEVEL_DEFAULT="default";this.LINE_THIN="thin";this.LINE_MEDIUM="medium";this.LINE_THICK="thick";this.LINE_THIN_DOUBLE="thin_double";this.LINE_MEDIUM_DOUBLE="medium_double";this.LINE_THICK_DOUBLE="thick_double";this.DIRECTION_LEFT_TO_RIGHT="left_to_right";this.DIRECTION_BOTTOM_TO_TOP="bottom_to_top";this.DIRECTION_RIGHT_TO_LEFT="right_to_left";this.DIRECTION_TOP_TO_BOTTOM="top_to_bottom";this.CUT_NO_FEED="no_feed";this.CUT_FEED="feed";this.CUT_RESERVE="reserve";this.DRAWER_1="drawer_1";this.DRAWER_2="drawer_2";this.PULSE_100="pulse_100";this.PULSE_200="pulse_200";this.PULSE_300="pulse_300";this.PULSE_400="pulse_400";this.PULSE_500="pulse_500";this.PATTERN_NONE="none";this.PATTERN_A="pattern_a";this.PATTERN_B="pattern_b";this.PATTERN_C="pattern_c";this.PATTERN_D="pattern_d";this.PATTERN_E="pattern_e";this.PATTERN_ERROR="error";this.PATTERN_PAPER_END="paper_end";this.HALFTONE_DITHER=0;this.HALFTONE_ERROR_DIFFUSION=1;this.HALFTONE_THRESHOLD=2}ePOSBuilder.prototype.addText=function(data){this.message+="<text>"+escapeMarkup(data)+"</text>";return this};ePOSBuilder.prototype.addTextLang=function(lang){this.message+=\'<text lang="\'+lang+\'"/>\';return this};ePOSBuilder.prototype.addTextAlign=function(align){var s="";s+=getEnumAttr("align",align,regexAlign);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextRotate=function(rotate){var s="";s+=getBoolAttr("rotate",rotate);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextLineSpace=function(linespc){var s="";s+=getUByteAttr("linespc",linespc);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextFont=function(font){var s="";s+=getEnumAttr("font",font,regexFont);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextSmooth=function(smooth){var s="";s+=getBoolAttr("smooth",smooth);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextDouble=function(dw,dh){var s="";if(dw!==undefined){s+=getBoolAttr("dw",dw)}if(dh!==undefined){s+=getBoolAttr("dh",dh)}this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextSize=function(width,height){var s="";if(width!==undefined){s+=getIntAttr("width",width,1,8)}if(height!==undefined){s+=getIntAttr("height",height,1,8)}this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextStyle=function(reverse,ul,em,color){var s="";if(reverse!==undefined){s+=getBoolAttr("reverse",reverse)}if(ul!==undefined){s+=getBoolAttr("ul",ul)}if(em!==undefined){s+=getBoolAttr("em",em)}if(color!==undefined){s+=getEnumAttr("color",color,regexColor)}this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addTextPosition=function(x){var s="";s+=getUShortAttr("x",x);this.message+="<text"+s+"/>";return this};ePOSBuilder.prototype.addFeedUnit=function(unit){var s="";s+=getUByteAttr("unit",unit);this.message+="<feed"+s+"/>";return this};ePOSBuilder.prototype.addFeedLine=function(line){var s="";s+=getUByteAttr("line",line);this.message+="<feed"+s+"/>";return this};ePOSBuilder.prototype.addFeed=function(){this.message+="<feed/>";return this};ePOSBuilder.prototype.addFeedPosition=function(pos){var s="";s+=getEnumAttr("pos",pos,regexFeed);this.message+="<feed"+s+"/>";return this};ePOSBuilder.prototype.addImage=function(context,x,y,width,height,color,mode){var s="",ht=this.halftone,br=this.brightness,imgdata,raster;getUShortAttr("x",x);getUShortAttr("y",y);s+=getUShortAttr("width",width);s+=getUShortAttr("height",height);if(color!==undefined){s+=getEnumAttr("color",color,regexColor)}if(mode!==undefined){s+=getEnumAttr("mode",mode,regexMode)}if(isNaN(ht)||ht<0||ht>2){throw new Error(\'Property "halftone" is invalid\')}if(isNaN(br)||br<0.1||br>10){throw new Error(\'Property "brightness" is invalid\')}imgdata=context.getImageData(x,y,width,height);raster=(mode==this.MODE_GRAY16)?toGrayImage(imgdata,br):toMonoImage(imgdata,ht,br);this.message+="<image"+s+">"+toBase64Binary(raster)+"</image>";return this};ePOSBuilder.prototype.addLogo=function(key1,key2){var s="";s+=getUByteAttr("key1",key1);s+=getUByteAttr("key2",key2);this.message+="<logo"+s+"/>";return this};ePOSBuilder.prototype.addBarcode=function(data,type,hri,font,width,height){var s="";s+=getEnumAttr("type",type,regexBarcode);if(hri!==undefined){s+=getEnumAttr("hri",hri,regexHri)}if(font!==undefined){s+=getEnumAttr("font",font,regexFont)}if(width!==undefined){s+=getUByteAttr("width",width)}if(height!==undefined){s+=getUByteAttr("height",height)}this.message+="<barcode"+s+">"+escapeControl(escapeMarkup(data))+"</barcode>";return this};ePOSBuilder.prototype.addSymbol=function(data,type,level,width,height,size){var s="";s+=getEnumAttr("type",type,regexSymbol);if(level!==undefined){s+=getEnumAttr("level",level,regexLevel)}if(width!==undefined){s+=getUByteAttr("width",width)}if(height!==undefined){s+=getUByteAttr("height",height)}if(size!==undefined){s+=getUShortAttr("size",size)}this.message+="<symbol"+s+">"+escapeControl(escapeMarkup(data))+"</symbol>";return this};ePOSBuilder.prototype.addHLine=function(x1,x2,style){var s="";s+=getUShortAttr("x1",x1);s+=getUShortAttr("x2",x2);if(style!==undefined){s+=getEnumAttr("style",style,regexLine)}this.message+="<hline"+s+"/>";return this};ePOSBuilder.prototype.addVLineBegin=function(x,style){var s="";s+=getUShortAttr("x",x);if(style!==undefined){s+=getEnumAttr("style",style,regexLine)}this.message+="<vline-begin"+s+"/>";return this};ePOSBuilder.prototype.addVLineEnd=function(x,style){var s="";s+=getUShortAttr("x",x);if(style!==undefined){s+=getEnumAttr("style",style,regexLine)}this.message+="<vline-end"+s+"/>";return this};ePOSBuilder.prototype.addPageBegin=function(){this.message+="<page>";return this};ePOSBuilder.prototype.addPageEnd=function(){this.message+="</page>";return this};ePOSBuilder.prototype.addPageArea=function(x,y,width,height){var s="";s+=getUShortAttr("x",x);s+=getUShortAttr("y",y);s+=getUShortAttr("width",width);s+=getUShortAttr("height",height);this.message+="<area"+s+"/>";return this};ePOSBuilder.prototype.addPageDirection=function(dir){var s="";s+=getEnumAttr("dir",dir,regexDirection);this.message+="<direction"+s+"/>";return this};ePOSBuilder.prototype.addPagePosition=function(x,y){var s="";s+=getUShortAttr("x",x);s+=getUShortAttr("y",y);this.message+="<position"+s+"/>";return this};ePOSBuilder.prototype.addPageLine=function(x1,y1,x2,y2,style){var s="";s+=getUShortAttr("x1",x1);s+=getUShortAttr("y1",y1);s+=getUShortAttr("x2",x2);s+=getUShortAttr("y2",y2);if(style!==undefined){s+=getEnumAttr("style",style,regexLine)}this.message+="<line"+s+"/>";return this};ePOSBuilder.prototype.addPageRectangle=function(x1,y1,x2,y2,style){var s="";s+=getUShortAttr("x1",x1);s+=getUShortAttr("y1",y1);s+=getUShortAttr("x2",x2);s+=getUShortAttr("y2",y2);if(style!==undefined){s+=getEnumAttr("style",style,regexLine)}this.message+="<rectangle"+s+"/>";return this};ePOSBuilder.prototype.addCut=function(type){var s="";if(type!==undefined){s+=getEnumAttr("type",type,regexCut)}this.message+="<cut"+s+"/>";return this};ePOSBuilder.prototype.addPulse=function(drawer,time){var s="";if(drawer!==undefined){s+=getEnumAttr("drawer",drawer,regexDrawer)}if(time!==undefined){s+=getEnumAttr("time",time,regexPulse)}this.message+="<pulse"+s+"/>";return this};ePOSBuilder.prototype.addSound=function(pattern,repeat){var s="";if(pattern!==undefined){s+=getEnumAttr("pattern",pattern,regexPattern)}if(repeat!==undefined){s+=getUByteAttr("repeat",repeat)}this.message+="<sound"+s+"/>";return this};ePOSBuilder.prototype.addCommand=function(data){this.message+="<command>"+toHexBinary(data)+"</command>";return this};ePOSBuilder.prototype.toString=function(){var epos=\'<epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print">\'+this.message+"</epos-print>";return epos};function toHexBinary(s){var l=s.length,r=new Array(l),i;for(i=0;i<l;i++){r[i]=("0"+s.charCodeAt(i).toString(16)).slice(-2)}return r.join("")}function toBase64Binary(s){var l=s.length,r=new Array((l+2)/3<<2),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=(3-l%3)%3,j=0,i=0,n;s+="\\x00\\x00";while(i<l){n=s.charCodeAt(i++)<<16|s.charCodeAt(i++)<<8|s.charCodeAt(i++);r[j++]=t.charAt(n>>18&63);r[j++]=t.charAt(n>>12&63);r[j++]=t.charAt(n>>6&63);r[j++]=t.charAt(n&63)}while(p--){r[--j]="="}return r.join("")}function toMonoImage(imgdata,s,g){var x=String.fromCharCode,m8=[[2,130,34,162,10,138,42,170],[194,66,226,98,202,74,234,106],[50,178,18,146,58,186,26,154],[242,114,210,82,250,122,218,90],[14,142,46,174,6,134,38,166],[206,78,238,110,198,70,230,102],[62,190,30,158,54,182,22,150],[254,126,222,94,246,118,214,86]],d=imgdata.data,w=imgdata.width,h=imgdata.height,r=new Array((w+7>>3)*h),n=0,p=0,q=0,t=128,e=new Array(),e1,e2,b,v,f,i,j;if(s==1){i=w;while(i--){e.push(0)}}for(j=0;j<h;j++){e1=0;e2=0;i=0;while(i<w){b=i&7;if(s==0){t=m8[j&7][b]}v=Math.pow(((d[p++]*0.29891+d[p++]*0.58661+d[p++]*0.11448)*d[p]/255+255-d[p++])/255,1/g)*255|0;if(s==1){v+=e[i]+e1>>4;f=v-(v<t?0:255);if(i>0){e[i-1]+=f}e[i]=f*7+e2;e1=f*5;e2=f*3}if(v<t){n|=128>>b}i++;if(b==7||i==w){r[q++]=x(n==16?32:n);n=0}}}return r.join("")}function toGrayImage(imgdata,g){var x=String.fromCharCode,m4=[[0,9,2,11],[13,4,15,6],[3,12,1,10],[16,7,14,5]],thermal=[0,7,13,19,23,27,31,35,40,44,49,52,54,55,57,59,61,62,64,66,67,69,70,70,71,72,73,74,75,76,77,78,79,80,81,82,83,83,84,85,86,86,87,88,88,89,90,90,91,91,92,93,93,94,94,95,96,96,97,98,98,99,99,100,101,101,102,102,103,103,104,104,105,105,106,106,107,107,108,108,109,109,110,110,111,111,112,112,112,113,113,114,114,115,115,116,116,117,117,118,118,119,119,120,120,120,121,121,122,122,123,123,123,124,124,125,125,125,126,126,127,127,127,128,128,129,129,130,130,130,131,131,132,132,132,133,133,134,134,135,135,135,136,136,137,137,137,138,138,139,139,139,140,140,141,141,141,142,142,143,143,143,144,144,145,145,146,146,146,147,147,148,148,148,149,149,150,150,150,151,151,152,152,152,153,153,154,154,155,155,155,156,156,157,157,158,158,159,159,160,160,161,161,161,162,162,163,163,164,164,165,165,166,166,166,167,167,168,168,169,169,170,170,171,171,172,173,173,174,175,175,176,177,178,178,179,180,180,181,182,182,183,184,184,185,186,186,187,189,191,193,195,198,200,202,255],d=imgdata.data,w=imgdata.width,h=imgdata.height,r=new Array((w+1>>1)*h),n=0,p=0,q=0,b,v,v1,i,j;for(j=0;j<h;j++){i=0;while(i<w){b=i&1;v=thermal[Math.pow(((d[p++]*0.29891+d[p++]*0.58661+d[p++]*0.11448)*d[p]/255+255-d[p++])/255,1/g)*255|0];v1=v/17|0;if(m4[j&3][i&3]<v%17){v1++}n|=v1<<((1-b)<<2);i++;if(b==1||i==w){r[q++]=x(n);n=0}}}return r.join("")}function escapeMarkup(s){var markup=/[<>&\'"\\t\\n\\r]/g;if(markup.test(s)){s=s.replace(markup,function(c){var r="";switch(c){case"<":r="&lt;";break;case">":r="&gt;";break;case"&":r="&amp;";break;case"\'":r="&apos;";break;case\'"\':r="&quot;";break;case"\\t":r="&#9;";break;case"\\n":r="&#10;";break;case"\\r":r="&#13;";break;default:break}return r})}return s}function escapeControl(s){var control=/[\\\\\\x00-\\x1f\\x7f-\\xff]/g;if(control.test(s)){s=s.replace(control,function(c){return(c=="\\\\")?"\\\\\\\\":"\\\\x"+("0"+c.charCodeAt(0).toString(16)).slice(-2)})}return s}var regexFont=/^(font_[abc]|special_[ab])$/,regexAlign=/^(left|center|right)$/,regexColor=/^(none|color_[1-4])$/,regexFeed=/^(peeling|cutting|current_tof|next_tof)$/,regexMode=/^(mono|gray16)$/,regexBarcode=/^(upc_[ae]|[ej]an13|[ej]an8|code(39|93|128)|itf|codabar|gs1_128|gs1_databar_(omnidirectional|truncated|limited|expanded))$/,regexHri=/^(none|above|below|both)$/,regexSymbol=/^(pdf417_(standard|truncated)|qrcode_model_[12]|maxicode_mode_[2-6]|gs1_databar_(stacked(_omnidirectional)?|expanded_stacked))$/,regexLevel=/^(level_[0-8lmqh]|default)$/,regexLine=/^(thin|medium|thick)(_double)?$/,regexDirection=/^(left_to_right|bottom_to_top|right_to_left|top_to_bottom)$/,regexCut=/^(no_feed|feed|reserve)$/,regexDrawer=/^drawer_[12]$/,regexPulse=/^pulse_[1-5]00$/,regexPattern=/^(none|pattern_[a-e]|error|paper_end)$/;function getEnumAttr(name,value,regex){if(!regex.test(value)){throw new Error(\'Parameter "\'+name+\'" is invalid\')}return" "+name+\'="\'+value+\'"\'}function getBoolAttr(name,value){return" "+name+\'="\'+!!value+\'"\'}function getIntAttr(name,value,min,max){if(isNaN(value)||value<min||value>max){throw new Error(\'Parameter "\'+name+\'" is invalid\')}return" "+name+\'="\'+value+\'"\'}function getUByteAttr(name,value){return getIntAttr(name,value,0,255)}function getUShortAttr(name,value){return getIntAttr(name,value,0,65535)}function ePOSPrint(address){this.address=address;this.enabled=false;this.interval=3000;this.status=0;this.onreceive=null;this.onerror=null;this.onstatuschange=null;this.ononline=null;this.onoffline=null;this.onpoweroff=null;this.oncoverok=null;this.oncoveropen=null;this.onpaperok=null;this.onpaperend=null;this.onpapernearend=null;this.ondrawerclosed=null;this.ondraweropen=null;this.ASB_NO_RESPONSE=1;this.ASB_PRINT_SUCCESS=2;this.ASB_DRAWER_KICK=4;this.ASB_OFF_LINE=8;this.ASB_COVER_OPEN=32;this.ASB_PAPER_FEED=64;this.ASB_WAIT_ON_LINE=256;this.ASB_PANEL_SWITCH=512;this.ASB_MECHANICAL_ERR=1024;this.ASB_AUTOCUTTER_ERR=2048;this.ASB_UNRECOVER_ERR=8192;this.ASB_AUTORECOVER_ERR=16384;this.ASB_RECEIPT_NEAR_END=131072;this.ASB_RECEIPT_END=524288;this.ASB_BUZZER=16777216;this.ASB_WAIT_REMOVE_LABEL=16777216;this.ASB_NO_LABEL=67108864;this.ASB_SPOOLER_IS_STOPPED=2147483648}ePOSPrint.prototype.open=function(){if(!this.enabled){this.enabled=true;this.status=this.ASB_DRAWER_KICK;this.send()}};ePOSPrint.prototype.close=function(){this.enabled=false;if(this.timeoutid){clearTimeout(this.timeoutid);delete this.timeoutid}};ePOSPrint.prototype.send=function(request){var args=arguments.length,address=this.address,epos=this,soap,xhr,res,success,code,status;if(args<1){request=new ePOSBuilder().toString()}else{if(args>1){address=request;request=arguments[1]}}soap=\'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>\'+request+"</s:Body></s:Envelope>";if(window.XMLHttpRequest){xhr=new XMLHttpRequest();if(!("withCredentials" in xhr)&&window.XDomainRequest){xhr=new XDomainRequest();xhr.open("POST",address,true);xhr.onload=function(){res=xhr.responseText;if(/response/.test(res)){success=/success\\s*=\\s*"\\s*(1|true)\\s*"/.test(res);res.match(/code\\s*=\\s*"\\s*(\\S*)\\s*"/);code=RegExp.$1;res.match(/status\\s*=\\s*"\\s*(\\d+)\\s*"/);status=parseInt(RegExp.$1);if(args>0){fireReceiveEvent(epos,success,code,status)}else{fireStatusEvent(epos,status)}}else{if(args>0){fireErrorEvent(epos,0,xhr.responseText)}else{fireStatusEvent(epos,epos.ASB_NO_RESPONSE)}}if(args<1){updateStatus(epos)}};xhr.onerror=function(){if(args>0){fireErrorEvent(epos,0,xhr.responseText)}else{fireStatusEvent(epos,epos.ASB_NO_RESPONSE);updateStatus(epos)}};xhr.onprogress=function(){};xhr.ontimeout=xhr.onerror;xhr.send(soap)}else{xhr.open("POST",address,true);xhr.setRequestHeader("Content-Type","text/xml; charset=utf-8");xhr.setRequestHeader("If-Modified-Since","Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("SOAPAction",\'""\');xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200&&xhr.responseXML){res=xhr.responseXML.getElementsByTagName("response");if(res.length>0){success=/^(1|true)$/.test(res[0].getAttribute("success"));code=res[0].getAttribute("code");status=parseInt(res[0].getAttribute("status"));if(args>0){fireReceiveEvent(epos,success,code,status)}else{fireStatusEvent(epos,status)}}else{if(args>0){fireErrorEvent(epos,xhr.status,xhr.responseText)}else{fireStatusEvent(epos,epos.ASB_NO_RESPONSE)}}}else{if(args>0){fireErrorEvent(epos,xhr.status,xhr.responseText)}else{fireStatusEvent(epos,epos.ASB_NO_RESPONSE)}}if(args<1){updateStatus(epos)}}};xhr.send(soap)}}else{throw new Error("XMLHttpRequest is not supported")}};function fireReceiveEvent(epos,success,code,status){if(epos.onreceive){epos.onreceive({success:success,code:code,status:status})}}function fireStatusEvent(epos,status){var diff;if(status==0||status==epos.ASB_NO_RESPONSE){status=epos.status|epos.ASB_NO_RESPONSE}diff=epos.status==epos.ASB_DRAWER_KICK?~0:epos.status^status;epos.status=status;if(diff&&epos.onstatuschange){epos.onstatuschange(status)}if(diff&(epos.ASB_NO_RESPONSE|epos.ASB_OFF_LINE)){if(status&epos.ASB_NO_RESPONSE){if(epos.onpoweroff){epos.onpoweroff()}}else{if(status&epos.ASB_OFF_LINE){if(epos.onoffline){epos.onoffline()}}else{if(epos.ononline){epos.ononline()}}}}if(diff&epos.ASB_COVER_OPEN){if(status&epos.ASB_NO_RESPONSE){}else{if(status&epos.ASB_COVER_OPEN){if(epos.oncoveropen){epos.oncoveropen()}}else{if(epos.oncoverok){epos.oncoverok()}}}}if(diff&(epos.ASB_RECEIPT_END|epos.ASB_RECEIPT_NEAR_END)){if(status&epos.ASB_NO_RESPONSE){}else{if(status&epos.ASB_RECEIPT_END){if(epos.onpaperend){epos.onpaperend()}}else{if(status&epos.ASB_RECEIPT_NEAR_END){if(epos.onpapernearend){epos.onpapernearend()}}else{if(epos.onpaperok){epos.onpaperok()}}}}}if(diff&epos.ASB_DRAWER_KICK){if(status&epos.ASB_NO_RESPONSE){}else{if(status&epos.ASB_DRAWER_KICK){if(epos.ondrawerclosed){epos.ondrawerclosed()}}else{if(epos.ondraweropen){epos.ondraweropen()}}}}}function fireErrorEvent(epos,status,responseText){if(epos.onerror){epos.onerror({status:status,responseText:responseText})}}function updateStatus(epos){var delay=epos.interval;if(epos.enabled){if(isNaN(delay)||delay<1000){delay=3000}epos.timeoutid=setTimeout(function(){delete epos.timeoutid;if(epos.enabled){epos.send()}},delay)}}function CanvasPrint(address){this.address=address;this.halftone=0;this.brightness=1;this.MODE_MONO="mono";this.MODE_GRAY16="gray16";this.HALFTONE_DITHER=0;this.HALFTONE_ERROR_DIFFUSION=1;this.HALFTONE_THRESHOLD=2}CanvasPrint.prototype=new ePOSPrint();CanvasPrint.prototype.constructor=CanvasPrint;CanvasPrint.prototype.print=function(canvas,cut,mode){var address=this.address,builder=new ePOSBuilder(),context,width,height;if(!canvas.getContext){address=canvas;canvas=cut;cut=mode;mode=this.MODE_MONO}if(!canvas.getContext){throw new Error("Canvas is not supported")}context=canvas.getContext("2d");width=canvas.getAttribute("width");height=canvas.getAttribute("height");builder.halftone=this.halftone;builder.brightness=this.brightness;builder.addImage(context,0,0,width,height,builder.COLOR_1,mode);if(cut){builder.addCut(builder.CUT_FEED)}this.send(address,builder.toString())};if(!window.epson){window.epson={}}window.epson.ePOSBuilder=ePOSBuilder;window.epson.ePOSPrint=ePOSPrint;window.epson.CanvasPrint=CanvasPrint})(window);
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>20596</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_jquery
erp5_accounting
\ No newline at end of file
Template for the invoice on EPSON Printer
\ No newline at end of file
lingnan
\ No newline at end of file
1
\ No newline at end of file
erp5_printer | View
\ No newline at end of file
erp5_printer
\ No newline at end of file
erp5_printer
\ No newline at end of file
5.4.7
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment