Commit 37a6790b authored by eicom's avatar eicom

- working now

parent 2ab9fd38
......@@ -52,6 +52,7 @@ namespace eval im_ubl {
} {
set export_path [parameter::get_from_package_key -package_key "intranet-ubl" -parameter "UblExportPathUnix" -default "/web/projop/filestorage/ubl"]
set converter_proc [parameter::get_from_package_key -package_key "intranet-ubl" -parameter "UblExportConverterProc" -default "invoice2ubl"]
set max_invoices [parameter::get_from_package_key -package_key "intranet-ubl" -parameter "UblExportMaxInvoices" -default 500]
set invoices_sql "
select i.invoice_id,
......@@ -64,7 +65,7 @@ namespace eval im_ubl {
and c.cost_type_id = [im_cost_type_invoice]
and c.ubl_exported_p = 'f'
order by invoice_id DESC
LIMIT 3
LIMIT :max_invoices
"
set files_exported 0
......@@ -420,6 +421,7 @@ namespace eval im_ubl {
set invoice_items_sql "
select
i.*,
i.item_id as invoice_item_id,
p.*,
im_category_from_id(i.item_type_id) as item_type,
im_category_from_id(i.item_uom_id) as item_uom,
......@@ -453,17 +455,17 @@ namespace eval im_ubl {
<cac:BuyersLineID>$ctr</cac:BuyersLineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>$item_name</cbc:Description>
<cbc:Description>[ns_quotehtml $item_name]</cbc:Description>
<cac:BuyersItemIdentification>
<cac:ID>$ctr</cac:ID>
<cac:ID>$invoice_item_id</cac:ID>
</cac:BuyersItemIdentification>
<cac:SellersItemIdentification>
<cac:ID>32145-12</cac:ID>
<cac:ID>$invoice_item_id</cac:ID>
</cac:SellersItemIdentification>
<cac:BasePrice>
<cbc:PriceAmount amountCurrencyCodeListVersionID=\"0.3\"
amountCurrencyID=\"$currency\">$price_per_unit_pretty</cbc:PriceAmount>
amountCurrencyID=\"$currency\">$price_per_unit_pretty
</cbc:PriceAmount>
</cac:BasePrice>
</cac:Item>
</cac:${document_type}Line>"
......
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