Compare commits

..

63 Commits

Author SHA1 Message Date
308252215f padding doc 2026-04-26 19:19:41 +02:00
7965b22954 padding acc 2026-04-26 15:28:35 +02:00
8ae2c7ca9c padding acc 2026-04-26 15:11:28 +02:00
16151381cc padding acc 2026-04-26 14:59:13 +02:00
4db0395a11 padding acc 2026-04-26 14:56:51 +02:00
fbfa73110f padding acc 2026-04-26 14:35:07 +02:00
9544418897 padding 2026-04-26 11:38:38 +02:00
e40a32e796 padding 2026-04-26 11:30:59 +02:00
530f2f9d97 padding 2026-04-26 10:51:06 +02:00
9879926f08 OS template account 2026-04-23 21:43:03 +02:00
04e9d7dc03 Fee FI bug 2026-04-23 14:22:24 +02:00
7a123b1af6 bug PL qt double * fee rate 2026-04-23 14:07:42 +02:00
a2b053c565 COO 2026-04-23 12:44:33 +02:00
6018429369 COO 2026-04-23 12:34:15 +02:00
4d4e7ab625 COO 2026-04-23 12:29:43 +02:00
68ce1f3a62 proforma adj 2026-04-23 11:10:05 +02:00
d8a56637c9 Bank accounts 2026-04-23 10:59:44 +02:00
a1486175f2 proforma template 2026-04-23 10:46:36 +02:00
228ee07a9c Add Our bank account 2026-04-23 10:15:20 +02:00
036a2801e5 COO report 2026-04-22 21:39:03 +02:00
c2838dcfd3 COO report 2026-04-22 21:26:55 +02:00
6e26f178ce coo report 2026-04-22 21:22:10 +02:00
4458871423 add COO 2026-04-22 21:09:54 +02:00
99782b5b0e Add packing list in account invoice 2026-04-22 20:36:14 +02:00
d09d183cdc Report name 2026-04-22 20:06:48 +02:00
ec45440400 Report name 2026-04-22 19:57:43 +02:00
edb23b008c patch lot sur shipment 2026-04-21 22:06:09 +02:00
fca279a038 bug DI 2026-04-21 21:21:29 +02:00
512862113a bug automation 2026-04-21 21:05:32 +02:00
1ed79a2363 BL nb 2026-04-21 19:39:49 +02:00
05a75f000a DI 2026-04-21 19:24:37 +02:00
77a5366622 DI 2026-04-21 19:19:01 +02:00
c203e1b300 DI 2026-04-21 19:12:38 +02:00
22ad8547e4 DI 2026-04-21 19:01:35 +02:00
2ea2165653 DI 2026-04-21 18:53:44 +02:00
5e72d4f98d document_incoming result_notes 2026-04-21 18:49:47 +02:00
b1680cc96c Add date + result_notes in document_incoming 2026-04-21 18:40:51 +02:00
cfb719a7da cron faircot 2026-04-21 14:59:31 +02:00
9e4a12605c cron faircot 2026-04-21 14:51:26 +02:00
4013f9d74c Correction cron faircot 2026-04-21 14:33:12 +02:00
280cff5fdb Pnl exclude Mark to finished & price on change 2026-04-21 13:22:41 +02:00
897c6f6824 Add constraint delete matched contracts 2026-04-20 10:29:33 +02:00
8906f00d36 Notes 2026-04-10 14:40:06 +02:00
29a719c117 template 2026-04-10 09:15:38 +02:00
d71257720e invoice seq nb 2026-04-10 08:40:53 +02:00
aee9c3277e Add bank to template 2026-04-10 08:24:59 +02:00
b68f475e22 Pricing manual 2026-04-10 07:52:59 +02:00
90eab73430 price component 2026-04-09 22:46:32 +02:00
472806ef06 pricing manuel 2026-04-09 22:38:48 +02:00
0def187750 Add manual pricing 2026-04-09 22:24:49 +02:00
229b6037fb unit correction 2026-04-09 21:55:40 +02:00
8a90216357 net gross 2026-04-09 21:46:28 +02:00
4bbd7a5e76 bug template 2026-04-09 21:38:26 +02:00
9c8d7f11ae kg lbs 2026-04-09 21:23:27 +02:00
b39607d987 del period 2026-04-09 20:58:47 +02:00
65482b4a8b bug Th qt 2026-04-09 20:31:24 +02:00
8b9787d4c0 bug th qt 2026-04-09 20:23:09 +02:00
a1ab7dec82 ICT bulk 2026-04-09 19:46:08 +02:00
5ae8af84fb Add note for bot 2026-04-08 17:15:11 +02:00
c90b14fcc1 Modification on Insurance template 2026-04-08 15:38:26 +02:00
e9ff9c76ab Add Bill template 2026-04-08 11:24:23 +02:00
63d8266a9c Add Bill template 2026-04-08 10:26:25 +02:00
add4cdc137 Add Packing list template 2026-04-08 10:08:17 +02:00
61 changed files with 9601 additions and 1114 deletions

View File

@@ -52,6 +52,20 @@ Guide rapide pour les agents qui codent dans ce repository.
- Pour les templates shipment, ne pas supposer qu'une variable locale comme `shipment` sera definie partout dans Genshi, surtout dans les headers/footers; preferer `records[0]....` ou des placeholders alignes sur le scope reel du report.
- Dans `purchase_trade`, pour remonter d'une facture vers shipment, pro forma, freight ou autres donnees logistiques, privilegier le lot physique comme pont entre `purchase.line`, `sale.line` et shipment.
- Pour `FREIGHT VALUE`, ne pas lire un champ direct sur la facture: retrouver le fee de shipment (`shipment_in`) dont le produit est `Maritime freight`, puis utiliser `fee.get_amount()`.
- Rappels session templates (2026-04-08):
- `insurance.fodt`: le texte "insured for account of" doit afficher la compagnie courante (shipment.company.party), pas le client.
- `insurance.fodt`: exposer des proprietes Python `report_*` sur `stock.shipment.in` pour les montants (incoming moves) et les zones client-specifiques.
- `insurance.fodt`: "Amount insured" suit la regle metier 110% du montant incoming (base calculee via lot -> purchase.line.unit_price * quantite courante convertie).
- `insurance.fodt`: zone "Contact the following surveyor" alimentee par une propriete dediee, avec champ `surveyor` (party.party) cote shipment.
- `packing_list.fodt`: date en haut a droite = date du jour; unites Net/Gross = unite de `purchase.line`.
- `bill.fodt` (sale): la 2eme date doit etre une vraie maturity date (depuis `invoice.lines_to_pay.maturity_date`), pas `payment_term.rec_name`.
- `bill.fodt` (sale): le montant en lettres doit provenir du montant du bill (facture/total), pas du `unit_price` de ligne.
- Quand un template affiche les placeholders en brut, verifier que les champs sont bien des placeholders Relatorio dans le XML (pas du texte litteral).
- Eviter les apostrophes echappees style `\'` dans placeholders; preferer `"` et `'`.
## 4.bis) Memo templates de session
- Voir aussi `notes/template_business_rules.md` pour le recap detaille (business rules + decisions templates de la session).
## 5) Workflow de modification (obligatoire)
@@ -110,3 +124,18 @@ Toujours fournir:
3. Proposer le patch minimal.
4. Implementer + tester cible.
5. Rendre avec le contrat de sortie (section 8).
- Rappels session 2026-04-09:
- `invoice_ict.fodt` / `invoice_ict_final.fodt`: poids et unites depuis `lot.qt.hist` / `lot_unit_line`, priorite lots `physic`, sinon lot `virtual` unique.
- `invoice_ict.fodt` / `invoice_ict_final.fodt`: infos shipment depuis les lots reels des lignes facture; ne rien afficher si plusieurs shipments differents.
- `invoice_ict.fodt` / `invoice_ict_final.fodt`: `S/I` = `shipment.reference`; `NB BALES: 0` => `Unchanged` sur le final.
- `invoice_ict.fodt` / `invoice_ict_final.fodt`: quantites uniformisees a `2` decimales; conversion `LBS` via UoM, jamais via un facteur fixe aveugle.
- `invoice_ict.fodt` / `invoice_ict_final.fodt`: si plusieurs lignes reutilisent le meme lot, les lignes detaillees suivent la quantite facturee convertie, mais le `GROSS` global doit rester le vrai delta historique du lot.
- `sale_ict.fodt`: meme priorite lots; les mots suivent l'unite reelle; le total convertit vers une unite commune, qui est celle du lot virtuel seulement s'il y a un seul lot virtuel sur tout le report.
- `lot.report.r_del_period`: utiliser `sale.line.del_period` pour `lot_s` sans `lot_p`, sinon `purchase.line.del_period`.
- `lot.do_weighing`: `lot_qt` editable et ecrasement direct de `lot.lot_qt`.
- `account.invoice`: `Validate` cree aussi le `account.move` pour les factures client, attribue aussi le `number` a ce stade pour les factures client comme fournisseur; `Post` ne doit plus forcer une fresh session sur ce flux.
- `pricing.pricing`: saisie manuelle autorisee meme sans composant; en manuel, l'utilisateur saisit seulement `Qt` et `Settl. price`; `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` et `eod_price` sont derives automatiquement.
- `pricing.pricing`: en manuel, `fixed_qt` = cumul des `quantity`, `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`, `unfixed_qt` = reste a fixer, `unfixed_qt_price` = `settl_price` de la ligne.
- `pricing.pricing`: `eod_price` reste non editable et calcule en prix moyen pondere; `last=True` gere par groupe `line + component`, choisi sur la `pricing_date` la plus grande.
- `purchase_trade`: `trader` filtre sur `TRADER`, `operator` sur `OPERATOR`; fallback sur `quantity` si `quantity_theorical` est vide dans les quotas/pricings.
- `sale.line` / `purchase.line`: en mode `basis`, sans `price_component`, le `Price` et le `Fix. progress` de la ligne doivent remonter depuis la ligne `Summary` sans component.

10
modules/AGENTS.md Normal file
View File

@@ -0,0 +1,10 @@
# AGENTS.md - Regles globales des modules
Ce guide complete le `AGENTS.md` racine et s'applique a tous les modules sous `modules/`.
## Regles transversales
- Ne pas introduire de `fields.DateTime` dans les modules metier sauf demande explicite et code cible deja base sur ce type.
- Pour afficher une date issue d'un champ technique comme `create_date`, preferer un champ fonctionnel en `fields.Date` plutot qu'un acces direct en vue.
- Si une vue doit afficher une information technique non declaree explicitement sur le modele, ajouter un champ fonctionnel dedie cote Python avant de modifier le XML.

View File

@@ -0,0 +1,15 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
from . import account
def register():
Pool.register(
account.AccountTemplate,
module='account_ch_os', type_='model')
Pool.register(
account.CreateChart,
module='account_ch_os', type_='wizard')

View File

@@ -0,0 +1,27 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool, PoolMeta
class AccountTemplate(metaclass=PoolMeta):
__name__ = 'account.account.template'
class CreateChart(metaclass=PoolMeta):
__name__ = 'account.create_chart'
def default_properties(self, fields):
pool = Pool()
ModelData = pool.get('ir.model.data')
defaults = super().default_properties(fields)
try:
template_id = ModelData.get_id('account_ch_os', 'root')
except KeyError:
return defaults
if self.account.account_template.id == template_id:
defaults['account_receivable'] = self.get_account(
'account_ch_os.acct_110000')
defaults['account_payable'] = self.get_account(
'account_ch_os.acct_200000')
return defaults

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,12 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase
class AccountCHOSTestCase(ModuleTestCase):
'Test Account CH OS module'
module = 'account_ch_os'
del ModuleTestCase

View File

@@ -0,0 +1,6 @@
[tryton]
version=7.2.3
depends:
account
xml:
account_ch_os.xml

View File

@@ -485,7 +485,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
})
cls.__rpc__.update({
'post': RPC(
readonly=False, instantiate=0, fresh_session=True),
readonly=False, instantiate=0, fresh_session=False),
})
@classmethod
@@ -1890,13 +1890,11 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
cls._check_taxes(invoices)
# cls._check_similar(invoices)
invoices_in = cls.browse([i for i in invoices if i.type == 'in'])
cls.set_number(invoices_in)
cls.set_number(invoices)
cls._store_cache(invoices)
moves = []
for invoice in invoices:
if invoice.type == 'in':
move = invoice.get_move()
if move != invoice.move:
invoice.move = move

View File

@@ -8,13 +8,13 @@
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<meta:editing-duration>PT3H16M29S</meta:editing-duration>
<meta:editing-cycles>9</meta:editing-cycles>
<meta:editing-duration>PT3H20M59S</meta:editing-duration>
<meta:editing-cycles>12</meta:editing-cycles>
<dc:date>2026-03-27T07:35:45.157000000</dc:date><meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="61" meta:word-count="210" meta:character-count="2997" meta:non-whitespace-character-count="2429"/></office:meta>
<dc:date>2026-04-10T10:30:16.567000000</dc:date><meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="66" meta:word-count="168" meta:character-count="2416" meta:non-whitespace-character-count="1896"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">28575</config:config-item>
<config:config-item config:name="ViewAreaTop" config:type="long">6879</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">27264</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">13187</config:config-item>
@@ -23,12 +23,12 @@
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">7583</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">33203</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">13275</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">15563</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">28575</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">6879</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">27263</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">41760</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">20064</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
@@ -101,7 +101,7 @@
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">297701</config:config-item>
<config:config-item config:name="Rsid" config:type="int">523469</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">84510</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
@@ -168,19 +168,20 @@
<style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Tahoma" svg:font-family="Tahoma, arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman1" svg:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable"/>
</office:font-face-decls>
<office:styles>
<style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#808080" draw:fill-color="#cfe7f5" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="true"/>
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:font-independent-line-spacing="false">
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman1" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman1" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman1" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="none" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.249cm" style:writing-mode="lr-tb"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman1" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman1" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman1" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
@@ -245,7 +246,7 @@
</style:style>
<style:style style:name="No_20_Spacing" style:display-name="No Spacing" style:family="paragraph">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="start" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false" style:text-autospace="ideograph-alpha" style:vertical-align="auto"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="11pt" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="11pt" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0">
@@ -295,30 +296,35 @@
</style:paragraph-properties>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="Normal" style:family="paragraph">
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit"/>
<style:text-properties fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
</style:style>
<style:style style:name="Default_20_Paragraph_20_Font" style:display-name="Default Paragraph Font" style:family="text"/>
<style:style style:name="Titolo_20_1_20_Carattere" style:display-name="Titolo 1 Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Arial1" fo:font-family="Arial, Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="12pt" fo:language="en" fo:country="US" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-name-asian="Arial1" style:font-family-asian="Arial, Arial" style:font-family-generic-asian="swiss" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:language-asian="en" style:country-asian="US" style:font-weight-asian="bold" style:font-name-complex="Arial1" style:font-family-complex="Arial, Arial" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="Intestazione_20_Carattere" style:display-name="Intestazione Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
<style:text-properties style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="Placeholder_20_Text" style:display-name="Placeholder Text" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties fo:color="#808080" loext:opacity="100%" style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
<style:text-properties fo:color="#808080" loext:opacity="100%" style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Testo_20_fumetto_20_Carattere" style:display-name="Testo fumetto Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Tahoma" fo:font-family="Tahoma, arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="8pt" style:font-name-asian="Tahoma" style:font-family-asian="Tahoma, arial" style:font-family-generic-asian="swiss" style:font-pitch-asian="variable" style:font-size-asian="8pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma, arial" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="PiÃ_a8__20_di_20_pagina_20_Carattere" style:display-name="Piè di pagina Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
<style:text-properties style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Nessuna_20_spaziatura_20_Carattere" style:display-name="Nessuna spaziatura Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Placeholder" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" loext:opacity="100%" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style>
<style:style style:name="Police_20_par_20_dÃ_a9_faut" style:display-name="Police par défaut" style:family="text"/>
<style:style style:name="Default_20_Paragraph_20_Font_20__28_WW_29_" style:display-name="Default Paragraph Font (WW)" style:family="text"/>
<style:style style:name="Police_20_par_20_défaut" style:display-name="Police par défaut" style:family="text"/>
<style:style style:name="Frame" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:background-color="transparent" draw:fill="none" draw:fill-color="#cfe7f5"/>
</style:style>
@@ -664,7 +670,7 @@
</style:style>
<style:style style:name="P21" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P22" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -684,7 +690,7 @@
</style:style>
<style:style style:name="P26" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P27" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -696,7 +702,7 @@
</style:style>
<style:style style:name="P29" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P30" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
@@ -708,7 +714,7 @@
</style:style>
<style:style style:name="P32" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P33" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="end" style:justify-single-word="false" style:writing-mode="lr-tb"/>
@@ -724,7 +730,7 @@
</style:style>
<style:style style:name="P36" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="1pt" fo:language="en" fo:country="US" style:font-size-asian="1pt" style:font-name-complex="Times New Roman" style:font-size-complex="1pt" text:display="none"/>
<style:text-properties fo:font-size="1pt" fo:language="en" fo:country="US" style:font-size-asian="1pt" style:font-name-complex="Times New Roman1" style:font-size-complex="1pt" text:display="none"/>
</style:style>
<style:style style:name="P37" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -759,14 +765,34 @@
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="00022035"/>
</style:style>
<style:style style:name="P44" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" officeooo:paragraph-rsid="000391f3" style:font-size-asian="10pt" style:font-name-complex="Arial1" style:font-size-complex="10pt"/>
<style:style style:name="P44" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P45" style:family="paragraph" style:parent-style-name="footer">
<style:style style:name="P45" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties officeooo:paragraph-rsid="00056da2"/>
</style:style>
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P48" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Arial1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P49" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P50" style:family="paragraph" style:parent-style-name="footer">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="header">
<style:style style:name="P51" style:family="paragraph" style:parent-style-name="header">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="T1" style:family="text">
@@ -790,6 +816,24 @@
<style:style style:name="T7" style:family="text">
<style:text-properties fo:language="fr" fo:country="CH"/>
</style:style>
<style:style style:name="T8" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" fo:font-size="9pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T9" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" fo:font-size="9pt" officeooo:rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T10" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" fo:font-size="9pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T11" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" fo:font-size="9pt" officeooo:rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T12" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-name-complex="Arial"/>
</style:style>
<style:style style:name="T13" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" officeooo:rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-name-complex="Arial"/>
</style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
<style:graphic-properties style:run-through="background" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="top" style:vertical-rel="baseline" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
</style:style>
@@ -3930,7 +3974,7 @@
<text:p text:style-name="P25">Goods description</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau5.A1" office:value-type="string">
<text:p text:style-name="P26">QUANTITY: <text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_lbs, invoice.party.lang) if invoice.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_net, invoice.party.lang) if invoice.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;invoice.report_weight_unit_upper&gt;</text:placeholder>)</text:p>
<text:p text:style-name="P26">QUANTITY: <text:placeholder text:placeholder-type="text">&lt;invoice.report_lbs_display&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;invoice.report_net_display&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;invoice.report_weight_unit_upper&gt;</text:placeholder>)</text:p>
<text:p text:style-name="P26"/>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;invoice.report_description_upper or invoice.report_product_description&gt;</text:placeholder><text:placeholder text:placeholder-type="text">&lt;&apos; CROP &apos; + invoice.report_crop_name if invoice.report_crop_name else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;invoice.report_attributes_name&gt;</text:placeholder></text:p>
@@ -3941,8 +3985,7 @@
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P18"/>
<text:p text:style-name="P18"/>
<text:p text:style-name="P32"><text:placeholder text:placeholder-type="text">&lt;invoice.report_incoterm&gt;</text:placeholder></text:p>
<text:p text:style-name="P29"><text:span text:style-name="T1">ALL DETAILS AND SPECIFICATIONS AS PER</text:span> <text:span text:style-name="T3">BENEFICIARY </text:span></text:p>
<text:p text:style-name="P29"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;invoice.report_incoterm&gt;</text:placeholder></text:span><text:span text:style-name="T3"><text:s/></text:span></text:p>
<text:p text:style-name="P26"/>
<text:p text:style-name="P26"/>
<text:p text:style-name="P12"/>
@@ -3974,10 +4017,10 @@
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;invoice.report_nb_bale&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_gross, invoice.party.lang) if invoice.report_gross != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;invoice.report_gross_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P30"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_net, invoice.party.lang) if invoice.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P30"><text:placeholder text:placeholder-type="text">&lt;invoice.report_net_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P16"/>
@@ -4001,7 +4044,7 @@
<text:p text:style-name="P16">Equivalent to LBS</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau7.A1" office:value-type="string">
<text:p text:style-name="P16"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_lbs, invoice.party.lang) if invoice.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P16"><text:placeholder text:placeholder-type="text">&lt;invoice.report_lbs_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau7.A1" office:value-type="string">
<text:p text:style-name="P20"/>
@@ -4021,8 +4064,11 @@
<text:p text:style-name="P14">FREIGHT VALUE: <text:placeholder text:placeholder-type="text">&lt;invoice.report_freight_currency_symbol&gt;</text:placeholder><text:s/><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_freight_amount, invoice.party.lang) if invoice.report_freight_amount != &apos;&apos; else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"/>
<text:p text:style-name="P17">WE CERTIFY THAT THE MERCHANDISE IS OF <text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;invoice.report_origin or &apos;&apos;&gt;</text:placeholder></text:span><text:s/>ORIGIN</text:p>
<text:p text:style-name="P31"><text:soft-page-break/>L/C NUMBER </text:p>
<text:p text:style-name="P31"/>
<text:p text:style-name="P17"/>
<text:p text:style-name="P47"><text:span text:style-name="T12">B</text:span><text:span text:style-name="T13">ANK</text:span><text:span text:style-name="T12">: EFG BANK SA</text:span></text:p>
<text:p text:style-name="P45">IBAN : CH8808667007168111027</text:p>
<text:p text:style-name="P45">SwifT Code: EFGBCHZZ</text:p>
<text:p text:style-name="P48"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
<text:p text:style-name="P34"><text:s text:c="3"/><text:placeholder text:placeholder-type="text">&lt;format_currency(invoice.total_amount, invoice.party.lang, invoice.currency)&gt;</text:placeholder><text:s/></text:p>
@@ -4034,6 +4080,7 @@
<text:p text:style-name="P11"/>
<table:table table:name="Tableau9" table:style-name="Tableau9">
<table:table-column table:style-name="Tableau9.A"/>
<text:soft-page-break/>
<table:table-row table:style-name="Tableau9.1">
<table:table-cell table:style-name="Tableau9.A1" office:value-type="string">
<text:p text:style-name="P21">NET LANDED WEIGHTS, ACTUAL TARE, NO FRANCHISE</text:p>
@@ -4059,7 +4106,7 @@
<text:p text:style-name="P13">Controller Name</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau10.A1" office:value-type="string">
<text:p text:style-name="P25"><text:placeholder text:placeholder-type="text">&lt;invoice.report_si_number&gt;</text:placeholder></text:p>
<text:p text:style-name="P25"><text:placeholder text:placeholder-type="text">&lt;invoice.report_si_reference&gt;</text:placeholder></text:p>
<text:p text:style-name="P25"/>
<text:p text:style-name="P25"><text:placeholder text:placeholder-type="text">&lt;invoice.report_controller_name&gt;</text:placeholder></text:p>
</table:table-cell>

View File

@@ -4,31 +4,31 @@
<office:meta>
<dc:title>Credit / Debit Note</dc:title>
<meta:initial-creator>willen</meta:initial-creator>
<meta:creation-date>2018-12-09T16:20:00</meta:creation-date>
<dc:date>2026-03-27T08:01:16.333000000</dc:date>
<meta:print-date>2007-08-28T18:19:00</meta:print-date>
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<meta:editing-duration>PT3H13M14S</meta:editing-duration>
<meta:editing-cycles>13</meta:editing-cycles>
<meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="68" meta:word-count="226" meta:character-count="3098" meta:non-whitespace-character-count="2521"/></office:meta>
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<meta:editing-duration>PT3H14M14S</meta:editing-duration>
<meta:editing-cycles>15</meta:editing-cycles>
<dc:date>2026-04-10T09:14:51.284000000</dc:date><meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="67" meta:word-count="175" meta:character-count="2499" meta:non-whitespace-character-count="1973"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">9437</config:config-item>
<config:config-item config:name="ViewAreaTop" config:type="long">17727</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">27264</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">13242</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">13187</config:config-item>
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">10084</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">16424</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">5639</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">26935</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">9437</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">17727</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">27263</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">22677</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">30912</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
@@ -101,11 +101,11 @@
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">665618</config:config-item>
<config:config-item config:name="Rsid" config:type="int">890727</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">84510</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">true</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
@@ -114,7 +114,7 @@
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">true</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
@@ -131,6 +131,7 @@
<config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">false</config:config-item>
<config:config-item config:name="HyphenateURLs" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotBreakWrappedTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
<config:config-item config:name="DropCapPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
@@ -158,16 +159,20 @@
</office:script>
</office:scripts>
<office:font-face-decls>
<style:font-face style:name="0" svg:font-family="0" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Arial1" svg:font-family="Arial, Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Calibri1" svg:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="FuturaBookATT" svg:font-family="FuturaBookATT, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
<style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
<style:font-face style:name="Lucida Sans2" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Tahoma" svg:font-family="Tahoma, arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman1" svg:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable"/>
</office:font-face-decls>
<office:styles>
<style:default-style style:family="graphic">
@@ -175,11 +180,11 @@
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman1" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman1" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman1" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="none" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.249cm" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="none" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.249cm" style:writing-mode="lr-tb"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman1" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman1" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman1" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
@@ -193,21 +198,21 @@
</style:style>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
<style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
<style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans2" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
</style:style>
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
</style:style>
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
<style:text-properties style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
<style:text-properties style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
</style:style>
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
<style:text-properties style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
<style:text-properties style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="heading_20_1" style:display-name="heading 1" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Standard" style:default-outline-level="1" style:list-style-name="">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" fo:keep-with-next="always"/>
@@ -244,7 +249,7 @@
</style:style>
<style:style style:name="No_20_Spacing" style:display-name="No Spacing" style:family="paragraph">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="start" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false" style:text-autospace="ideograph-alpha" style:vertical-align="auto"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="11pt" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="11pt" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0">
@@ -277,29 +282,70 @@
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" text:number-lines="false" text:line-number="0"/>
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="Normal1" style:family="paragraph">
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:writing-mode="lr-tb"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="12pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="0" style:font-family-asian="0" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="roman" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
</style:style>
<style:style style:name="header1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="0.423cm">
<style:tab-stops>
<style:tab-stop style:position="8.001cm" style:type="center"/>
<style:tab-stop style:position="16.002cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="footer1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="0.423cm">
<style:tab-stops>
<style:tab-stop style:position="8.001cm" style:type="center"/>
<style:tab-stop style:position="16.002cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="footer2" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="0.423cm">
<style:tab-stops>
<style:tab-stop style:position="8.001cm" style:type="center"/>
<style:tab-stop style:position="16.002cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="header2" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="0.423cm">
<style:tab-stops>
<style:tab-stop style:position="8.001cm" style:type="center"/>
<style:tab-stop style:position="16.002cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="Default_20_Paragraph_20_Font" style:display-name="Default Paragraph Font" style:family="text"/>
<style:style style:name="Titolo_20_1_20_Carattere" style:display-name="Titolo 1 Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Arial1" fo:font-family="Arial, Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="12pt" fo:language="en" fo:country="US" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-name-asian="Arial1" style:font-family-asian="Arial, Arial" style:font-family-generic-asian="swiss" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:language-asian="en" style:country-asian="US" style:font-weight-asian="bold" style:font-name-complex="Arial1" style:font-family-complex="Arial, Arial" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="Intestazione_20_Carattere" style:display-name="Intestazione Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
<style:text-properties style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="Placeholder_20_Text" style:display-name="Placeholder Text" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties fo:color="#808080" loext:opacity="100%" style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
<style:text-properties fo:color="#808080" loext:opacity="100%" style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Testo_20_fumetto_20_Carattere" style:display-name="Testo fumetto Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Tahoma" fo:font-family="Tahoma, arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="8pt" style:font-name-asian="Tahoma" style:font-family-asian="Tahoma, arial" style:font-family-generic-asian="swiss" style:font-pitch-asian="variable" style:font-size-asian="8pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma, arial" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="PiÃ_a8__20_di_20_pagina_20_Carattere" style:display-name="Piè di pagina Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Times New Roman" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
<style:text-properties style:font-name="Times New Roman1" fo:font-family="&apos;Times New Roman&apos;, Times" style:font-family-generic="roman" style:font-pitch="variable" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:font-name-complex="Times New Roman1" style:font-family-complex="&apos;Times New Roman&apos;, Times" style:font-family-generic-complex="roman" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Nessuna_20_spaziatura_20_Carattere" style:display-name="Nessuna spaziatura Carattere" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font">
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable"/>
<style:text-properties style:font-name="Calibri1" fo:font-family="Calibri, &apos;Century Gothic&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:language="it" fo:country="IT" style:font-name-asian="Times New Roman1" style:font-family-asian="&apos;Times New Roman&apos;, Times" style:font-family-generic-asian="roman" style:font-pitch-asian="variable" style:language-asian="en" style:country-asian="US" style:font-name-complex="Calibri1" style:font-family-complex="Calibri, &apos;Century Gothic&apos;" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable"/>
</style:style>
<style:style style:name="Placeholder" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" loext:opacity="100%" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style>
<style:style style:name="Police_20_par_20_dÃ_a9_faut" style:display-name="Police par défaut" style:family="text"/>
<style:style style:name="Police_20_par_20_défaut" style:display-name="Police par défaut" style:family="text"/>
<style:style style:name="Default_20_Paragraph_20_Font_20__28_WW_29_" style:display-name="Default Paragraph Font (WW)" style:family="text"/>
<style:style style:name="Default_20_Paragraph_20_Font1" style:display-name="Default Paragraph Font1" style:family="text"/>
<style:style style:name="Frame" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:background-color="transparent" draw:fill="none" draw:fill-color="#cfe7f5"/>
</style:style>
@@ -396,6 +442,9 @@
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
<style:default-page-layout>
<style:page-layout-properties style:writing-mode="lr-tb" style:layout-grid-standard-mode="true"/>
</style:default-page-layout>
<loext:theme loext:name="Office Theme">
<loext:theme-colors loext:name="LibreOffice">
<loext:color loext:name="dark1" loext:color="#000000"/>
@@ -642,11 +691,11 @@
</style:style>
<style:style style:name="P21" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P22" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" officeooo:paragraph-rsid="000681ce" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" officeooo:paragraph-rsid="000681ce" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P23" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -666,11 +715,11 @@
</style:style>
<style:style style:name="P27" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P28" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" officeooo:paragraph-rsid="000681ce" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="US" officeooo:paragraph-rsid="000681ce" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P29" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -682,7 +731,7 @@
</style:style>
<style:style style:name="P31" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P32" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
@@ -694,7 +743,7 @@
</style:style>
<style:style style:name="P34" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:text-properties fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P35" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="end" style:justify-single-word="false" style:writing-mode="lr-tb"/>
@@ -710,7 +759,7 @@
</style:style>
<style:style style:name="P38" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="1pt" fo:language="en" fo:country="US" style:font-size-asian="1pt" style:font-name-complex="Times New Roman" style:font-size-complex="1pt" text:display="none"/>
<style:text-properties fo:font-size="1pt" fo:language="en" fo:country="US" style:font-size-asian="1pt" style:font-name-complex="Times New Roman1" style:font-size-complex="1pt" text:display="none"/>
</style:style>
<style:style style:name="P39" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
@@ -745,14 +794,25 @@
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="00022035"/>
</style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Normal1">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
</style:style>
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="footer">
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="Normal1">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P48" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Calibri" fo:font-size="10pt" fo:language="fr" fo:country="CH" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P49" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Arial1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P50" style:family="paragraph" style:parent-style-name="footer">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="P48" style:family="paragraph" style:parent-style-name="header">
<style:style style:name="P51" style:family="paragraph" style:parent-style-name="header">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="T1" style:family="text">
@@ -776,11 +836,32 @@
<style:style style:name="T7" style:family="text">
<style:text-properties fo:language="fr" fo:country="CH"/>
</style:style>
<style:style style:name="T8" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%"/>
</style:style>
<style:style style:name="T9" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" fo:font-size="9pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T10" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" fo:font-size="10pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="T11" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Arial" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-name-complex="Arial"/>
</style:style>
<style:style style:name="T12" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" fo:font-size="9pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="9pt" style:font-name-complex="Arial" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T13" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" fo:font-size="10pt" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="T14" style:family="text">
<style:text-properties fo:color="#000000" loext:opacity="100%" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-name-complex="Arial"/>
</style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
<style:graphic-properties style:run-through="background" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="top" style:vertical-rel="baseline" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
</style:style>
<style:page-layout style:name="pm1">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.75cm" fo:margin-bottom="1.499cm" fo:margin-left="2cm" fo:margin-right="2cm" fo:border="none" fo:padding="0cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.75cm" fo:margin-bottom="1.499cm" fo:margin-left="2cm" fo:margin-right="2cm" fo:border="none" fo:padding="0cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="true" style:layout-grid-display="true" style:layout-grid-base-width="0.37cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties>
<style:header-style>
@@ -3916,7 +3997,7 @@
<text:p text:style-name="P26">Goods description</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau5.A1" office:value-type="string">
<text:p text:style-name="P27">QUANTITY: <text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_lbs, invoice.party.lang) if invoice.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_net, invoice.party.lang) if invoice.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;invoice.report_weight_unit_upper&gt;</text:placeholder>)</text:p>
<text:p text:style-name="P27">QUANTITY: <text:placeholder text:placeholder-type="text">&lt;invoice.report_lbs_display&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;invoice.report_net_display&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;invoice.report_weight_unit_upper&gt;</text:placeholder>)</text:p>
<text:p text:style-name="P27"/>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;invoice.report_description_upper or invoice.report_product_description&gt;</text:placeholder><text:placeholder text:placeholder-type="text">&lt;&apos; CROP &apos; + invoice.report_crop_name if invoice.report_crop_name else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;invoice.report_attributes_name&gt;</text:placeholder></text:p>
@@ -3956,13 +4037,13 @@
</table:table-row>
<table:table-row table:style-name="Tableau6.1">
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;invoice.report_nb_bale&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;invoice.report_cndn_nb_bale&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_gross, invoice.party.lang) if invoice.report_gross != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text">&lt;invoice.report_gross_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P32"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_net, invoice.party.lang) if invoice.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P32"><text:placeholder text:placeholder-type="text">&lt;invoice.report_net_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau6.A2" office:value-type="string">
<text:p text:style-name="P16"/>
@@ -3986,7 +4067,7 @@
<text:p text:style-name="P16">Equivalent to LBS</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau7.A1" office:value-type="string">
<text:p text:style-name="P16"><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_lbs, invoice.party.lang) if invoice.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P16"><text:placeholder text:placeholder-type="text">&lt;invoice.report_lbs_display&gt;</text:placeholder><text:s/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau7.A1" office:value-type="string">
<text:p text:style-name="P20"/>
@@ -4003,15 +4084,18 @@
<text:p text:style-name="P14">At <text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"/>
<text:p text:style-name="P14"><text:soft-page-break/>FREIGHT VALUE: <text:placeholder text:placeholder-type="text">&lt;invoice.report_freight_currency_symbol&gt;</text:placeholder><text:s/><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_freight_amount, invoice.party.lang) if invoice.report_freight_amount != &apos;&apos; else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14">FREIGHT VALUE: <text:placeholder text:placeholder-type="text">&lt;invoice.report_freight_currency_symbol&gt;</text:placeholder><text:s/><text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_freight_amount, invoice.party.lang) if invoice.report_freight_amount != &apos;&apos; else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"/>
<text:p text:style-name="P17">WE CERTIFY THAT THE MERCHANDISE IS OF <text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;invoice.report_origin or &apos;&apos;&gt;</text:placeholder></text:span><text:s/>ORIGIN</text:p>
<text:p text:style-name="P33">L/C NUMBER </text:p>
<text:p text:style-name="P33"/>
<text:p text:style-name="P17"/>
<text:p text:style-name="P47" loext:marker-style-name="T8"><text:span text:style-name="T14">BANK: EFG BANK SA</text:span></text:p>
<text:p text:style-name="P47" loext:marker-style-name="T8"><text:span text:style-name="T14">IBAN : CH8808667007168111027</text:span><text:span text:style-name="T14"/></text:p>
<text:p text:style-name="P48">SwifT Code: EFGBCHZZ</text:p>
<text:p text:style-name="P49"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
<text:p text:style-name="P36"><text:s text:c="3"/><text:placeholder text:placeholder-type="text">&lt;format_currency(invoice.total_amount, invoice.party.lang, invoice.currency)&gt;</text:placeholder><text:s/></text:p>
<text:p text:style-name="P24"><text:soft-page-break/></text:p>
<text:p text:style-name="P24"/>
<text:p text:style-name="P35"/>
</table:table-cell>
</table:table-row>
@@ -4019,6 +4103,7 @@
<text:p text:style-name="P11"/>
<table:table table:name="Tableau9" table:style-name="Tableau9">
<table:table-column table:style-name="Tableau9.A"/>
<text:soft-page-break/>
<table:table-row table:style-name="Tableau9.1">
<table:table-cell table:style-name="Tableau9.A1" office:value-type="string">
<text:p text:style-name="P21">NET LANDED WEIGHTS, ACTUAL TARE, NO FRANCHISE</text:p>
@@ -4044,7 +4129,7 @@
<text:p text:style-name="P13">Controller Name</text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau10.A1" office:value-type="string">
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;invoice.report_si_number&gt;</text:placeholder></text:p>
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;invoice.report_si_reference&gt;</text:placeholder></text:p>
<text:p text:style-name="P26"/>
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;invoice.report_controller_name&gt;</text:placeholder></text:p>
</table:table-cell>

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@
import datetime
from decimal import Decimal
from unittest.mock import Mock, patch
from trytond.modules.account_invoice.exceptions import (
PaymentTermValidationError)
@@ -251,5 +252,70 @@ class AccountInvoiceTestCase(
(datetime.date(2012, 1, 14), Decimal('-1.0')),
])
def test_post_rpc_does_not_require_fresh_session(self):
'posting invoices does not force a fresh session'
Invoice = Pool().get('account.invoice')
self.assertFalse(Invoice.__rpc__['post'].fresh_session)
@with_transaction()
def test_validate_invoice_creates_move_for_customer_invoice(self):
'validating customer invoices now creates the account move'
Invoice = Pool().get('account.invoice')
move = Mock()
invoice = Invoice()
invoice.type = 'out'
invoice.move = None
invoice.get_move = Mock(return_value=move)
invoice.do_lot_invoicing = Mock()
move_model = Mock()
with patch.object(Invoice, '_check_taxes'), patch.object(
Invoice, '_store_cache'), patch.object(
Invoice, 'browse', return_value=[]), patch.object(
Invoice, 'cleanMoves') as clean_moves, patch.object(
Invoice, 'save') as save_invoices, patch(
'trytond.modules.account_invoice.invoice.Pool'
) as PoolMock:
PoolMock.return_value.get.return_value = move_model
Invoice.validate_invoice([invoice])
self.assertIs(invoice.move, move)
invoice.get_move.assert_called_once_with()
invoice.do_lot_invoicing.assert_called_once_with()
move_model.save.assert_called_once_with([move])
clean_moves.assert_called_once_with([move])
save_invoices.assert_called()
@with_transaction()
def test_validate_invoice_sets_number_for_customer_invoice(self):
'validating customer invoices now assigns the invoice number'
Invoice = Pool().get('account.invoice')
move = Mock()
invoice = Invoice()
invoice.type = 'out'
invoice.move = None
invoice.get_move = Mock(return_value=move)
invoice.do_lot_invoicing = Mock()
move_model = Mock()
with patch.object(Invoice, '_check_taxes'), patch.object(
Invoice, '_store_cache'), patch.object(
Invoice, 'set_number') as set_number, patch.object(
Invoice, 'cleanMoves'), patch.object(
Invoice, 'save'), patch(
'trytond.modules.account_invoice.invoice.Pool'
) as PoolMock:
PoolMock.return_value.get.return_value = move_model
Invoice.validate_invoice([invoice])
set_number.assert_called_once_with([invoice])
del ModuleTestCase

View File

@@ -11,6 +11,7 @@ import traceback
logger = logging.getLogger(__name__)
class Cron(metaclass=PoolMeta):
__name__ = 'ir.cron'
@@ -18,9 +19,11 @@ class Cron(metaclass=PoolMeta):
def __setup__(cls):
super().__setup__()
cls.method.selection.append(
('automation.cron|update_shipment', "Update Shipment from freight booking info")
('automation.cron|update_shipment',
"Update Shipment from freight booking info")
)
class AutomationCron(ModelSQL, ModelView):
"Automation Cron"
__name__ = 'automation.cron'
@@ -70,12 +73,13 @@ class AutomationCron(ModelSQL, ModelView):
))
rows = cursor.fetchall()
logger.info(f"Nombre total de lignes à traiter : {len(rows)}")
logger.info(f"Nombre total de lignes a traiter : {len(rows)}")
# ---- PREMIÈRE TRANSACTION : Création des objets de référence ----
# Premiere transaction : creation des objets de reference
with Transaction().new_transaction() as trans1:
try:
logger.info("Début de la création des objets de référence...")
logger.info(
"Debut de la creation des objets de reference...")
parties_to_save = []
vessels_to_save = []
@@ -85,7 +89,7 @@ class AutomationCron(ModelSQL, ModelView):
vessels_cache = {}
locations_cache = {}
# Collecter les données des objets de référence
# Collecter les donnees des objets de reference
for row in rows:
(
si_number, si_date, si_quantity, si_unit,
@@ -97,7 +101,6 @@ class AutomationCron(ModelSQL, ModelView):
comments, fintrade_booking_key
) = row
# Fonction pour obtenir ou créer un Party
def get_or_create_party(name):
if not name:
return None
@@ -105,20 +108,18 @@ class AutomationCron(ModelSQL, ModelView):
if name_upper in parties_cache:
return parties_cache[name_upper]
# Chercher d'abord dans la base
existing = Party.search([('name', '=', name_upper)], limit=1)
existing = Party.search(
[('name', '=', name_upper)], limit=1)
if existing:
parties_cache[name_upper] = existing[0]
return existing[0]
# Créer un nouveau
new_p = Party()
new_p.name = name_upper
parties_cache[name_upper] = new_p
parties_to_save.append(new_p)
return new_p
# Fonction pour obtenir ou créer un Vessel
def get_or_create_vessel(name):
if not name:
return None
@@ -126,7 +127,8 @@ class AutomationCron(ModelSQL, ModelView):
if name_upper in vessels_cache:
return vessels_cache[name_upper]
existing = Vessel.search([('vessel_name', '=', name_upper)], limit=1)
existing = Vessel.search(
[('vessel_name', '=', name_upper)], limit=1)
if existing:
vessels_cache[name_upper] = existing[0]
return existing[0]
@@ -137,7 +139,6 @@ class AutomationCron(ModelSQL, ModelView):
vessels_to_save.append(new_v)
return new_v
# Fonction pour obtenir ou créer une Location
def get_or_create_location(name, type_):
if not name:
return None
@@ -148,9 +149,8 @@ class AutomationCron(ModelSQL, ModelView):
existing = Location.search([
('name', '=', name_upper),
('type', '=', type_)
('type', '=', type_),
], limit=1)
if existing:
locations_cache[key] = existing[0]
return existing[0]
@@ -162,40 +162,40 @@ class AutomationCron(ModelSQL, ModelView):
locations_to_save.append(new_loc)
return new_loc
# Collecter les objets à créer
_ = get_or_create_party(carrier_name)
_ = get_or_create_party(agent_name)
_ = get_or_create_vessel(vessel_name)
_ = get_or_create_location(loading_name, 'supplier')
_ = get_or_create_location(destination_name, 'customer')
# Sauvegarder tous les objets de référence
if parties_to_save:
logger.info(f"Création de {len(parties_to_save)} parties...")
logger.info(f"Creation de {len(parties_to_save)} parties...")
Party.save(parties_to_save)
if vessels_to_save:
logger.info(f"Création de {len(vessels_to_save)} vessels...")
logger.info(f"Creation de {len(vessels_to_save)} vessels...")
Vessel.save(vessels_to_save)
if locations_to_save:
logger.info(f"Création de {len(locations_to_save)} locations...")
logger.info(
f"Creation de {len(locations_to_save)} locations...")
Location.save(locations_to_save)
trans1.commit()
logger.info("Première transaction commitée : objets de référence créés")
logger.info(
"Premiere transaction commitee : objets de reference crees")
except Exception as e:
trans1.rollback()
logger.error(f"Erreur dans la création des objets de référence : {e}")
logger.error(
f"Erreur dans la creation des objets de reference : {e}")
logger.error(traceback.format_exc())
raise
# ---- TRANSACTIONS INDIVIDUELLES pour chaque shipment ----
# Transactions individuelles pour chaque shipment
successful_shipments = 0
failed_shipments = []
# Recréer le curseur après la nouvelle transaction
cursor2 = Transaction().connection.cursor()
cursor2.execute(*t.select(
t.ShippingInstructionNumber,
@@ -232,40 +232,73 @@ class AutomationCron(ModelSQL, ModelView):
logger.info(f"Traitement shipment {i}/{len(rows2)} : SI {si_number}")
# ---- TRANSACTION INDIVIDUELLE pour ce shipment ----
try:
with Transaction().new_transaction() as trans_shipment:
logger.info(f"Début transaction pour SI {si_number}")
logger.info(f"Debut transaction pour SI {si_number}")
# Vérifier si le shipment existe déjà
existing_shipment = ShipmentIn.search([
('reference', '=', si_number)
], limit=1)
if existing_shipment:
logger.info(f"Shipment {si_number} existe déjà, ignoré")
shipment = existing_shipment[0]
if shipment.incoming_moves:
logger.info(
"Shipment %s existe deja avec lots, ignore",
si_number)
trans_shipment.commit()
continue
logger.info(
"Shipment %s existe deja sans lots, verification freight_booking_lots",
si_number)
inv_date, inv_nb = shipment._create_lots_from_fintrade()
shipment = ShipmentIn(shipment.id)
if shipment.incoming_moves:
shipment.controller = shipment.get_controller()
shipment.controller_target = controller
if not shipment.fees:
shipment.create_fee(shipment.controller)
shipment.instructions = shipment.get_instructions_html(
inv_date, inv_nb)
ShipmentIn.save([shipment])
logger.info(
"Shipment %s mis a jour avec %s incoming move(s)",
si_number, len(shipment.incoming_moves))
else:
logger.info(
"Shipment %s existe sans lots et aucun lot disponible pour l'instant",
si_number)
trans_shipment.commit()
continue
# Récupérer les objets (maintenant ils existent dans la base)
carrier = None
if carrier_name:
carrier_list = Party.search([('name', '=', str(carrier_name).strip().upper())], limit=1)
carrier_list = Party.search([
('name', '=',
str(carrier_name).strip().upper())
], limit=1)
if carrier_list:
carrier = carrier_list[0]
logger.info(f"Carrier trouvé pour {si_number}: {carrier.name}")
logger.info(
f"Carrier trouve pour {si_number}: {carrier.name}")
else:
logger.warning(f"Carrier NON TROUVÉ pour {si_number}: '{carrier_name}'")
logger.warning(
f"Carrier NON TROUVE pour {si_number}: '{carrier_name}'")
agent = None
agent_list = Party.search([('name', '=', str(agent_name or 'TBN').strip().upper())], limit=1)
agent_list = Party.search([
('name', '=', str(agent_name or 'TBN').strip().upper())
], limit=1)
if agent_list:
agent = agent_list[0]
vessel = None
if vessel_name:
vessel_list = Vessel.search([('vessel_name', '=', str(vessel_name).strip().upper())], limit=1)
vessel_list = Vessel.search([
('vessel_name', '=',
str(vessel_name).strip().upper())
], limit=1)
if vessel_list:
vessel = vessel_list[0]
@@ -287,18 +320,18 @@ class AutomationCron(ModelSQL, ModelView):
if loc_to_list:
loc_to = loc_to_list[0]
# Vérification critique du carrier
if not carrier:
error_msg = f"ERREUR CRITIQUE: Carrier manquant pour SI {si_number} (valeur: '{carrier_name}')"
error_msg = (
f"ERREUR CRITIQUE: Carrier manquant pour SI {si_number} "
f"(valeur: '{carrier_name}')")
logger.error(error_msg)
raise ValueError(error_msg)
# Créer le shipment
shipment = ShipmentIn()
shipment.reference = si_number
shipment.from_location = loc_from
shipment.to_location = loc_to
shipment.carrier = None #carrier
shipment.carrier = None # carrier
shipment.supplier = agent
shipment.agent = agent
shipment.vessel = vessel
@@ -308,20 +341,19 @@ class AutomationCron(ModelSQL, ModelView):
shipment.etd = etd_date
shipment.etad = shipment.bl_date + timedelta(days=20)
# Sauvegarder ce shipment uniquement
ShipmentIn.save([shipment])
inv_date,inv_nb = shipment._create_lots_from_fintrade()
inv_date, inv_nb = shipment._create_lots_from_fintrade()
shipment.controller = shipment.get_controller()
shipment.controller_target = controller
shipment.create_fee(shipment.controller)
shipment.instructions = shipment.get_instructions_html(inv_date,inv_nb)
shipment.instructions = shipment.get_instructions_html(
inv_date, inv_nb)
ShipmentIn.save([shipment])
trans_shipment.commit()
successful_shipments += 1
logger.info(f"Shipment {si_number} créé avec succès")
logger.info(f"Shipment {si_number} cree avec succes")
except Exception as e:
# Cette transaction échoue mais les autres continuent
error_details = {
'si_number': si_number,
'carrier_name': carrier_name,
@@ -330,7 +362,7 @@ class AutomationCron(ModelSQL, ModelView):
}
failed_shipments.append(error_details)
logger.error(f"ERREUR pour shipment {si_number}: {e}")
logger.error(f"ERREUR pour shipment {si_number}: {e}")
logger.error(f" Carrier: '{carrier_name}'")
logger.error(f" Agent: '{agent_name}'")
logger.error(f" Vessel: '{vessel_name}'")
@@ -339,23 +371,21 @@ class AutomationCron(ModelSQL, ModelView):
if line.strip():
logger.error(f" {line}")
# ---- RÉSUMÉ FINAL ----
logger.info("=" * 60)
logger.info("RÉSUMÉ DE L'EXÉCUTION")
logger.info("RESUME DE L'EXECUTION")
logger.info("=" * 60)
logger.info(f"Total de shipments à traiter : {len(rows2)}")
logger.info(f"Shipments créés avec succès : {successful_shipments}")
logger.info(f"Shipments en échec : {len(failed_shipments)}")
logger.info(f"Total de shipments a traiter : {len(rows2)}")
logger.info(f"Shipments crees avec succes : {successful_shipments}")
logger.info(f"Shipments en echec : {len(failed_shipments)}")
if failed_shipments:
logger.info("\nDétail des échecs :")
logger.info("\nDetail des echecs :")
for i, error in enumerate(failed_shipments, 1):
logger.info(f" {i}. SI {error['si_number']}:")
logger.info(f" Carrier: '{error['carrier_name']}'")
logger.info(f" Erreur: {error['error']}")
# Log supplémentaire pour debug
logger.info("\nAnalyse des carriers problématiques :")
logger.info("\nAnalyse des carriers problematiques :")
problematic_carriers = {}
for error in failed_shipments:
carrier = error['carrier_name']
@@ -365,13 +395,14 @@ class AutomationCron(ModelSQL, ModelView):
problematic_carriers[carrier] = 1
for carrier, count in problematic_carriers.items():
logger.info(f" Carrier '{carrier}' : {count} échec(s)")
# Vérifier si ce carrier existe dans la base
existing = Party.search([('name', '=', str(carrier).strip().upper())], limit=1)
logger.info(f" Carrier '{carrier}' : {count} echec(s)")
existing = Party.search([
('name', '=', str(carrier).strip().upper())
], limit=1)
if existing:
logger.info(f" → EXISTE DANS LA BASE (ID: {existing[0].id})")
logger.info(
f" -> EXISTE DANS LA BASE (ID: {existing[0].id})")
else:
logger.info(f" N'EXISTE PAS DANS LA BASE")
logger.info(" -> N'EXISTE PAS DANS LA BASE")
logger.info("=" * 60)

View File

@@ -18,6 +18,13 @@ class IncomingConfiguration(metaclass=PoolMeta):
class Incoming(metaclass=PoolMeta):
__name__ = 'document.incoming'
created_at = fields.Function(
fields.Date("Created At"),
'get_created_at')
result_notes = fields.Function(
fields.Text("Result Notes"),
'get_result_notes')
@classmethod
def __setup__(cls):
super().__setup__()
@@ -25,6 +32,7 @@ class Incoming(metaclass=PoolMeta):
('weight_report', "Weight Report"))
cls.type.selection.append(
('controller', "Controller"))
cls._order = [('create_date', 'DESC')]
@classmethod
def _get_results(cls):
@@ -39,7 +47,7 @@ class Incoming(metaclass=PoolMeta):
WR.save([wr])
WR.run_ocr([wr])
WR.run_metadata([wr])
WR.run_pipeline([wr])
return wr
def _process_controller(self):
@@ -54,6 +62,25 @@ class Incoming(metaclass=PoolMeta):
return wr
def get_created_at(self, name=None):
create_date = getattr(self, 'create_date', None)
if not create_date:
return None
return create_date.date()
@classmethod
def order_created_at(cls, tables):
table, _ = tables[None]
return [table.create_date]
def get_result_notes(self, name=None):
result = getattr(self, 'result', None)
if not result:
return ''
if getattr(result, '__name__', None) == 'automation.document':
return getattr(result, 'notes', '') or ''
return ''
# @property
# def supplier_invoice_company(self):
# pass

View File

@@ -8,5 +8,10 @@ this repository contains the full copyright notices and license terms. -->
<field name="inherit" ref="document_incoming.document_incoming_configuration_view_form"/>
<field name="name">document_incoming_configuration_form</field>
</record>
<record model="ir.ui.view" id="document_incoming_view_list_wr">
<field name="model">document.incoming</field>
<field name="inherit" ref="document_incoming.document_incoming_view_list"/>
<field name="name">document_incoming_list</field>
</record>
</data>
</tryton>

View File

@@ -2,7 +2,9 @@
version=7.2.0
depends:
document_incoming
automation
ir
party
xml:
document.xml
view/document_incoming_list.xml

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/tree/field[@name='name']" position="before">
<field name="created_at" expand="2"/>
</xpath>
<xpath expr="/tree/field[@name='result']" position="after">
<field name="result_notes" expand="2"/>
</xpath>
</data>

View File

@@ -45,6 +45,8 @@ de negoce physique:
- `modules/purchase_trade/docs/template-rules.md`
- Catalogue des proprietes templates:
- `modules/purchase_trade/docs/template-properties.md`
- Padding facture provisoire vente / validation comptable:
- `modules/purchase_trade/docs/padding-invoice-accounting.md`
## 4) Invariants metier a preserver
@@ -102,6 +104,15 @@ de negoce physique:
- le `unit_price` doit rester un prix de base, hors `premium`
- le `premium` doit impacter le prix total economique et donc le `amount`,
aussi bien en `priced` qu'en `basis`
- dans `pricing.pricing` en saisie manuelle, l'utilisateur renseigne
seulement `quantity` et `settl_price`
- `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` et
`eod_price` sont des valeurs derivees et ne doivent pas etre saisies a la
main
- en manuel, `fixed_qt` = cumul des `quantity` du groupe trie par
`pricing_date`
- en manuel, `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`
- en manuel, `unfixed_qt_price` = `settl_price` de la ligne
- pour les documents commerciaux / facture, une ligne `basis` affiche le
`premium` comme prix visible, pas le prix economique total
- si `linked currency` est active, le `premium` est saisi dans la devise /
@@ -122,6 +133,24 @@ de negoce physique:
- a la validation d'une `sale.line`, si un lot virtuel est cree et qu'aucun
matching purchase n'existe, il faut lancer `generate_from_sale_line()` pour
alimenter le PnL sale-first
- En padding de facture provisoire vente:
- le padding est saisi globalement dans `lot.invoice`
- il est uniquement applique aux factures provisoires cote vente
- il est reparti par lot et stocke dans `lot.sale_invoice_padding`
- la ligne facture affiche `Inc. padding` depuis le lot
- le padding augmente `account.invoice.line.quantity`, donc le move principal
de facture inclut deja le montant padding
- les comptes de padding viennent de `account.configuration`:
`Default Sale Padding` et `Default Accrual Padding`
- la section `Padding` doit rester avant la section `Invoice` dans
`Financial / Configuration`
- la provisoire cree un `additional_move` debit `Default Sale Padding` /
credit `Default Accrual Padding`
- la finale cree l'inverse en reprenant le montant depuis
`lot.sale_invoice_line_prov`, donc avec le prix, la devise, la date et le
taux de la provisoire
- le wizard final doit calculer son delta depuis la quantite provisoire hors
padding: `sale_invoice_line_prov.quantity - sale_invoice_padding`
## 5) Conventions de modification
@@ -159,6 +188,15 @@ de negoce physique:
- Le calcul du prix peut diverger entre `unit_price`, `linked_price`,
`lot_price` et valuation si le premium n'est pas traite explicitement dans
chaque maillon.
- Sur `account.invoice`, le workflow `Validate` doit maintenant aligner
fournisseur et client pour:
- creation du `account.move`
- attribution du `number`
- `Post` ne doit pas reintroduire une difference de session/fresh login cote
client
- Pour le padding provisoire vente, ne pas changer la quantite physique du lot:
l'ecart doit rester porte par `lot.sale_invoice_padding` et visible sur la
facture via `Inc. padding`.
## 7) Definition of done (module `purchase_trade`)

View File

@@ -193,6 +193,10 @@ def register():
Pool.register(
account.PhysicalTradeIFRS,
module='purchase_trade', type_='model')
Pool.register(
configuration.AccountConfiguration,
configuration.AccountConfigurationDefaultAccount,
module='purchase_trade', type_='model')
Pool.register(
invoice.Invoice,
invoice.InvoiceLine,
@@ -280,6 +284,7 @@ def register():
invoice.PurchaseReport,
stock.ShipmentShippingReport,
stock.ShipmentInsuranceReport,
stock.ShipmentCOOReport,
stock.ShipmentPackingListReport,
module='purchase_trade', type_='report')

View File

@@ -1,9 +1,10 @@
# account.py
from trytond.model import ModelSQL, ModelView, fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['PhysicalTradeIFRS']
__all__ = [
'PhysicalTradeIFRS',
]
__metaclass__ = PoolMeta

View File

@@ -1,6 +1,12 @@
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="account_configuration_view_form">
<field name="model">account.configuration</field>
<field name="inherit" ref="account.configuration_view_form"/>
<field name="name">account_configuration_form</field>
</record>
<record model="res.group" id="group_physical_trade_ifrs">
<field name="name">Physical Trade IFRS</field>
</record>

View File

@@ -1,19 +1,141 @@
from trytond.model import ModelSingleton, ModelSQL, ModelView, fields
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
from trytond.transaction import Transaction
class AccountConfiguration(metaclass=PoolMeta):
__name__ = 'account.configuration'
default_sale_padding_account = fields.MultiValue(fields.Many2One(
'account.account', "Default Sale Padding",
domain=[
('closed', '!=', True),
('type.revenue', '=', True),
('company', '=', Eval('context', {}).get('company', -1)),
]))
default_accrual_padding_account = fields.MultiValue(fields.Many2One(
'account.account', "Default Accrual Padding",
domain=[
('closed', '!=', True),
('type.statement', '=', 'balance'),
('company', '=', Eval('context', {}).get('company', -1)),
]))
@classmethod
def multivalue_model(cls, field):
pool = Pool()
if field in {
'default_sale_padding_account',
'default_accrual_padding_account',
}:
return pool.get('account.configuration.default_account')
return super().multivalue_model(field)
class AccountConfigurationDefaultAccount(metaclass=PoolMeta):
__name__ = 'account.configuration.default_account'
default_sale_padding_account = fields.Many2One(
'account.account', "Default Sale Padding",
domain=[
('closed', '!=', True),
('type.revenue', '=', True),
('company', '=', Eval('company', -1)),
])
default_accrual_padding_account = fields.Many2One(
'account.account', "Default Accrual Padding",
domain=[
('closed', '!=', True),
('type.statement', '=', 'balance'),
('company', '=', Eval('company', -1)),
])
class Configuration(ModelSingleton, ModelSQL, ModelView):
"Purchase Trade Configuration"
__name__ = 'purchase_trade.configuration'
_REPORT_LABELS = (
('sale_report_label', 'sale', 'report_sale', 'Proforma'),
('sale_bill_report_label', 'sale', 'report_bill', 'Draft'),
('invoice_report_label', 'account_invoice', 'report_invoice',
'Invoice'),
('invoice_cndn_report_label', 'account_invoice',
'report_invoice_ict_final', 'CN/DN'),
('invoice_prepayment_report_label', 'account_invoice',
'report_prepayment', 'Prepayment'),
('invoice_packing_list_report_label', 'purchase_trade',
'report_invoice_packing_list', 'Packing List'),
('invoice_payment_order_report_label', 'purchase_trade',
'report_payment_order', 'Payment Order'),
('purchase_report_label', 'purchase', 'report_purchase', 'Purchase'),
('shipment_shipping_report_label', 'stock',
'report_shipment_in_shipping', 'Shipping instructions'),
('shipment_insurance_report_label', 'purchase_trade',
'report_shipment_in_insurance', 'Insurance'),
('shipment_coo_report_label', 'purchase_trade',
'report_shipment_in_coo', 'COO'),
('shipment_packing_list_report_label', 'purchase_trade',
'report_shipment_in_packing_list', 'Packing List'),
)
pricing_rule = fields.Text("Pricing Rule")
sale_report_template = fields.Char("Sale Template")
sale_report_label = fields.Char("Sale Menu Label")
sale_bill_report_template = fields.Char("Sale Bill Template")
sale_bill_report_label = fields.Char("Sale Bill Menu Label")
sale_final_report_template = fields.Char("Sale Final Template")
invoice_report_template = fields.Char("Invoice Template")
invoice_report_label = fields.Char("Invoice Menu Label")
invoice_cndn_report_template = fields.Char("CN/DN Template")
invoice_cndn_report_label = fields.Char("CN/DN Menu Label")
invoice_prepayment_report_template = fields.Char("Prepayment Template")
invoice_prepayment_report_label = fields.Char("Prepayment Menu Label")
invoice_packing_list_report_template = fields.Char("Packing List Template")
invoice_packing_list_report_label = fields.Char("Packing List Menu Label")
invoice_payment_order_report_template = fields.Char("Payment Order Template")
invoice_payment_order_report_label = fields.Char(
"Payment Order Menu Label")
purchase_report_template = fields.Char("Purchase Template")
purchase_report_label = fields.Char("Purchase Menu Label")
shipment_shipping_report_template = fields.Char("Shipping Template")
shipment_shipping_report_label = fields.Char("Shipping Menu Label")
shipment_insurance_report_template = fields.Char("Insurance Template")
shipment_insurance_report_label = fields.Char("Insurance Menu Label")
shipment_coo_report_template = fields.Char("COO Template")
shipment_coo_report_label = fields.Char("COO Menu Label")
shipment_packing_list_report_template = fields.Char("Packing List Template")
shipment_packing_list_report_label = fields.Char(
"Packing List Menu Label")
@classmethod
def create(cls, vlist):
records = super().create(vlist)
cls._sync_report_labels(records)
return records
@classmethod
def write(cls, *args):
super().write(*args)
cls._sync_report_labels(sum(args[::2], []))
@classmethod
def _sync_report_labels(cls, records):
if not records:
return
pool = Pool()
ModelData = pool.get('ir.model.data')
ActionReport = pool.get('ir.action.report')
to_write = []
for record in records:
for field_name, module, xml_id, default_label in cls._REPORT_LABELS:
label = (getattr(record, field_name, '') or '').strip()
action_id = ModelData.get_id(module, xml_id)
action = ActionReport(action_id)
target_label = label or default_label
if getattr(action, 'name', '') != target_label:
to_write.extend(([action], {'name': target_label}))
if to_write:
with Transaction().set_user(0):
ActionReport.write(*to_write)

View File

@@ -1,8 +1,8 @@
# Business Rules - Purchase Trade
Statut: `draft`
Version: `v0.4`
Derniere mise a jour: `2026-04-02`
Version: `v0.7`
Derniere mise a jour: `2026-04-26`
Owner metier: `a completer`
Owner technique: `a completer`
@@ -333,10 +333,54 @@ Owner technique: `a completer`
- seuls les lots physiques des `incoming_moves` du shipment sont exportes
- l'action exige au minimum un `controller` et un `returned_id` sur le
shipment
- les cles renvoyees par le systeme distant et la date d'envoi sont
- les cles renvoyees par le systeme distant et la date d'envoi sont
conservees sur le `weight.report` local
- Priorite:
- `importante`
### BR-PT-016 - En pricing manuel, seules la quantite fixee du jour et le prix de marche sont saisis
- Intent: simplifier la saisie utilisateur et garantir une coherence unique
entre les colonnes de `pricing.pricing`.
- Description:
- Pour une ligne de `pricing.pricing` en mode manuel, l'utilisateur ne doit
saisir que:
- `quantity`
- `settl_price`
- Les autres colonnes de suivi sont derivees automatiquement sur tout le
groupe metier (`line + component` ou `sale_line + component`) trie par
`pricing_date`.
- Resultat attendu:
- `fixed_qt` = cumul des `quantity`
- `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`
- `unfixed_qt` = quantite de base de la ligne - `fixed_qt`
- `unfixed_qt_price` = `settl_price` de la ligne
- `eod_price` = moyenne ponderee entre jambe fixee et non fixee
- `last=True` reste unique par groupe et suit la plus grande `pricing_date`
- Hors scope:
- la generation automatique des lignes quand `pricing.component.auto = True`
ne doit pas changer de comportement
- Priorite:
- `structurante`
### BR-PT-017 - Le workflow Validate des factures client doit aussi attribuer le numero
- Intent: aligner le comportement des factures client et fournisseur au moment
de `Validate`.
- Description:
- Lors du workflow `Validate` sur `account.invoice`, une facture client
(`type = out`) doit maintenant:
- creer son `account.move`
- recevoir son `number`
- La numerotation ne doit plus etre repoussee au `Post` cote client.
- Resultat attendu:
- a l'issue de `Validate`, une facture fournisseur ou client possede deja:
- son `account.move`
- son `number`
- `Post` conserve son role de posting comptable sans reintroduire de
difference de session/fresh login cote client
- Priorite:
- `importante`
- Resultat attendu:
- apres creation du lot virtuel, si aucun matching purchase n'existe:
- appeler `Valuation.generate_from_sale_line(line)`
@@ -345,6 +389,63 @@ Owner technique: `a completer`
- Priorite:
- `importante`
### BR-PT-018 - Les contrats distinguent le compte bancaire tiers du compte bancaire compagnie
- Intent: eviter de confondre le compte bancaire du client/fournisseur avec le
compte bancaire de la compagnie courante utilise pour encaisser ou payer.
- Description:
- Sur `sale.sale` et `purchase.purchase`, `bank_account` represente le compte
bancaire propre a la `party` du contrat.
- Sur `sale.sale` et `purchase.purchase`, `our_bank_account` represente le
compte bancaire utilise par la compagnie courante pour encaisser ou payer.
- `bank_account` est limite aux comptes bancaires de la party du contrat.
- `our_bank_account` reste librement selectionnable parmi les comptes
bancaires disponibles.
- Resultat attendu:
- si plusieurs comptes existent, le compte dont la devise correspond a la
devise du contrat est propose en priorite
- si aucun compte ne matche la devise, le premier compte disponible est
propose
- le champ `Our Bank Account` est pre-rempli depuis les comptes de la
compagnie quand possible, mais sa recherche n'est pas limitee a ces comptes
- Priorite:
- `importante`
### BR-PT-019 - Le padding de facture provisoire vente augmente la quantite facturee sans modifier le lot physique
- Intent: permettre de constituer une provision sur une facture provisoire
vente tout en gardant la trace de l'ecart avec la quantite reelle du lot.
- Description:
- Le wizard `lot.invoice` expose un padding global uniquement pour les
factures provisoires cote vente.
- Ce padding global est reparti egalement entre les lots selectionnes.
- La quantite de chaque ligne de facture provisoire vente est augmentee de la
part de padding du lot.
- Le padding ne modifie pas la quantite physique du lot.
- Resultat attendu:
- deux lots factures ensemble avec un padding global de `1000` recoivent
chacun `500` de padding
- la ligne facture affiche la quantite augmentee
- la ligne facture expose `Inc. padding`
- le lot conserve sa part de padding dans `sale_invoice_padding`
- Validation comptable:
- au `Validate`, le move principal de facture inclut deja le padding car il
est integre a `account.invoice.line.quantity`
- la provisoire cree un `additional_move` avec le couple de comptes configure
`Default Sale Padding` / `Default Accrual Padding`
- montant provisoire:
`lot.sale_invoice_padding * account.invoice.line.unit_price`
- la finale cree l'ecriture inverse pour exactement le montant padding
comptabilise lors de la provisoire
- le montant d'extourne finale doit etre relu depuis
`lot.sale_invoice_line_prov`, afin de reprendre le prix, la devise, la date
et le taux de la provisoire
- le calcul de quantite finale doit retirer le padding de la quantite
provisoire avant de calculer le delta
- voir `modules/purchase_trade/docs/padding-invoice-accounting.md`
- Priorite:
- `importante`
### BR-PT-012 - Fallback valuation basis sans summary: utiliser le prix economique de la ligne
- Intent: eviter qu'une valuation `basis` ouverte sorte a zero alors que la

View File

@@ -0,0 +1,249 @@
# Padding facture provisoire vente - notes de session
Statut: `implemente - a valider comptablement`
Derniere mise a jour: `2026-04-26`
Scope: `lot.invoice` -> `account.invoice.line` -> `account.move`
## 1) Objectif metier
Le padding sert a augmenter temporairement la quantite facturee sur une facture
provisoire cote vente, afin de constituer une provision avant la facture finale.
Le padding ne change jamais la quantite physique du lot. Il represente seulement
la part incluse en plus dans la facture provisoire.
Exemple:
- 2 lots factures ensemble
- padding global saisi dans le wizard: `1000`
- repartition actuelle: `500` par lot
- chaque ligne facture affiche:
- `Quantity = quantite reelle du lot + padding du lot`
- `Inc. padding = padding du lot`
## 2) Saisie et stockage
### Wizard `lot.invoice`
- Champ: `sale_padding`
- Label UI: `Global padding`
- Visible uniquement pour:
- `type = sale`
- `action = prov`
Au clic `Invoice`, le wizard:
1. prend le padding global saisi
2. le repartit egalement entre les lots selectionnes
3. ecrit la part de chaque lot dans `lot.sale_invoice_padding`
4. lance la creation de la facture provisoire vente
### `lot.lot`
- Champ: `sale_invoice_padding`
- Label UI: `Sale invoice padding`
- Mode UI: readonly
- Role: memoire durable de la part de padding appliquee au lot.
Ce champ est la source de verite fonctionnelle pour:
- afficher le padding sur la facture
- exclure le padding du calcul de delta de la facture finale
- calculer les ecritures comptables specifiques au padding
### `account.invoice.line`
- Champ fonctionnel: `included_padding`
- Label UI: `Inc. padding`
- Unite affichee: meme unite que `Quantity`
- Role: afficher `line.lot.sale_invoice_padding` sur la ligne facture.
La valeur n'est pas stockee sur la ligne facture. Elle lit le padding depuis le
lot pour eviter une deuxieme source de verite.
## 3) Impact sur la facture provisoire
Lors de la creation des lignes de facture vente provisoire:
- seules les lignes positives `out` / `Pro forma` sont impactees
- `invoice_line.quantity` est augmente de `lot.sale_invoice_padding`
- le montant de ligne augmente naturellement car Tryton calcule:
- `quantity * unit_price`
Consequence:
- le move principal de facture contient deja le chiffre d'affaires augmente par
le padding
- `Inc. padding` rend visible la part artificielle incluse dans la quantite
- le lot garde sa quantite physique reelle
## 4) Impact sur la facture finale
La facture finale doit comparer la quantite physique finale avec la quantite
reelle deja facturee en provisoire, pas avec la quantite provisoire augmentee du
padding.
Regle:
- quantite provisoire reelle =
`lot.sale_invoice_line_prov.quantity - lot.sale_invoice_padding`
- delta final =
`lot.quantite_physique_courante - quantite_provisoire_reelle`
Exemple:
- lot initial: `993`
- padding provisoire: `100`
- facture provisoire: `1093`
- apres weighing: `1080`
- delta final attendu: `1080 - 993 = 87`
Sans cette correction, le wizard comparerait `1080` a `1093` et proposerait
`-13`, ce qui est faux car le padding ne doit pas etre considere comme une
quantite physique deja facturee.
## 5) Configuration comptable
Deux comptes par defaut sont ajoutes dans `Financial / Configuration`, dans une
section dediee `Padding` placee avant la section `Invoice`.
Champs:
- `Default Sale Padding`
- champ technique: `default_sale_padding_account`
- compte metier attendu: `80021`
- nature attendue: revenu
- `Default Accrual Padding`
- champ technique: `default_accrual_padding_account`
- compte metier attendu: `42021`
- nature attendue: bilan / accrual
Les champs suivent le pattern Tryton de `account.configuration`:
- champ `MultiValue` sur `account.configuration`
- stockage dans `account.configuration.default_account`
- domaine par compagnie via le contexte `company`
## 6) Ecriture padding a la validation d'une provisoire
Point d'entree:
- `account.invoice.validate_invoice`
- puis `invoice.do_lot_invoicing()`
- surcharge `purchase_trade.invoice.Invoice.do_lot_invoicing`
Condition:
- facture client: `invoice.type = out`
- reference facture: `Provisional`
- ligne facture: `description = Pro forma`
- ligne rattachee a un lot
- `lot.sale_invoice_padding > 0`
Montant:
- `padding_amount = lot.sale_invoice_padding * invoice_line.unit_price`
- devise: devise de la facture provisoire
- montant societe: converti avec la devise, le taux et la date de la facture
provisoire
Ecriture creee en `additional_move`:
- description: `Sale padding accrual`
- debit: `Default Sale Padding` (`80021`)
- credit: `Default Accrual Padding` (`42021`)
- `origin` des lignes: ligne de facture provisoire
- `lot` des lignes: lot concerne
- `party` renseigne si le compte le requiert
Raison du `additional_move`:
- ne pas modifier la construction standard du move principal de facture
- isoler l'ecriture padding pour audit et lettrage metier
- permettre le posting coordonne avec la facture
## 7) Ecriture inverse a la finale
La finale doit extourner exactement le padding comptabilise sur la provisoire.
Elle ne doit pas recalculer le montant avec le prix final.
Source du montant:
- le lot porte deja le lien vers la ligne provisoire:
- `lot.sale_invoice_line_prov`
- le montant d'extourne utilise:
- `lot.sale_invoice_padding`
- `lot.sale_invoice_line_prov.unit_price`
- la devise, la date et le taux de la facture provisoire
Condition:
- facture client: `invoice.type = out`
- reference facture: `Final`
- ligne facture: `description = Final`
- lot avec `sale_invoice_padding > 0`
- lot avec `sale_invoice_line_prov`
Ecriture creee en `additional_move`:
- description: `Sale padding reversal`
- debit: `Default Accrual Padding` (`42021`)
- credit: `Default Sale Padding` (`80021`)
- montant: identique au montant padding de la provisoire
- `origin` des lignes: ligne de facture provisoire
- `lot` des lignes: lot concerne
## 8) Posting
Au `Validate`:
- le move principal de facture est cree
- le ou les `additional_moves` padding sont crees en draft
Au `Post`:
- les `additional_moves` padding deja crees en draft sont postes
- si une facture est postee directement depuis draft, le module cree d'abord les
moves padding manquants puis les poste
Une detection par description evite de recreer deux fois le meme move padding
sur la meme facture:
- `Sale padding accrual`
- `Sale padding reversal`
## 9) Invariants a preserver
- Le padding est uniquement pour les factures provisoires cote vente.
- Le padding ne modifie jamais la quantite physique du lot.
- `lot.sale_invoice_padding` reste la memoire fonctionnelle du padding.
- La facture affiche toujours l'ecart via `Inc. padding`.
- La facture finale ignore le padding pour calculer le delta de quantite.
- L'extourne finale reprend le montant de la provisoire, pas le prix final.
- Les ecritures padding doivent rester rattachees au lot.
## 10) Points de vigilance
- Le sens debit/credit actuellement implemente est:
- provisoire: debit `80021`, credit `42021`
- finale: debit `42021`, credit `80021`
Ce sens doit etre valide par la comptabilite si le plan attendu impose une
convention differente.
- La detection du type de facture s'appuie sur `invoice.reference`:
- `Provisional`
- `Final`
- La detection des lignes s'appuie sur `invoice_line.description`:
- `Pro forma`
- `Final`
- Si ces libelles changent, la logique padding doit etre ajustee.
- Les tests unitaires complets n'ont pas pu etre lances dans l'environnement
local actuel a cause de dependances manquantes (`pytest`, puis `jwt`).
## 11) Validations techniques de session
Validations effectuees localement:
- compilation Python ciblee des fichiers touches
- validation XML ciblee des vues et definitions modifiees
- `git diff --check` sans erreur bloquante, avec seulement des alertes CRLF
existantes dans le repository

View File

@@ -1,8 +1,8 @@
# Template Properties - Purchase Trade
Statut: `draft`
Version: `v0.2`
Derniere mise a jour: `2026-04-07`
Version: `v0.3`
Derniere mise a jour: `2026-04-23`
## 1) Objectif
@@ -351,6 +351,21 @@ Usage typique:
- base de travail pour les templates de type `sale_ict.fodt`
- source de verite de plusieurs proprietes du bridge facture
### Proprietes specifiques `sale_melya.fodt`
- `report_melya_proforma_number`
- Usage: valeur affichee dans `Proforma Nr`
- Source de verite: deal lie via `report_deal`, fallback numero de vente
- `report_melya_buyer_address`
- Usage: bloc buyer avec nom long et adresse
- Source de verite: `sale.invoice_address.full_address` avec le contexte
`address_with_party`
- `report_melya_incoterm`
- Usage: ligne `DELIVERY TERMS`
- Source de verite: incoterm code + lieu incoterm + pays du lieu incoterm
## 7) Proprietes utiles deja presentes sur `purchase.purchase`
Source code: `modules/purchase_trade/purchase.py`

View File

@@ -321,11 +321,23 @@ class Fee(ModelSQL,ModelView):
qt = self.get_fee_lots_qt()
if qt:
return qt
line = self.line or self.sale_line
if line and line.lots:
return sum(
Decimal(lot.get_current_quantity_converted(0, self.unit))
for lot in line.lots)
LotQt = Pool().get('lot.qt')
if self.shipment_in:
lqts = LotQt.search(['lot_shipment_in','=',self.shipment_in.id])
if lqts:
return Decimal(lqts[0].lot_quantity)
def _get_amount_quantity(self):
quantity = self.quantity
if quantity is None:
quantity = self.get_quantity()
return Decimal(quantity or 0)
def get_amount(self,name=None):
Date = Pool().get('ir.date')
sign = Decimal(1)
@@ -358,7 +370,7 @@ class Fee(ModelSQL,ModelView):
compounding='simple'
)
return round(factor * self.line.unit_price * (self.quantity if self.quantity else 0) * sign,2)
return round(factor * self.line.unit_price * self._get_amount_quantity() * sign,2)
if self.sale_line:
if self.sale_line.sale.payment_term:
beg_date = self.fee_date if self.fee_date else Date.today()
@@ -374,7 +386,7 @@ class Fee(ModelSQL,ModelView):
compounding='simple'
)
logger.info("FACTOR:%s",factor)
return round(factor * self.sale_line.unit_price * (self.quantity if self.quantity else 0) * sign,2)
return round(factor * self.sale_line.unit_price * self._get_amount_quantity() * sign,2)
elif self.mode == 'perqt':
if self.shipment_in:

View File

@@ -15,6 +15,178 @@ from trytond.modules.purchase.purchase import (
class Invoice(metaclass=PoolMeta):
__name__ = 'account.invoice'
def do_lot_invoicing(self):
super().do_lot_invoicing()
self._create_sale_padding_moves()
@classmethod
def _post(cls, invoices):
pool = Pool()
Move = pool.get('account.move')
super()._post(invoices)
padding_moves = []
for invoice in invoices:
padding_moves.extend(invoice._create_sale_padding_moves())
padding_moves.extend([
move for move in (invoice.additional_moves or [])
if move.description in {
invoice._get_sale_padding_move_description(False),
invoice._get_sale_padding_move_description(True),
}
and move.state != 'posted'
])
if padding_moves:
cls.save(invoices)
Move.post([m for m in padding_moves if m.state != 'posted'])
def _get_sale_padding_accounts(self):
Configuration = Pool().get('account.configuration')
config = Configuration(1)
sale_account = config.get_multivalue(
'default_sale_padding_account', company=self.company.id)
accrual_account = config.get_multivalue(
'default_accrual_padding_account', company=self.company.id)
if not sale_account or not accrual_account:
raise UserError(
'Default Sale Padding and Default Accrual Padding '
'accounts must be configured.')
return sale_account, accrual_account
def _has_sale_padding_move(self, reversal=False):
description = self._get_sale_padding_move_description(reversal)
return any(
move.description == description
for move in (self.additional_moves or []))
@staticmethod
def _get_sale_padding_move_description(reversal=False):
if reversal:
return 'Sale padding reversal'
return 'Sale padding accrual'
def _get_padding_company_amount(self, invoice_line, padding):
Currency = Pool().get('currency.currency')
invoice = invoice_line.invoice
amount = Decimal(str(padding or 0)) * Decimal(
str(invoice_line.unit_price or 0))
amount = invoice.currency.round(amount)
if invoice.currency == invoice.company.currency:
return amount, amount
if invoice.rate:
company_amount = invoice.company.currency.round(
amount / invoice.rate)
else:
with Transaction().set_context(date=invoice.currency_date):
company_amount = Currency.compute(
invoice.currency, amount, invoice.company.currency)
return amount, company_amount
def _get_sale_padding_entries(self):
if self.type != 'out':
return []
entries = []
for line in self.lines or []:
if getattr(line, 'type', None) != 'line':
continue
lot = getattr(line, 'lot', None)
if not lot:
continue
padding = Decimal(str(
getattr(lot, 'sale_invoice_padding', 0) or 0))
if padding <= 0:
continue
if self.reference == 'Provisional' and line.description == 'Pro forma':
entries.append((lot, line, padding, False))
elif self.reference == 'Final' and line.description == 'Final':
provisional_line = getattr(lot, 'sale_invoice_line_prov', None)
if provisional_line:
entries.append((lot, provisional_line, padding, True))
return entries
def _get_sale_padding_move_lines(self, entries):
MoveLine = Pool().get('account.move.line')
sale_account, accrual_account = self._get_sale_padding_accounts()
move_lines = []
for lot, invoice_line, padding, reversal in entries:
padding_amount, company_amount = self._get_padding_company_amount(
invoice_line, padding)
if not company_amount:
continue
sale_line = MoveLine()
accrual_line = MoveLine()
for move_line in (sale_line, accrual_line):
move_line.lot = lot
move_line.origin = invoice_line
if not reversal:
sale_line.account = sale_account
sale_line.debit = company_amount
sale_line.credit = Decimal(0)
accrual_line.account = accrual_account
accrual_line.debit = Decimal(0)
accrual_line.credit = company_amount
else:
accrual_line.account = accrual_account
accrual_line.debit = company_amount
accrual_line.credit = Decimal(0)
sale_line.account = sale_account
sale_line.debit = Decimal(0)
sale_line.credit = company_amount
if self.currency != self.company.currency:
sale_line.second_currency = self.currency
accrual_line.second_currency = self.currency
sale_line.amount_second_currency = padding_amount.copy_sign(
sale_line.debit - sale_line.credit)
accrual_line.amount_second_currency = padding_amount.copy_sign(
accrual_line.debit - accrual_line.credit)
if sale_line.account.party_required:
sale_line.party = self.party
if accrual_line.account.party_required:
accrual_line.party = self.party
move_lines.extend([sale_line, accrual_line])
return move_lines
def _create_sale_padding_moves(self):
pool = Pool()
Move = pool.get('account.move')
Period = pool.get('account.period')
Date = pool.get('ir.date')
entries = self._get_sale_padding_entries()
if not entries:
return []
reversal = entries[0][3]
if self._has_sale_padding_move(reversal):
return []
move_lines = self._get_sale_padding_move_lines(entries)
if not move_lines:
return []
with Transaction().set_context(company=self.company.id):
today = Date.today()
accounting_date = self.accounting_date or self.invoice_date or today
period = Period.find(self.company, date=accounting_date)
move = Move()
move.journal = self.journal
move.period = period
move.date = accounting_date
move.origin = self
move.company = self.company
move.description = self._get_sale_padding_move_description(reversal)
move.lines = move_lines
Move.save([move])
self.additional_moves = tuple(self.additional_moves or ()) + (move,)
return [move]
@staticmethod
def _format_report_number(value, digits='0.0000', keep_trailing_decimal=False,
strip_trailing_zeros=True):
@@ -26,6 +198,11 @@ class Invoice(metaclass=PoolMeta):
text += '.0'
return text or '0'
@classmethod
def _format_report_quantity_display(cls, value):
return cls._format_report_number(
value, digits='0.01', strip_trailing_zeros=False)
def _get_report_invoice_line(self):
for line in self.lines or []:
if getattr(line, 'type', None) == 'line':
@@ -39,6 +216,243 @@ class Invoice(metaclass=PoolMeta):
]
return lines or list(self.lines or [])
@staticmethod
def _get_report_related_lots(line):
lots = []
seen = set()
def add_lot(lot):
if not lot:
return
lot_id = getattr(lot, 'id', None)
key = ('id', lot_id) if lot_id is not None else ('obj', id(lot))
if key in seen:
return
seen.add(key)
lots.append(lot)
add_lot(getattr(line, 'lot', None))
origin = getattr(line, 'origin', None)
for lot in getattr(origin, 'lots', []) or []:
add_lot(lot)
return lots
@classmethod
def _get_report_preferred_lots(cls, line):
lots = cls._get_report_related_lots(line)
physicals = [
lot for lot in lots
if getattr(lot, 'lot_type', None) == 'physic'
]
if physicals:
return physicals
virtuals = [
lot for lot in lots
if getattr(lot, 'lot_type', None) == 'virtual'
]
if len(virtuals) == 1:
return virtuals
return []
@staticmethod
def _get_report_line_sign(line):
quantity = Decimal(str(getattr(line, 'quantity', 0) or 0))
return Decimal(-1) if quantity < 0 else Decimal(1)
@staticmethod
def _get_report_lot_hist_weights(lot):
if not lot:
return None, None
if hasattr(lot, 'get_hist_quantity'):
net, gross = lot.get_hist_quantity()
return (
Decimal(str(net or 0)),
Decimal(str(gross if gross not in (None, '') else net or 0)),
)
hist = list(getattr(lot, 'lot_hist', []) or [])
state = getattr(lot, 'lot_state', None)
state_id = getattr(state, 'id', None)
if state_id is not None:
for entry in hist:
quantity_type = getattr(entry, 'quantity_type', None)
if getattr(quantity_type, 'id', None) == state_id:
net = Decimal(str(getattr(entry, 'quantity', 0) or 0))
gross = Decimal(str(
getattr(entry, 'gross_quantity', None)
if getattr(entry, 'gross_quantity', None) not in (None, '')
else net))
return net, gross
return None, None
def _get_report_invoice_line_weights(self, line):
lots = self._get_report_preferred_lots(line)
if lots and self._report_invoice_line_reuses_lot(line):
quantity = self._get_report_invoice_line_quantity_from_line(line)
return quantity, quantity
if lots:
sign = self._get_report_line_sign(line)
net_total = Decimal(0)
gross_total = Decimal(0)
for lot in lots:
net, gross = self._get_report_lot_hist_weights(lot)
if net is None:
continue
net_total += net
gross_total += gross
if net_total or gross_total:
return net_total * sign, gross_total * sign
quantity = Decimal(str(getattr(line, 'quantity', 0) or 0))
return quantity, quantity
@staticmethod
def _get_report_line_lot_keys(line):
keys = []
for lot in Invoice._get_report_preferred_lots(line):
lot_id = getattr(lot, 'id', None)
keys.append(lot_id if lot_id is not None else id(lot))
return tuple(sorted(keys))
def _report_invoice_line_reuses_lot(self, line):
line_keys = self._get_report_line_lot_keys(line)
if not line_keys:
return False
for other in self._get_report_invoice_lines():
if other is line:
continue
if self._get_report_line_lot_keys(other) == line_keys:
return True
return False
def _get_report_reused_lot_lines(self):
groups = {}
for line in self._get_report_invoice_lines():
lots = self._get_report_preferred_lots(line)
if not lots:
continue
for lot in lots:
lot_id = getattr(lot, 'id', None)
key = lot_id if lot_id is not None else id(lot)
groups.setdefault(key, {'lot': lot, 'lines': []})
groups[key]['lines'].append(line)
return {
key: value for key, value in groups.items()
if len(value['lines']) > 1
}
@staticmethod
def _convert_report_quantity(quantity, from_unit, to_unit):
value = Decimal(str(quantity or 0))
if not from_unit or not to_unit:
return value
if getattr(from_unit, 'id', None) == getattr(to_unit, 'id', None):
return value
from_name = getattr(from_unit, 'rec_name', None)
to_name = getattr(to_unit, 'rec_name', None)
if from_name and to_name and from_name == to_name:
return value
converted = Pool().get('product.uom').compute_qty(
from_unit, float(value), to_unit) or 0
return Decimal(str(converted))
@classmethod
def _get_report_invoice_line_quantity_from_line(cls, line):
quantity = Decimal(str(getattr(line, 'quantity', 0) or 0))
return cls._convert_report_quantity(
quantity,
getattr(line, 'unit', None),
cls._get_report_invoice_line_unit(line),
)
@classmethod
def _find_report_hist_entry_for_quantity(cls, lot, quantity, exclude_state_id=None):
target = Decimal(str(quantity or 0)).copy_abs()
for entry in list(getattr(lot, 'lot_hist', []) or []):
quantity_type = getattr(entry, 'quantity_type', None)
if getattr(quantity_type, 'id', None) == exclude_state_id:
continue
entry_quantity = Decimal(str(getattr(entry, 'quantity', 0) or 0))
if entry_quantity == target:
return entry
return None
def _get_report_reused_lot_gross_total(self):
reused_lots = self._get_report_reused_lot_lines()
if not reused_lots:
return None
total = Decimal(0)
for data in reused_lots.values():
lot = data['lot']
_, current_gross = self._get_report_lot_hist_weights(lot)
if current_gross is None:
continue
current_state = getattr(getattr(lot, 'lot_state', None), 'id', None)
negative_lines = [
line for line in data['lines']
if Decimal(str(getattr(line, 'quantity', 0) or 0)) < 0
]
previous_gross = Decimal(0)
matched = False
for line in negative_lines:
previous_entry = self._find_report_hist_entry_for_quantity(
lot,
self._get_report_invoice_line_quantity_from_line(line),
exclude_state_id=current_state,
)
if not previous_entry:
continue
previous_gross += Decimal(str(
getattr(previous_entry, 'gross_quantity', 0) or 0))
matched = True
if matched:
total += current_gross - previous_gross
return total
@staticmethod
def _get_report_invoice_line_unit(line):
lots = Invoice._get_report_preferred_lots(line)
if lots and getattr(lots[0], 'lot_unit_line', None):
return lots[0].lot_unit_line
return getattr(line, 'unit', None)
@staticmethod
def _get_report_lbs_unit():
Uom = Pool().get('product.uom')
for domain in (
[('symbol', '=', 'LBS')],
[('rec_name', '=', 'LBS')],
[('name', '=', 'LBS')],
[('symbol', '=', 'LB')],
[('rec_name', '=', 'LB')],
[('name', '=', 'LB')]):
units = Uom.search(domain, limit=1)
if units:
return units[0]
return None
@classmethod
def _convert_report_quantity_to_lbs(cls, quantity, unit):
value = Decimal(str(quantity or 0))
if value == 0:
return Decimal('0.00')
if not unit:
return (value * Decimal('2204.62')).quantize(Decimal('0.01'))
label = (
getattr(unit, 'symbol', None)
or getattr(unit, 'rec_name', None)
or getattr(unit, 'name', None)
or ''
).strip().upper()
if label in {'LBS', 'LB', 'POUND', 'POUNDS'}:
return value.quantize(Decimal('0.01'))
lbs_unit = cls._get_report_lbs_unit()
if lbs_unit:
converted = Pool().get('product.uom').compute_qty(
unit, float(value), lbs_unit) or 0
return Decimal(str(converted)).quantize(Decimal('0.01'))
if label in {'KG', 'KGS', 'KILOGRAM', 'KILOGRAMS'}:
return (value * Decimal('2.20462')).quantize(Decimal('0.01'))
return (value * Decimal('2204.62')).quantize(Decimal('0.01'))
@staticmethod
def _clean_report_description(value):
text = (value or '').strip()
@@ -81,6 +495,35 @@ class Invoice(metaclass=PoolMeta):
return lot
return line.lots[0]
@staticmethod
def _get_report_lot_shipment(lot):
if not lot:
return None
return (
getattr(lot, 'lot_shipment_in', None)
or getattr(lot, 'lot_shipment_out', None)
or getattr(lot, 'lot_shipment_internal', None)
)
def _get_report_invoice_shipments(self):
shipments = []
seen = set()
for line in self._get_report_invoice_lines():
for lot in self._get_report_preferred_lots(line):
shipment = self._get_report_lot_shipment(lot)
if not shipment:
continue
shipment_id = getattr(shipment, 'id', None)
key = (
getattr(shipment, '__name__', None),
shipment_id if shipment_id is not None else id(shipment),
)
if key in seen:
continue
seen.add(key)
shipments.append(shipment)
return shipments
def _get_report_invoice_lots(self):
invoice_lines = self._get_report_invoice_lines()
if not invoice_lines:
@@ -140,14 +583,13 @@ class Invoice(metaclass=PoolMeta):
return fees[0] if fees else None
def _get_report_shipment(self):
lot = self._get_report_lot()
if not lot:
shipments = self._get_report_invoice_shipments()
if len(shipments) == 1:
return shipments[0]
if len(shipments) > 1:
return None
return (
getattr(lot, 'lot_shipment_in', None)
or getattr(lot, 'lot_shipment_out', None)
or getattr(lot, 'lot_shipment_internal', None)
)
lot = self._get_report_lot()
return self._get_report_lot_shipment(lot)
@staticmethod
def _get_report_bank_account(party):
@@ -390,20 +832,17 @@ class Invoice(metaclass=PoolMeta):
def report_quantity_lines(self):
details = []
for line in self._get_report_invoice_lines():
quantity = getattr(line, 'report_net', '')
if quantity == '':
quantity = getattr(line, 'quantity', '')
quantity, _ = self._get_report_invoice_line_weights(line)
if quantity == '':
continue
quantity_text = self._format_report_number(
quantity, keep_trailing_decimal=True)
unit = getattr(line, 'unit', None)
quantity_text = self._format_report_quantity_display(quantity)
unit = self._get_report_invoice_line_unit(line)
unit_name = unit.rec_name.upper() if unit and unit.rec_name else ''
lbs = getattr(line, 'report_lbs', '')
lbs = self._convert_report_quantity_to_lbs(quantity, unit)
parts = [quantity_text, unit_name]
if lbs != '':
parts.append(
f"({self._format_report_number(lbs, digits='0.01')} LBS)")
f"({self._format_report_quantity_display(lbs)} LBS)")
detail = ' '.join(part for part in parts if part)
if detail:
details.append(detail)
@@ -586,11 +1025,46 @@ class Invoice(metaclass=PoolMeta):
return 'NB BALES: ' + str(int(nb_bale))
return ''
@property
def report_cndn_nb_bale(self):
nb_bale = self.report_nb_bale
if nb_bale == 'NB BALES: 0':
return 'Unchanged'
return nb_bale
@property
def report_net_display(self):
net = self.report_net
if net == '':
return ''
return self._format_report_quantity_display(net)
@property
def report_gross_display(self):
gross = self.report_gross
if gross == '':
return ''
return self._format_report_quantity_display(gross)
@property
def report_lbs_display(self):
lbs = self.report_lbs
if lbs == '':
return ''
return self._format_report_quantity_display(lbs)
@property
def report_gross(self):
if self.lines:
reused_gross = self._get_report_reused_lot_gross_total()
if reused_gross is not None:
non_reused_total = sum(
self._get_report_invoice_line_weights(line)[1]
for line in self._get_report_invoice_lines()
if not self._report_invoice_line_reuses_lot(line))
return non_reused_total + reused_gross
return sum(
Decimal(str(getattr(line, 'quantity', 0) or 0))
self._get_report_invoice_line_weights(line)[1]
for line in self._get_report_invoice_lines())
line = self._get_report_trade_line()
if line and line.lots:
@@ -604,7 +1078,7 @@ class Invoice(metaclass=PoolMeta):
def report_net(self):
if self.lines:
return sum(
Decimal(str(getattr(line, 'quantity', 0) or 0))
self._get_report_invoice_line_weights(line)[0]
for line in self._get_report_invoice_lines())
line = self._get_report_trade_line()
if line and line.lots:
@@ -621,12 +1095,21 @@ class Invoice(metaclass=PoolMeta):
net = self.report_net
if net == '':
return ''
return round(Decimal(net) * Decimal('2204.62'),2)
invoice_line = self._get_report_invoice_line()
unit = self._get_report_invoice_line_unit(invoice_line) if invoice_line else None
return self._convert_report_quantity_to_lbs(net, unit)
@property
def report_weight_unit_upper(self):
line = self._get_report_trade_line() or self._get_report_invoice_line()
unit = getattr(line, 'unit', None) if line else None
invoice_line = self._get_report_invoice_line()
unit = self._get_report_invoice_line_unit(invoice_line) if invoice_line else None
if not unit:
line = self._get_report_trade_line()
lot = self._get_report_lot()
unit = (
getattr(lot, 'lot_unit_line', None)
or getattr(line, 'unit', None) if line else None
)
if unit and unit.rec_name:
return unit.rec_name.upper()
return 'KGS'
@@ -634,10 +1117,43 @@ class Invoice(metaclass=PoolMeta):
@property
def report_note_title(self):
total = Decimal(str(self.total_amount or 0))
invoice_type = getattr(self, 'type', None)
if not invoice_type:
if self.sales:
invoice_type = 'out'
elif self.purchases:
invoice_type = 'in'
if invoice_type == 'out':
if total < 0:
return 'Credit Note'
return 'Debit Note'
if total < 0:
return 'Debit Note'
return 'Credit Note'
@property
def report_transportation(self):
shipment = self._get_report_shipment()
if not shipment:
return ''
supplier = getattr(shipment, 'supplier', None)
vessel = getattr(shipment, 'vessel', None)
supplier_name = (
getattr(supplier, 'name', None)
or getattr(supplier, 'rec_name', None)
or '')
vessel_name = getattr(vessel, 'vessel_name', None) or ''
note = getattr(shipment, 'note', None) or ''
if supplier_name and vessel_name:
transport = f"BY {supplier_name} ({vessel_name})"
elif supplier_name:
transport = f"BY {supplier_name}"
else:
transport = vessel_name
return ' '.join(part for part in [transport, note] if part).strip()
@property
def report_bl_date(self):
shipment = self._get_report_shipment()
@@ -721,6 +1237,13 @@ class Invoice(metaclass=PoolMeta):
return shipment.number or ''
return ''
@property
def report_si_reference(self):
shipment = self._get_report_shipment()
if shipment:
return getattr(shipment, 'reference', None) or ''
return ''
@property
def report_freight_amount(self):
fee = self._get_report_freight_fee()
@@ -832,6 +1355,16 @@ class InvoiceLine(metaclass=PoolMeta):
@property
def report_net(self):
if self.type == 'line':
invoice = getattr(self, 'invoice', None)
if invoice and invoice._report_invoice_line_reuses_lot(self):
return Invoice._get_report_invoice_line_quantity_from_line(self)
lot = getattr(self, 'lot', None)
if lot:
net, _ = Invoice._get_report_lot_hist_weights(lot)
if net is None:
net = 0
sign = Invoice._get_report_line_sign(self)
return Decimal(str(net or 0)) * sign
return self.quantity
return ''
@@ -840,7 +1373,8 @@ class InvoiceLine(metaclass=PoolMeta):
net = self.report_net
if net == '':
return ''
return round(Decimal(net) * Decimal('2204.62'),2)
unit = Invoice._get_report_invoice_line_unit(self)
return Invoice._convert_report_quantity_to_lbs(net, unit)
class ReportTemplateMixin:
@@ -900,6 +1434,8 @@ class InvoiceReport(ReportTemplateMixin, BaseInvoiceReport):
if (report_path.endswith('/prepayment.fodt')
or action_name == 'Prepayment'):
field_name = 'invoice_prepayment_report_template'
elif report_path.endswith('/packing_list.fodt'):
field_name = 'invoice_packing_list_report_template'
elif (report_path.endswith('/payment_order.fodt')
or action_name == 'Payment Order'):
field_name = 'invoice_payment_order_report_template'

View File

@@ -1,5 +1,29 @@
<tryton>
<data>
<record model="ir.ui.view" id="invoice_line_view_form">
<field name="model">account.invoice.line</field>
<field name="inherit" ref="account_invoice.invoice_line_view_form"/>
<field name="name">invoice_line_form</field>
</record>
<record model="ir.ui.view" id="invoice_line_view_tree_sequence">
<field name="model">account.invoice.line</field>
<field name="inherit" ref="account_invoice.invoice_line_view_tree_sequence"/>
<field name="name">invoice_line_tree_sequence</field>
</record>
<record model="ir.action.report" id="report_invoice_packing_list">
<field name="name">Packing List</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">account_invoice/packing_list.fodt</field>
<field name="single" eval="True"/>
</record>
<record model="ir.action.keyword" id="report_invoice_packing_list_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_invoice_packing_list"/>
</record>
<record model="ir.action.report" id="report_payment_order">
<field name="name">Payment Order</field>
<field name="model">account.invoice</field>

View File

@@ -55,6 +55,8 @@ class Lot(metaclass=PoolMeta):
invoice_line_prov = fields.Many2One('account.invoice.line',"Purch. Invoice line prov")
sale_invoice_line = fields.Many2One('account.invoice.line',"Sale Invoice line")
sale_invoice_line_prov = fields.Many2One('account.invoice.line',"Sale Invoice line prov")
sale_invoice_padding = fields.Numeric(
"Sale invoice padding", digits='lot_unit_line', readonly=True)
delta_qt = fields.Numeric("Delta Qt")
delta_pr = fields.Numeric("Delta Pr")
delta_amt = fields.Numeric("Delta Amt")
@@ -1336,6 +1338,11 @@ class LotQt(
Case((lp.id>0, lp.lot_himself),else_=ls.lot_himself).as_('r_lot_himself'),
Case((lp.id>0, lp.lot_container),else_=ls.lot_container).as_('r_lot_container'),
Case((lp.id>0, lp.line),else_=None).as_('r_line'),
Case(
(((lqt.lot_s != None) & (lqt.lot_p == None) & (sl.id > 0)),
sl.del_period),
else_=Case((pl.id>0, pl.del_period),else_=None)
).as_('r_del_period'),
Case((pu.id>0, pu.id),else_=None).as_('r_purchase'),
Case((sa.id>0, sa.id),else_=None).as_('r_sale'),
Case((ls.id>0, ls.sale_line),else_=None).as_('r_sale_line'),
@@ -1443,6 +1450,7 @@ class LotQt(
lp.lot_himself.as_("r_lot_himself"),
lp.lot_container.as_("r_lot_container"),
lp.line.as_("r_line"),
pl.del_period.as_("r_del_period"),
Case((pu.id > 0, pu.id), else_=None).as_("r_purchase"),
Case((sa.id > 0, sa.id), else_=None).as_("r_sale"),
lp.sale_line.as_("r_sale_line"),
@@ -1508,6 +1516,7 @@ class LotQt(
Literal(None).as_("r_lot_himself"),
Max(lp.lot_container).as_("r_lot_container"),
lp.line.as_("r_line"),
Max(pl.del_period).as_("r_del_period"),
Max(Case((pu.id > 0, pu.id), else_=None)).as_("r_purchase"),
Max(Case((sa.id > 0, sa.id), else_=None)).as_("r_sale"),
lp.sale_line.as_("r_sale_line"),
@@ -1561,6 +1570,7 @@ class LotQt(
union.r_lot_himself.as_("r_lot_himself"),
union.r_lot_container.as_("r_lot_container"),
union.r_line.as_("r_line"),
union.r_del_period.as_("r_del_period"),
union.r_purchase.as_("r_purchase"),
union.r_sale.as_("r_sale"),
union.r_sale_line.as_("r_sale_line"),
@@ -1636,6 +1646,7 @@ class LotReport(
r_lot_unit_line = fields.Function(fields.Many2One('product.uom', "Unit"),'get_unit')
r_lot_price = fields.Function(fields.Numeric("Price", digits='r_lot_unit_line'),'get_lot_price')
r_lot_price_sale = fields.Function(fields.Numeric("Price", digits='r_lot_unit_line'),'get_lot_sale_price')
r_del_period = fields.Many2One('product.month', "Delivery Period")
r_sale_line = fields.Many2One('sale.line',"S. line")
r_sale = fields.Many2One('sale.sale',"Sale")
r_tot = fields.Numeric("Qt tot", digits='r_lot_unit_line')
@@ -2711,9 +2722,17 @@ class LotInvoice(Wizard):
val_s['lot_diff_price'] = 0
val_s['lot_diff_amount'] = 0
if lot.sale_invoice_line_prov:
val_s['lot_diff_quantity'] = val_s['lot_quantity'] - Decimal(lot.sale_invoice_line_prov.quantity)
provisional_quantity = (
Decimal(lot.sale_invoice_line_prov.quantity)
- Decimal(str(lot.sale_invoice_padding or 0)))
val_s['lot_diff_quantity'] = (
val_s['lot_quantity'] - provisional_quantity)
val_s['lot_diff_price'] = val_s['lot_price'] - Decimal(lot.sale_invoice_line_prov.unit_price)
val_s['lot_diff_amount'] = val_s['lot_amount'] - Decimal(lot.sale_invoice_line_prov.amount)
provisional_amount = (
provisional_quantity
* Decimal(lot.sale_invoice_line_prov.unit_price))
val_s['lot_diff_amount'] = (
val_s['lot_amount'] - provisional_amount)
val_s['lot_currency'] = lot.lot_price_ct_symbol_sale
val_s['lot_unit'] = sale_line.unit.id if sale_line else None
lot_s.append(val_s)
@@ -2811,6 +2830,7 @@ class LotInvoice(Wizard):
break
else:
if sales:
self._apply_sale_invoice_padding(lots)
Sale._process_invoice(sales, lots, action, self.inv.pp_sale)
for lot in lots:
lot = Lot(lot.id)
@@ -2823,6 +2843,23 @@ class LotInvoice(Wizard):
return 'message'
@classmethod
def _split_sale_padding(cls, padding, lots):
padding = Decimal(str(padding or 0))
if not padding or not lots:
return {}
share = padding / Decimal(len(lots))
return {lot.id: share for lot in lots}
def _apply_sale_invoice_padding(self, lots):
Lot = Pool().get('lot.lot')
if self.inv.type != 'sale' or self.inv.action != 'prov':
return
padding_by_lot = self._split_sale_padding(self.inv.sale_padding, lots)
for lot in lots:
lot.sale_invoice_padding = padding_by_lot.get(lot.id, Decimal(0))
Lot.save(lots)
def default_message(self, fields):
return {
'message': 'The invoice has been successfully created.',
@@ -2863,16 +2900,24 @@ class LotInvoiceStart(ModelView):
amount = fields.Numeric("Amount to invoice",digits='unit',readonly=True,states={'invisible': Eval('type')=='sale'})
quantity_s = fields.Numeric("Quantity to invoice",digits='unit',readonly=True,states={'invisible': Eval('type')=='purchase'})
amount_s = fields.Numeric("Amount to invoice",digits='unit',readonly=True,states={'invisible': Eval('type')=='purchase'})
sale_padding = fields.Numeric("Global padding", digits='unit',
states={
'invisible': (Eval('type') == 'purchase') | (Eval('action') != 'prov'),
})
@fields.depends('type')
def on_change_with_action(self, name=None):
if self.lot_p and self.type == 'purchase':
if self.lot_p[0].lot.line.purchase.wb.qt_type in [e.quantity_type for e in self.lot_p[0].lot.lot_hist]:
purchase = getattr(getattr(self.lot_p[0].lot, 'line', None), 'purchase', None)
wb = getattr(purchase, 'wb', None)
if wb and wb.qt_type in [e.quantity_type for e in self.lot_p[0].lot.lot_hist]:
return 'final'
else:
return 'prov'
if self.lot_s and self.type == 'sale':
if self.lot_s[0].lot.sale_line.sale.wb.qt_type in [e.quantity_type for e in self.lot_s[0].lot.lot_hist]:
sale = getattr(getattr(self.lot_s[0].lot, 'sale_line', None), 'sale', None)
wb = getattr(sale, 'wb', None)
if wb and wb.qt_type in [e.quantity_type for e in self.lot_s[0].lot.lot_hist]:
return 'final'
else:
return 'prov'
@@ -2899,7 +2944,7 @@ class LotInvoiceStart(ModelView):
amount += l.lot_amount
return amount
@fields.depends('lot_s','type','quantity_s')
@fields.depends('lot_s','type','quantity_s','sale_padding')
def on_change_with_quantity_s(self, name=None):
if self.lot_s and self.type == 'sale':
quantity = Decimal(0)
@@ -2908,17 +2953,23 @@ class LotInvoiceStart(ModelView):
quantity += l.lot_diff_quantity
else:
quantity += l.lot_quantity
quantity += Decimal(str(self.sale_padding or 0))
return quantity
@fields.depends('lot_s','type','amount_s')
@fields.depends('lot_s','type','amount_s','sale_padding')
def on_change_with_amount_s(self, name=None):
if self.lot_s and self.type == 'sale':
amount = Decimal(0)
padding = Decimal(str(self.sale_padding or 0))
padding_share = (
padding / Decimal(len(self.lot_s))
if padding and self.lot_s else Decimal(0))
for l in self.lot_s:
if l.lot.sale_invoice_line_prov:
amount += l.lot_diff_amount
else:
amount += l.lot_amount
amount += padding_share * Decimal(str(l.lot_price or 0))
return amount
@classmethod
@@ -3055,6 +3106,7 @@ class LotWeighing(Wizard):
if lot.lot_shipment_out:
val['lot_shipment_out'] = lot.lot_shipment_out.id
val['lot_product'] = lot.lot_product.id
val['lot_qt'] = lot.lot_qt
val['lot_quantity'] = lot.lot_quantity
val['lot_gross_quantity'] = lot.lot_gross_quantity
val['lot_unit'] = lot.lot_unit.id
@@ -3081,6 +3133,7 @@ class LotWeighing(Wizard):
lh.quantity = round(l.lot_quantity_new,5)
lh.gross_quantity = round(l.lot_gross_quantity_new,5)
LotHist.save([lh])
l.lot.lot_qt = l.lot_qt
if self.w.lot_update_state :
l.lot.lot_state = self.w.lot_state
@@ -3121,6 +3174,7 @@ class LotWeighingLot(ModelView):
lot_shipment_internal = fields.Many2One('stock.shipment.internal',"Shipment Internal")
lot_shipment_out = fields.Many2One('stock.shipment.out',"Shipment Out")
lot_product = fields.Many2One('product.product',"Product",readonly=True)
lot_qt = fields.Integer("Qt")
lot_quantity = fields.Numeric("Net weight",digits=(1,5),readonly=True)
lot_gross_quantity = fields.Numeric("Gross weight",digits=(1,5),readonly=True)
lot_unit = fields.Many2One('product.uom',"Unit",readonly=True)

View File

@@ -31,6 +31,16 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">lot_graph</field>
<field name="priority" eval="10"/>
</record>
<record model="ir.ui.view" id="lot_view_form">
<field name="model">lot.lot</field>
<field name="inherit" ref="lot.lot_view_form"/>
<field name="name">lot_form</field>
</record>
<record model="ir.ui.view" id="lot_view_tree_sequence">
<field name="model">lot.lot</field>
<field name="inherit" ref="lot.lot_view_tree_sequence"/>
<field name="name">lot_tree_sequence</field>
</record>
<record model="ir.action.act_window" id="act_lot_visgraph">
<field name="name">Lots graph</field>
<field name="res_model">lot.lot</field>

View File

@@ -146,6 +146,7 @@ class Party(metaclass=PoolMeta):
sp = SlaPlace.search([('pes','=', sla.id),('location','=',location)])
if sp:
return sp[0].cost,sp[0].mode,sp[0].currency,sp[0].unit
return None, None, None, None
def get_alf(self):
if self.name == 'CARGO CONTROL':
@@ -160,24 +161,38 @@ class Party(metaclass=PoolMeta):
if rows:
return int(rows[0][0])
@classmethod
def _ensure_category(cls, party, category_name):
if not (party and category_name):
return
Category = Pool().get('party.category')
PartyCategory = Pool().get('party.party-party.category')
cat = Category.search(['name', '=', category_name], limit=1)
if not cat:
return
cat = cat[0]
existing = PartyCategory.search([
('party', '=', party.id),
('category', '=', cat.id),
], limit=1)
if existing:
return
pc = PartyCategory()
pc.party = party.id
pc.category = cat.id
PartyCategory.save([pc])
@classmethod
def getPartyByName(cls, party, category=None):
party = party.upper()
p = cls.search([('name', '=', party)], limit=1)
if p:
cls._ensure_category(p[0], category)
return p[0]
else:
p = cls()
p.name = party
cls.save([p])
if category:
Category = Pool().get('party.category')
cat = Category.search(['name','=',category])
if cat:
PartyCategory = Pool().get('party.party-party.category')
pc = PartyCategory()
pc.party = p.id
pc.category = cat[0].id
PartyCategory.save([pc])
cls._ensure_category(p, category)
return p

View File

@@ -333,10 +333,10 @@ class Pricing(ModelSQL,ModelView):
price_component = fields.Many2One('pricing.component', "Component")#, domain=[('id', 'in', Eval('line.price_components'))], ondelete='CASCADE')
quantity = fields.Numeric("Qt",digits='unit')
settl_price = fields.Numeric("Settl. price",digits='unit')
fixed_qt = fields.Numeric("Fixed qt",digits='unit',readonly=True)
fixed_qt_price = fields.Numeric("Fixed qt price",digits='unit',readonly=True)
unfixed_qt = fields.Numeric("Unfixed qt",digits='unit',readonly=True)
unfixed_qt_price = fields.Numeric("Unfixed qt price",digits='unit',readonly=True)
fixed_qt = fields.Numeric("Fixed qt",digits='unit', readonly=True)
fixed_qt_price = fields.Numeric("Fixed qt price",digits='unit', readonly=True)
unfixed_qt = fields.Numeric("Unfixed qt",digits='unit', readonly=True)
unfixed_qt_price = fields.Numeric("Unfixed qt price",digits='unit', readonly=True)
eod_price = fields.Numeric("EOD price",digits='unit',readonly=True)
last = fields.Boolean("Last")
@@ -368,16 +368,236 @@ class Pricing(ModelSQL,ModelView):
def default_eod_price(cls):
return Decimal(0)
@staticmethod
def _weighted_average_price(fixed_qt, fixed_price, unfixed_qt, unfixed_price):
fixed_qt = Decimal(str(fixed_qt or 0))
fixed_price = Decimal(str(fixed_price or 0))
unfixed_qt = Decimal(str(unfixed_qt or 0))
unfixed_price = Decimal(str(unfixed_price or 0))
total_qty = fixed_qt + unfixed_qt
if total_qty == 0:
return Decimal(0)
return round(
((fixed_qt * fixed_price) + (unfixed_qt * unfixed_price)) / total_qty,
4,
)
def compute_eod_price(self):
if getattr(self, 'sale_line', None) and hasattr(self, 'get_eod_price_sale'):
return self.get_eod_price_sale()
if getattr(self, 'line', None) and hasattr(self, 'get_eod_price_purchase'):
return self.get_eod_price_purchase()
return self._weighted_average_price(
self.fixed_qt,
self.fixed_qt_price,
self.unfixed_qt,
self.unfixed_qt_price,
)
@fields.depends('fixed_qt', 'fixed_qt_price', 'unfixed_qt', 'unfixed_qt_price')
def on_change_fixed_qt(self):
self.eod_price = self.compute_eod_price()
@fields.depends('fixed_qt', 'fixed_qt_price', 'unfixed_qt', 'unfixed_qt_price')
def on_change_fixed_qt_price(self):
self.eod_price = self.compute_eod_price()
@fields.depends('fixed_qt', 'fixed_qt_price', 'unfixed_qt', 'unfixed_qt_price')
def on_change_unfixed_qt(self):
self.eod_price = self.compute_eod_price()
@fields.depends('fixed_qt', 'fixed_qt_price', 'unfixed_qt', 'unfixed_qt_price')
def on_change_unfixed_qt_price(self):
self.eod_price = self.compute_eod_price()
@classmethod
def create(cls, vlist):
records = super(Pricing, cls).create(vlist)
cls._sync_manual_values(records)
cls._sync_manual_last(records)
cls._sync_eod_price(records)
return records
@classmethod
def write(cls, *args):
super(Pricing, cls).write(*args)
if (Transaction().context.get('skip_pricing_eod_sync')
or Transaction().context.get('skip_pricing_last_sync')):
return
records = []
actions = iter(args)
for record_set, values in zip(actions, actions):
if values:
records.extend(record_set)
cls._sync_manual_values(records)
cls._sync_manual_last(records)
cls._sync_eod_price(records)
@classmethod
def _sync_eod_price(cls, records):
if not records:
return
with Transaction().set_context(skip_pricing_eod_sync=True):
for record in records:
eod_price = record.compute_eod_price()
if Decimal(str(record.eod_price or 0)) == Decimal(str(eod_price or 0)):
continue
super(Pricing, cls).write([record], {
'eod_price': eod_price,
})
@classmethod
def _is_manual_pricing_record(cls, record):
component = getattr(record, 'price_component', None)
if component is None:
return True
return not bool(getattr(component, 'auto', False))
@classmethod
def _get_pricing_group_domain(cls, record):
component = getattr(record, 'price_component', None)
if getattr(record, 'sale_line', None):
return [
('sale_line', '=', record.sale_line.id),
('price_component', '=',
component.id if getattr(component, 'id', None) else None),
]
if getattr(record, 'line', None):
return [
('line', '=', record.line.id),
('price_component', '=',
component.id if getattr(component, 'id', None) else None),
]
return None
@classmethod
def _get_base_quantity(cls, record):
owner = getattr(record, 'sale_line', None) or getattr(record, 'line', None)
if not owner:
return Decimal(0)
if hasattr(owner, '_get_pricing_base_quantity'):
return Decimal(str(owner._get_pricing_base_quantity() or 0))
quantity = getattr(owner, 'quantity_theorical', None)
if quantity is None:
quantity = getattr(owner, 'quantity', None)
return Decimal(str(quantity or 0))
@classmethod
def _sync_manual_values(cls, records):
if (not records
or Transaction().context.get('skip_pricing_manual_sync')):
return
domains = []
seen = set()
for record in records:
if not cls._is_manual_pricing_record(record):
continue
domain = cls._get_pricing_group_domain(record)
if not domain:
continue
key = tuple(domain)
if key in seen:
continue
seen.add(key)
domains.append(domain)
if not domains:
return
with Transaction().set_context(
skip_pricing_manual_sync=True,
skip_pricing_last_sync=True,
skip_pricing_eod_sync=True):
for domain in domains:
pricings = cls.search(
domain,
order=[('pricing_date', 'ASC'), ('id', 'ASC')])
if not pricings:
continue
base_quantity = cls._get_base_quantity(pricings[0])
cumul_qt = Decimal(0)
cumul_qt_price = Decimal(0)
total = len(pricings)
for index, pricing in enumerate(pricings):
quantity = Decimal(str(pricing.quantity or 0))
settl_price = Decimal(str(pricing.settl_price or 0))
cumul_qt += quantity
cumul_qt_price += quantity * settl_price
fixed_qt = cumul_qt
if fixed_qt > 0:
fixed_qt_price = round(cumul_qt_price / fixed_qt, 4)
else:
fixed_qt_price = Decimal(0)
unfixed_qt = base_quantity - fixed_qt
if unfixed_qt < Decimal('0.001'):
unfixed_qt = Decimal(0)
fixed_qt = base_quantity
values = {
'fixed_qt': fixed_qt,
'fixed_qt_price': fixed_qt_price,
'unfixed_qt': unfixed_qt,
'unfixed_qt_price': settl_price,
'last': index == (total - 1),
}
eod_price = cls._weighted_average_price(
values['fixed_qt'],
values['fixed_qt_price'],
values['unfixed_qt'],
values['unfixed_qt_price'],
)
values['eod_price'] = eod_price
super(Pricing, cls).write([pricing], values)
@classmethod
def _get_manual_last_group_domain(cls, record):
return cls._get_pricing_group_domain(record)
@classmethod
def _sync_manual_last(cls, records):
if not records:
return
domains = []
seen = set()
for record in records:
domain = cls._get_manual_last_group_domain(record)
if not domain:
continue
key = tuple(domain)
if key in seen:
continue
seen.add(key)
domains.append(domain)
if not domains:
return
with Transaction().set_context(
skip_pricing_last_sync=True,
skip_pricing_eod_sync=True):
for domain in domains:
pricings = cls.search(
domain,
order=[('pricing_date', 'ASC'), ('id', 'ASC')])
if not pricings:
continue
last_pricing = pricings[-1]
for pricing in pricings[:-1]:
if pricing.last:
super(Pricing, cls).write([pricing], {'last': False})
if not last_pricing.last:
super(Pricing, cls).write([last_pricing], {'last': True})
def get_fixed_price(self):
price = Decimal(0)
Pricing = Pool().get('pricing.pricing')
pricings = Pricing.search(['price_component','=',self.price_component.id],order=[('pricing_date', 'ASC')])
domain = self._get_pricing_group_domain(self)
if not domain:
return price
pricings = Pricing.search(domain, order=[('pricing_date', 'ASC'), ('id', 'ASC')])
if pricings:
cumul_qt = Decimal(0)
cumul_qt_price = Decimal(0)
for pr in pricings:
cumul_qt += pr.quantity
cumul_qt_price += pr.quantity * pr.settl_price
quantity = Decimal(str(pr.quantity or 0))
settl_price = Decimal(str(pr.settl_price or 0))
cumul_qt += quantity
cumul_qt_price += quantity * settl_price
if pr.id == self.id:
break
if cumul_qt > 0:

View File

@@ -141,8 +141,12 @@ class Component(metaclass=PoolMeta):
def get_quota_purchase(self, name):
if self.line:
if self.line.quantity:
return round(self.line.quantity_theorical / (self.nbdays if self.nbdays > 0 else 1),5)
quantity = getattr(self.line, 'quantity_theorical', None)
if quantity is None:
quantity = getattr(self.line, 'quantity', None)
if quantity is not None:
nbdays = self.nbdays if self.nbdays and self.nbdays > 0 else 1
return round(Decimal(quantity) / nbdays, 5)
class Pricing(metaclass=PoolMeta):
"Pricing"
@@ -156,9 +160,12 @@ class Pricing(metaclass=PoolMeta):
return self.line.unit
def get_eod_price_purchase(self):
if self.line:
return round((self.fixed_qt * self.fixed_qt_price + self.unfixed_qt * self.unfixed_qt_price)/Decimal(self.line.quantity_theorical),4)
return Decimal(0)
return self._weighted_average_price(
self.fixed_qt,
self.fixed_qt_price,
self.unfixed_qt,
self.unfixed_qt_price,
)
class Summary(ModelSQL,ModelView):
"Pricing summary"
@@ -260,6 +267,8 @@ class Purchase(metaclass=PoolMeta):
'bank.account', "Bank Account",
domain=[('id', 'in', Eval('bank_accounts', []))],
depends=['bank_accounts'])
our_bank_account = fields.Many2One(
'bank.account', "Our Bank Account")
from_location = fields.Many2One('stock.location', 'From location', required=True,domain=[('type', "!=", 'customer')])
to_location = fields.Many2One('stock.location', 'To location', required=True,domain=[('type', "!=", 'supplier')])
shipment_in = fields.Many2One('stock.shipment.in','Purchases')
@@ -289,8 +298,12 @@ class Purchase(metaclass=PoolMeta):
'purchase',
'Analytic Dimensions'
)
trader = fields.Many2One('party.party',"Trader")
operator = fields.Many2One('party.party',"Operator")
trader = fields.Many2One(
'party.party', "Trader",
domain=[('categories.name', '=', 'TRADER')])
operator = fields.Many2One(
'party.party', "Operator",
domain=[('categories.name', '=', 'OPERATOR')])
our_reference = fields.Char("Our Reference")
company_visible = fields.Function(
fields.Boolean("Visible"), 'on_change_with_company_visible')
@@ -313,6 +326,17 @@ class Purchase(metaclass=PoolMeta):
return account
return party_bank_accounts[0]
def _get_default_our_bank_account(self):
if (not self.company or not self.company.party
or not self.company.party.bank_accounts):
return None
company_bank_accounts = list(self.company.party.bank_accounts)
if self.currency:
for account in company_bank_accounts:
if account.currency == self.currency:
return account
return company_bank_accounts[0]
@fields.depends('party', '_parent_party.bank_accounts')
def on_change_with_bank_accounts(self, name=None):
if self.party and self.party.bank_accounts:
@@ -321,14 +345,25 @@ class Purchase(metaclass=PoolMeta):
@fields.depends(
'company', 'party', 'invoice_party', 'payment_term', 'lines',
'bank_account', '_parent_party.bank_accounts')
'bank_account', 'our_bank_account', '_parent_party.bank_accounts',
'_parent_company.party')
def on_change_party(self):
super().on_change_party()
self.bank_account = self._get_default_bank_account()
self.our_bank_account = self._get_default_our_bank_account()
@fields.depends('party', 'currency', '_parent_party.bank_accounts')
@fields.depends(
'party', 'company', 'currency', '_parent_party.bank_accounts',
'_parent_company.party')
def on_change_currency(self):
self.bank_account = self._get_default_bank_account()
self.our_bank_account = self._get_default_our_bank_account()
@fields.depends('company', 'currency', 'our_bank_account',
'_parent_company.party')
def on_change_company(self):
super().on_change_company()
self.our_bank_account = self._get_default_our_bank_account()
@classmethod
def default_wb(cls):
@@ -359,6 +394,25 @@ class Purchase(metaclass=PoolMeta):
def default_tol_max(cls):
return 0
@staticmethod
def _has_matched_physical_lots(purchase):
for line in purchase.lines or []:
for lot in line.lots or []:
if (
getattr(lot, 'lot_type', None) == 'physic'
and getattr(lot, 'line', None)
and getattr(lot, 'sale_line', None)):
return True
return False
@classmethod
def delete(cls, purchases):
for purchase in purchases:
if cls._has_matched_physical_lots(purchase):
raise UserError(
"You cannot delete a purchase matched to a sale")
super().delete(purchases)
@property
def report_terms(self):
if self.lines:
@@ -1233,6 +1287,10 @@ class Line(metaclass=PoolMeta):
PS = Pool().get('purchase.pricing.summary')
ps = PS.search(['line','=',self.id])
if ps:
if not self.price_components:
manual = [e for e in ps if not e.price_component]
if manual:
return manual[0].progress or 0
return sum((e.progress if e.progress else 0) * (e.ratio if e.ratio else 0) / 100 for e in ps)
def getVirtualLot(self):
@@ -1285,6 +1343,14 @@ class Line(metaclass=PoolMeta):
for t in self.terms:
price += (t.manual_price if t.manual_price else Decimal(0))
else:
if not self.price_components:
PP = Pool().get('purchase.pricing.summary')
pp = PP.search([
('line', '=', self.id),
('price_component', '=', None),
], limit=1)
if pp:
return round(Decimal(pp[0].price or 0), 4)
for pc in self.price_components:
PP = Pool().get('purchase.pricing.summary')
pp = PP.search([('price_component','=',pc.id),('line','=',self.id)])
@@ -1402,14 +1468,21 @@ class Line(metaclass=PoolMeta):
lines = sum(args[::2], [])
for line in lines:
if line.id in old_values:
old = Decimal(old_values[line.id] or 0)
new = Decimal(line.quantity_theorical or 0)
delta = new - old
if delta > 0:
virtual_lots = [lot for lot in (line.lots or []) if lot.lot_type == 'virtual']
if not virtual_lots:
continue
vlot = virtual_lots[0]
# Initializing quantity_theorical after virtual-lot creation
# must not add the line quantity a second time.
old = old_values[line.id]
baseline = (
Decimal(old)
if old is not None
else Decimal(vlot.get_current_quantity_converted() or 0)
)
delta = new - baseline
if delta > 0:
new_qty = round(Decimal(vlot.get_current_quantity_converted() or 0) + delta, 5)
vlot.set_current_quantity(new_qty, new_qty, 1)
Lot.save([vlot])
@@ -1432,10 +1505,6 @@ class Line(metaclass=PoolMeta):
lqt.lot_unit = line.unit
LotQt.save([lqt])
elif delta < 0:
virtual_lots = [lot for lot in (line.lots or []) if lot.lot_type == 'virtual']
if not virtual_lots:
continue
vlot = virtual_lots[0]
decrease = abs(delta)
lqts = LotQt.search([
('lot_p', '=', vlot.id),
@@ -1627,19 +1696,9 @@ class Line(metaclass=PoolMeta):
Pricing = Pool().get('pricing.pricing')
pricings = Pricing.search(['price_component','=',pc.id],order=[('pricing_date', 'ASC')])
if pricings:
cumul_qt = Decimal(0)
index = 0
for pr in pricings:
cumul_qt += pr.quantity
pr.fixed_qt = cumul_qt
pr.fixed_qt_price = pr.get_fixed_price()
pr.unfixed_qt = Decimal(pr.line.quantity_theorical) - pr.fixed_qt
pr.unfixed_qt_price = pr.fixed_qt_price
pr.eod_price = pr.get_eod_price_purchase()
if index == len(pricings) - 1:
pr.last = True
index += 1
Pricing.save([pr])
Pricing._sync_manual_values(pricings)
Pricing._sync_manual_last(pricings)
Pricing._sync_eod_price(pricings)
if pc.triggers and pc.auto:
prDate = []
@@ -1691,11 +1750,18 @@ class Line(metaclass=PoolMeta):
return pl_sorted[len(pl)-1][t]
return Decimal(0)
def _get_pricing_base_quantity(self):
quantity = self.quantity_theorical
if quantity is None:
quantity = self.quantity
return Decimal(str(quantity or 0))
def generate_pricing(self,pc,dl,pl):
Pricing = Pool().get('pricing.pricing')
pricing = Pricing.search(['price_component','=',pc.id])
if pricing:
Pricing.delete(pricing)
base_quantity = self._get_pricing_base_quantity()
cumul_qt = 0
index = 0
dl_sorted = sorted(dl)
@@ -1716,10 +1782,10 @@ class Line(metaclass=PoolMeta):
#p.fixed_qt_price = p.get_fixed_price()
if p.fixed_qt_price == 0:
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg_minus_1')),4)
p.unfixed_qt = round(Decimal(self.quantity_theorical) - Decimal(cumul_qt),5)
p.unfixed_qt = round(base_quantity - Decimal(cumul_qt),5)
if p.unfixed_qt < 0.001:
p.unfixed_qt = Decimal(0)
p.fixed_qt = Decimal(self.quantity_theorical)
p.fixed_qt = base_quantity
if price > 0:
p.unfixed_qt_price = price
else:

View File

@@ -105,8 +105,12 @@ class Component(metaclass=PoolMeta):
def get_quota_sale(self, name):
if self.sale_line:
if self.sale_line.quantity:
return round(self.sale_line.quantity_theorical / (self.nbdays if self.nbdays > 0 else 1),4)
quantity = getattr(self.sale_line, 'quantity_theorical', None)
if quantity is None:
quantity = getattr(self.sale_line, 'quantity', None)
if quantity is not None:
nbdays = self.nbdays if self.nbdays and self.nbdays > 0 else 1
return round(Decimal(quantity) / nbdays, 4)
class Pricing(metaclass=PoolMeta):
"Pricing"
@@ -120,9 +124,12 @@ class Pricing(metaclass=PoolMeta):
return self.sale_line.unit
def get_eod_price_sale(self):
if self.sale_line:
return round((self.fixed_qt * self.fixed_qt_price + self.unfixed_qt * self.unfixed_qt_price)/Decimal(self.sale_line.quantity),4)
return Decimal(0)
return self._weighted_average_price(
self.fixed_qt,
self.fixed_qt_price,
self.unfixed_qt,
self.unfixed_qt_price,
)
class Summary(ModelSQL,ModelView):
"Pricing summary"
@@ -225,6 +232,8 @@ class Sale(metaclass=PoolMeta):
'bank.account', "Bank Account",
domain=[('id', 'in', Eval('bank_accounts', []))],
depends=['bank_accounts'])
our_bank_account = fields.Many2One(
'bank.account', "Our Bank Account")
from_location = fields.Many2One('stock.location', 'From location', required=True,domain=[('type', "!=", 'customer')])
to_location = fields.Many2One('stock.location', 'To location', required=True,domain=[('type', "!=", 'supplier')])
shipment_out = fields.Many2One('stock.shipment.out','Sales')
@@ -253,8 +262,12 @@ class Sale(metaclass=PoolMeta):
'sale',
'Analytic Dimensions'
)
trader = fields.Many2One('party.party',"Trader")
operator = fields.Many2One('party.party',"Operator")
trader = fields.Many2One(
'party.party', "Trader",
domain=[('categories.name', '=', 'TRADER')])
operator = fields.Many2One(
'party.party', "Operator",
domain=[('categories.name', '=', 'OPERATOR')])
our_reference = fields.Char("Our Reference")
company_visible = fields.Function(
fields.Boolean("Visible"), 'on_change_with_company_visible')
@@ -277,6 +290,17 @@ class Sale(metaclass=PoolMeta):
return account
return party_bank_accounts[0]
def _get_default_our_bank_account(self):
if (not self.company or not self.company.party
or not self.company.party.bank_accounts):
return None
company_bank_accounts = list(self.company.party.bank_accounts)
if self.currency:
for account in company_bank_accounts:
if account.currency == self.currency:
return account
return company_bank_accounts[0]
@fields.depends('party', '_parent_party.bank_accounts')
def on_change_with_bank_accounts(self, name=None):
if self.party and self.party.bank_accounts:
@@ -285,14 +309,25 @@ class Sale(metaclass=PoolMeta):
@fields.depends(
'company', 'party', 'invoice_party', 'shipment_party', 'warehouse',
'payment_term', 'lines', 'bank_account', '_parent_party.bank_accounts')
'payment_term', 'lines', 'bank_account', 'our_bank_account',
'_parent_party.bank_accounts', '_parent_company.party')
def on_change_party(self):
super().on_change_party()
self.bank_account = self._get_default_bank_account()
self.our_bank_account = self._get_default_our_bank_account()
@fields.depends('party', 'currency', '_parent_party.bank_accounts')
@fields.depends(
'party', 'company', 'currency', '_parent_party.bank_accounts',
'_parent_company.party')
def on_change_currency(self):
self.bank_account = self._get_default_bank_account()
self.our_bank_account = self._get_default_our_bank_account()
@fields.depends('company', 'currency', 'our_bank_account',
'_parent_company.party')
def on_change_company(self):
super().on_change_company()
self.our_bank_account = self._get_default_our_bank_account()
@classmethod
def default_wb(cls):
@@ -323,6 +358,25 @@ class Sale(metaclass=PoolMeta):
def default_tol_max(cls):
return 0
@staticmethod
def _has_matched_physical_lots(sale):
for line in sale.lines or []:
for lot in line.lots or []:
if (
getattr(lot, 'lot_type', None) == 'physic'
and getattr(lot, 'line', None)
and getattr(lot, 'sale_line', None)):
return True
return False
@classmethod
def delete(cls, sales):
for sale in sales:
if cls._has_matched_physical_lots(sale):
raise UserError(
"You cannot delete a sale matched to a purchase")
super().delete(sales)
def _get_report_lines(self):
return [line for line in self.lines if getattr(line, 'type', None) == 'line']
@@ -396,64 +450,197 @@ class Sale(metaclass=PoolMeta):
return line.note
return ''
@property
def report_gross(self):
@staticmethod
def _get_report_line_lots(line):
return list(getattr(line, 'lots', []) or [])
@classmethod
def _get_report_preferred_lots(cls, line):
lots = cls._get_report_line_lots(line)
physicals = [
lot for lot in lots
if getattr(lot, 'lot_type', None) == 'physic'
]
if physicals:
return physicals
virtuals = [
lot for lot in lots
if getattr(lot, 'lot_type', None) == 'virtual'
]
if len(virtuals) == 1:
return virtuals
return []
@staticmethod
def _get_report_lot_hist_weights(lot):
if not lot:
return None, None
if hasattr(lot, 'get_hist_quantity'):
net, gross = lot.get_hist_quantity()
return (
Decimal(str(net or 0)),
Decimal(str(gross if gross not in (None, '') else net or 0)),
)
hist = list(getattr(lot, 'lot_hist', []) or [])
state = getattr(lot, 'lot_state', None)
state_id = getattr(state, 'id', None)
if state_id is not None:
for entry in hist:
quantity_type = getattr(entry, 'quantity_type', None)
if getattr(quantity_type, 'id', None) == state_id:
net = Decimal(str(getattr(entry, 'quantity', 0) or 0))
gross = Decimal(str(
getattr(entry, 'gross_quantity', None)
if getattr(entry, 'gross_quantity', None) not in (None, '')
else net))
return net, gross
return None, None
@classmethod
def _get_report_line_weights(cls, line):
lots = cls._get_report_preferred_lots(line)
if lots:
net_total = Decimal(0)
gross_total = Decimal(0)
for lot in lots:
net, gross = cls._get_report_lot_hist_weights(lot)
if net is None:
continue
net_total += net
gross_total += gross
if net_total or gross_total:
return net_total, gross_total
quantity = Decimal(str(getattr(line, 'quantity', 0) or 0))
return quantity, quantity
@classmethod
def _get_report_line_unit(cls, line):
lots = cls._get_report_preferred_lots(line)
if lots and getattr(lots[0], 'lot_unit_line', None):
return lots[0].lot_unit_line
return getattr(line, 'unit', None)
def _get_report_total_unit(self):
virtual_units = []
for line in self._get_report_lines():
for lot in self._get_report_line_lots(line):
if (
getattr(lot, 'lot_type', None) == 'virtual'
and getattr(lot, 'lot_unit_line', None)):
virtual_units.append(lot.lot_unit_line)
if len(virtual_units) == 1:
return virtual_units[0]
line = self._get_report_first_line()
if line:
return self._get_report_line_unit(line)
return None
@staticmethod
def _get_report_unit_wording(unit):
label = ''
for attr in ('symbol', 'rec_name', 'name'):
value = getattr(unit, attr, None)
if value:
label = str(value).strip().upper()
break
mapping = {
'MT': ('METRIC TON', 'METRIC TONS'),
'METRIC TON': ('METRIC TON', 'METRIC TONS'),
'METRIC TONS': ('METRIC TON', 'METRIC TONS'),
'KG': ('KILOGRAM', 'KILOGRAMS'),
'KGS': ('KILOGRAM', 'KILOGRAMS'),
'KILOGRAM': ('KILOGRAM', 'KILOGRAMS'),
'KILOGRAMS': ('KILOGRAM', 'KILOGRAMS'),
'LB': ('POUND', 'POUNDS'),
'LBS': ('POUND', 'POUNDS'),
'POUND': ('POUND', 'POUNDS'),
'POUNDS': ('POUND', 'POUNDS'),
'BALE': ('BALE', 'BALES'),
'BALES': ('BALE', 'BALES'),
}
if label in mapping:
return mapping[label]
if label.endswith('S') and len(label) > 1:
return label[:-1], label
return label, label
@classmethod
def _report_quantity_to_words(cls, quantity, unit):
singular, plural = cls._get_report_unit_wording(unit)
return quantity_to_words(
quantity,
unit_singular=singular,
unit_plural=plural,
)
@staticmethod
def _convert_report_quantity(quantity, from_unit, to_unit):
value = Decimal(str(quantity or 0))
if not from_unit or not to_unit:
return value
if getattr(from_unit, 'id', None) == getattr(to_unit, 'id', None):
return value
from_name = getattr(from_unit, 'rec_name', None)
to_name = getattr(to_unit, 'rec_name', None)
if from_name and to_name and from_name == to_name:
return value
Uom = Pool().get('product.uom')
converted = Uom.compute_qty(from_unit, float(value), to_unit) or 0
return Decimal(str(converted))
def _get_report_total_weight(self, index):
lines = self._get_report_lines()
if lines:
if not lines:
return None
total_unit = self._get_report_total_unit()
total = Decimal(0)
for line in lines:
phys_lots = [l for l in line.lots if l.lot_type == 'physic']
if phys_lots:
total += sum(Decimal(str(l.get_current_gross_quantity() or 0))
for l in phys_lots)
else:
total += Decimal(str(line.quantity or 0))
quantity = self._get_report_line_weights(line)[index]
total += self._convert_report_quantity(
quantity,
self._get_report_line_unit(line),
total_unit,
)
return total
@property
def report_gross(self):
total = self._get_report_total_weight(1)
if total is not None:
return total
return ''
@property
def report_net(self):
lines = self._get_report_lines()
if lines:
total = Decimal(0)
for line in lines:
phys_lots = [l for l in line.lots if l.lot_type == 'physic']
if phys_lots:
total += sum(Decimal(str(l.get_current_quantity() or 0))
for l in phys_lots)
else:
total += Decimal(str(line.quantity or 0))
total = self._get_report_total_weight(0)
if total is not None:
return total
return ''
@property
def report_total_quantity(self):
lines = self._get_report_lines()
if lines:
total = sum(Decimal(str(line.quantity or 0)) for line in lines)
total = self._get_report_total_weight(0)
if total is not None:
return self._format_report_number(total, keep_trailing_decimal=True)
return '0.0'
@property
def report_quantity_unit_upper(self):
line = self._get_report_first_line()
if line and line.unit:
return line.unit.rec_name.upper()
unit = self._get_report_line_unit(line) if line else None
if unit and unit.rec_name:
return unit.rec_name.upper()
return ''
def _get_report_line_quantity(self, line):
phys_lots = [l for l in line.lots if l.lot_type == 'physic']
if phys_lots:
return sum(Decimal(str(l.get_current_quantity() or 0))
for l in phys_lots)
return Decimal(str(line.quantity or 0))
return self._get_report_line_weights(line)[0]
@property
def report_qt(self):
lines = self._get_report_lines()
if lines:
total = sum(self._get_report_line_quantity(line) for line in lines)
return quantity_to_words(total)
total = self._get_report_total_weight(0)
if total is not None:
return self._report_quantity_to_words(
total, self._get_report_total_unit())
return ''
@property
@@ -466,8 +653,12 @@ class Sale(metaclass=PoolMeta):
current_quantity = self._get_report_line_quantity(line)
quantity = self._format_report_number(
current_quantity, keep_trailing_decimal=True)
unit = line.unit.rec_name.upper() if line.unit and line.unit.rec_name else ''
words = quantity_to_words(current_quantity)
line_unit = self._get_report_line_unit(line)
unit = (
line_unit.rec_name.upper()
if line_unit and line_unit.rec_name else ''
)
words = self._report_quantity_to_words(current_quantity, line_unit)
period = line.del_period.description if getattr(line, 'del_period', None) else ''
detail = ' '.join(
part for part in [
@@ -514,10 +705,49 @@ class Sale(metaclass=PoolMeta):
@property
def report_deal(self):
if self.lines and self.lines[0].lots and len(self.lines[0].lots)>1:
return self.lines[0].lots[1].line.purchase.number + ' ' + self.number
else:
''
if self.lines and self.lines[0].lots and len(self.lines[0].lots) > 1:
purchase = getattr(getattr(self.lines[0].lots[1], 'line', None),
'purchase', None)
purchase_number = getattr(purchase, 'number', None)
purchase_number = self._format_report_deal_number(
purchase_number, 'P')
sale_number = self._format_report_deal_number(self.number, 'S')
return ' '.join(
number for number in [purchase_number, sale_number] if number)
return ''
@staticmethod
def _format_report_deal_number(number, prefix):
if not number:
return ''
number = str(number)
expected_prefix = prefix + '-'
if number.upper().startswith(expected_prefix):
return number
return expected_prefix + number
@property
def report_melya_proforma_number(self):
return self.report_deal or self.full_number or ''
@property
def report_melya_buyer_address(self):
if not self.invoice_address:
return ''
with Transaction().set_context(address_with_party=True):
return self.invoice_address.full_address
@property
def report_melya_incoterm(self):
parts = []
if self.incoterm and self.incoterm.code:
parts.append(self.incoterm.code)
if self.incoterm_location:
if self.incoterm_location.party_name:
parts.append(self.incoterm_location.party_name)
if self.incoterm_location.country:
parts.append(self.incoterm_location.country.name)
return ' '.join(parts)
@property
def report_packing(self):
@@ -554,8 +784,12 @@ class Sale(metaclass=PoolMeta):
current_quantity = self._get_report_line_quantity(line)
quantity = self._format_report_number(
current_quantity, keep_trailing_decimal=True)
unit = line.unit.rec_name.upper() if line.unit and line.unit.rec_name else ''
words = quantity_to_words(current_quantity)
line_unit = self._get_report_line_unit(line)
unit = (
line_unit.rec_name.upper()
if line_unit and line_unit.rec_name else ''
)
words = self._report_quantity_to_words(current_quantity, line_unit)
period = line.del_period.description if getattr(line, 'del_period', None) else ''
quantity_line = ' '.join(
part for part in [
@@ -610,6 +844,51 @@ class Sale(metaclass=PoolMeta):
payment_date = format_date_en(payment_date)
return payment_date
def _get_report_bill_amount(self):
invoices = [
invoice for invoice in (self.invoices or [])
if getattr(invoice, 'state', None) != 'cancelled'
]
if invoices:
invoice = sorted(
invoices,
key=lambda i: (
getattr(i, 'invoice_date', None) or datetime.date.min,
getattr(i, 'id', 0)))[0]
return Decimal(str(getattr(invoice, 'total_amount', 0) or 0))
return Decimal(str(self.total_amount or 0))
@property
def report_bill_amount(self):
return self._get_report_bill_amount()
@property
def report_bill_amount_words(self):
value = self._get_report_bill_amount()
if self.currency and (self.currency.rec_name or '').upper() == 'USC':
return amount_to_currency_words(value, 'USC', 'USC')
return amount_to_currency_words(value)
@property
def report_bill_maturity_date(self):
maturity_dates = []
for invoice in (self.invoices or []):
if getattr(invoice, 'state', None) == 'cancelled':
continue
for line in (invoice.lines_to_pay or []):
if getattr(line, 'maturity_date', None):
maturity_dates.append(line.maturity_date)
if maturity_dates:
return min(maturity_dates)
if self.lc_date:
return self.lc_date
line = self._get_report_first_line()
if line and self.payment_term and self.payment_term.lines:
Date = Pool().get('ir.date')
return self.payment_term.lines[0].get_date(Date.today(), line)
@property
def report_shipment(self):
if self.lines:
@@ -763,6 +1042,30 @@ class PriceComposition(metaclass=PoolMeta):
class SaleLine(metaclass=PoolMeta):
__name__ = 'sale.line'
def get_invoice_line(self, lots=None, action=None):
lines = super().get_invoice_line(lots, action)
if action != 'prov' or not lots:
return lines
padding_by_lot = {
lot.id: Decimal(str(getattr(lot, 'sale_invoice_padding', 0) or 0))
for lot in lots}
for invoice_line in lines:
if (getattr(invoice_line, 'invoice_type', None) != 'out'
or getattr(invoice_line, 'description', None) != 'Pro forma'
or Decimal(str(getattr(invoice_line, 'quantity', 0) or 0)) <= 0):
continue
lot = getattr(invoice_line, 'lot', None)
lot_id = getattr(lot, 'id', lot)
padding = padding_by_lot.get(lot_id, Decimal(0))
if not padding:
continue
quantity = Decimal(str(invoice_line.quantity or 0)) + padding
if invoice_line.unit:
quantity = Decimal(str(invoice_line.unit.round(float(quantity))))
invoice_line.quantity = quantity
return lines
@classmethod
def default_pricing_rule(cls):
try:
@@ -974,6 +1277,10 @@ class SaleLine(metaclass=PoolMeta):
PS = Pool().get('sale.pricing.summary')
ps = PS.search(['sale_line','=',self.id])
if ps:
if not self.price_components:
manual = [e for e in ps if not e.price_component]
if manual:
return manual[0].progress or 0
return sum((e.progress if e.progress else 0) * (e.ratio if e.ratio else 0) / 100 for e in ps)
def getVirtualLot(self):
@@ -989,8 +1296,9 @@ class SaleLine(metaclass=PoolMeta):
unit_factor = Decimal(1)
if self.linked_unit:
source_unit = getattr(self, 'unit', None)
if not source_unit and self.product:
source_unit = self.product.sale_uom
product = getattr(self, 'product', None)
if not source_unit and product:
source_unit = product.sale_uom
if not source_unit:
return factor
Uom = Pool().get('product.uom')
@@ -1028,6 +1336,14 @@ class SaleLine(metaclass=PoolMeta):
def _get_basis_component_price(self):
price = Decimal(0)
if not self.price_components:
PP = Pool().get('sale.pricing.summary')
pp = PP.search([
('sale_line', '=', self.id),
('price_component', '=', None),
], limit=1)
if pp:
return round(Decimal(pp[0].price or 0), 4)
for pc in self.price_components:
PP = Pool().get('sale.pricing.summary')
pp = PP.search([('price_component','=',pc.id),('sale_line','=',self.id)])
@@ -1050,6 +1366,14 @@ class SaleLine(metaclass=PoolMeta):
+ Decimal(lot_premium or 0)),
4)
@fields.depends('product', 'quantity', 'unit_price',
methods=['_get_context_sale_price'])
def compute_unit_price(self):
unit_price = super().compute_unit_price()
if unit_price is None:
unit_price = self.unit_price
return unit_price
@fields.depends('id','unit','quantity','unit_price','price_pricing','price_type','price_components','estimated_date','lots','fees','enable_linked_currency','linked_price','linked_currency','linked_unit')
def on_change_with_unit_price(self, name=None):
Date = Pool().get('ir.date')
@@ -1135,19 +1459,9 @@ class SaleLine(metaclass=PoolMeta):
Pricing = Pool().get('pricing.pricing')
pricings = Pricing.search(['price_component','=',pc.id],order=[('pricing_date', 'ASC')])
if pricings:
cumul_qt = Decimal(0)
index = 0
for pr in pricings:
cumul_qt += pr.quantity
pr.fixed_qt = cumul_qt
pr.fixed_qt_price = pr.get_fixed_price()
pr.unfixed_qt = Decimal(pr.sale_line.quantity_theorical) - pr.fixed_qt
pr.unfixed_qt_price = pr.fixed_qt_price
pr.eod_price = pr.get_eod_price_sale()
if index == len(pricings) - 1:
pr.last = True
index += 1
Pricing.save([pr])
Pricing._sync_manual_values(pricings)
Pricing._sync_manual_last(pricings)
Pricing._sync_eod_price(pricings)
if pc.triggers and pc.auto:
prDate = []
@@ -1199,11 +1513,18 @@ class SaleLine(metaclass=PoolMeta):
return pl_sorted[len(pl)-1][t]
return Decimal(0)
def _get_pricing_base_quantity(self):
quantity = self.quantity_theorical
if quantity is None:
quantity = self.quantity
return Decimal(str(quantity or 0))
def generate_pricing(self,pc,dl,pl):
Pricing = Pool().get('pricing.pricing')
pricing = Pricing.search(['price_component','=',pc.id])
if pricing:
Pricing.delete(pricing)
base_quantity = self._get_pricing_base_quantity()
cumul_qt = 0
index = 0
dl_sorted = sorted(dl)
@@ -1226,10 +1547,10 @@ class SaleLine(metaclass=PoolMeta):
#p.fixed_qt_price = p.get_fixed_price()
if p.fixed_qt_price == 0:
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg_minus_1',pc.pricing_date)),4)
p.unfixed_qt = round(Decimal(self.quantity_theorical) - Decimal(cumul_qt),4)
p.unfixed_qt = round(base_quantity - Decimal(cumul_qt),4)
if p.unfixed_qt < 0.001:
p.unfixed_qt = Decimal(0)
p.fixed_qt = Decimal(self.quantity_theorical)
p.fixed_qt = base_quantity
if price > 0:
logger.info("GENERATE_1:%s",price)
p.unfixed_qt_price = price

View File

@@ -105,6 +105,17 @@ class InvoiceLine(metaclass=PoolMeta):
lot = fields.Many2One('lot.lot',"Lot")
fee = fields.Many2One('fee.fee',"Fee")
included_padding = fields.Function(
fields.Numeric("Inc. padding", digits=(1, 5)),
'get_included_padding')
def get_included_padding(self, name):
if (self.lot
and self.invoice_type == 'out'
and self.description == 'Pro forma'
and Decimal(str(self.quantity or 0)) > 0):
return self.lot.sale_invoice_padding or Decimal(0)
return Decimal(0)
@classmethod
def validate(cls, lines):
@@ -764,6 +775,25 @@ class ShipmentIn(metaclass=PoolMeta):
return self.bl_date.strftime('%d-%m-%Y')
return ''
@property
def report_packing_today_date(self):
Date = Pool().get('ir.date')
today = Date.today()
if not today:
return ''
return f"{today.strftime('%B')} {today.day}, {today.year}"
@property
def report_packing_weight_unit(self):
line = self._get_report_trade_line()
unit = getattr(line, 'unit', None) if line else None
if unit:
return (
getattr(unit, 'symbol', None)
or getattr(unit, 'rec_name', None)
or '')
return self.report_packing_invoice_qty_unit or 'KGS'
@property
def report_packing_gross_weight(self):
_, gross = self._get_report_weight_totals()
@@ -774,6 +804,100 @@ class ShipmentIn(metaclass=PoolMeta):
net, _ = self._get_report_weight_totals()
return self._format_report_quantity(net)
@property
def report_coo_exporter(self):
company = getattr(self, 'company', None)
party = getattr(company, 'party', None) if company else None
if not party:
return ''
address = party.address_get() if hasattr(party, 'address_get') else None
lines = [getattr(party, 'rec_name', None) or getattr(party, 'name', None) or '']
if address and getattr(address, 'full_address', None):
lines.append(address.full_address)
return '\n'.join(filter(None, lines))
@property
def report_coo_consignee(self):
trade = self._get_report_trade()
party = getattr(trade, 'party', None) if trade else None
if not party:
return ''
address = party.address_get() if hasattr(party, 'address_get') else None
lines = [getattr(party, 'rec_name', None) or getattr(party, 'name', None) or '']
if address and getattr(address, 'full_address', None):
lines.append(address.full_address)
return '\n'.join(filter(None, lines))
@property
def report_coo_number(self):
return getattr(self, 'reference', None) or self.number or ''
@property
def report_coo_transport(self):
parts = []
if self.bl_number:
parts.append(f"B/L {self.bl_number}")
ship_name = self.report_packing_ship_name
if ship_name:
parts.append(ship_name)
if self.booking:
parts.append(f"Booking {self.booking}")
return ' - '.join(parts)
@property
def report_coo_origin_country(self):
return self.report_packing_origin or ''
@property
def report_coo_observations(self):
parts = []
contract = self.report_packing_contract_number
if contract:
parts.append(f"Contract: {contract}")
if self.note:
parts.append(self.note)
return '\n'.join(filter(None, parts))
@property
def report_coo_goods_description(self):
parts = [self.report_product_name, self.report_product_description]
if self.container:
container_numbers = ', '.join(
filter(None, (getattr(c, 'container_no', None) or '' for c in self.container)))
if container_numbers:
parts.append(f"Container(s): {container_numbers}")
return '\n'.join(filter(None, parts))
@property
def report_coo_net_weight(self):
return self.report_packing_net_weight
@property
def report_coo_gross_weight(self):
return self.report_packing_gross_weight
@property
def report_coo_weight_unit(self):
return self.report_packing_weight_unit or ''
@property
def report_coo_net_weight_display(self):
parts = [self.report_coo_net_weight, self.report_coo_weight_unit]
return ' '.join(part for part in parts if part)
@property
def report_coo_gross_weight_display(self):
parts = [self.report_coo_gross_weight, self.report_coo_weight_unit]
return ' '.join(part for part in parts if part)
@property
def report_coo_issue_date(self):
Date = Pool().get('ir.date')
today = Date.today()
if not today:
return ''
return today.strftime('%d-%m-%Y')
def get_rec_name(self, name=None):
if self.number:
return self.number + '[' + (self.vessel.vessel_name if self.vessel else '') + (('-' + self.travel_nb) if self.travel_nb else '') + ']'
@@ -783,13 +907,20 @@ class ShipmentIn(metaclass=PoolMeta):
def create_fee(self,controller):
Fee = Pool().get('fee.fee')
Product = Pool().get('product.product')
if not controller:
logger.info("CREATE_FEE_SKIPPED:NO_CONTROLLER shipment=%s", self)
return
fee = Fee()
fee.shipment_in = self.id
fee.supplier = controller
fee.type = 'budgeted'
fee.p_r = 'pay'
price,mode,curr,unit = controller.get_sla_cost(self.to_location)
if price and mode and curr and unit:
if not (price and mode and curr and unit):
logger.info(
"CREATE_FEE_SKIPPED:NO_SLA shipment=%s controller=%s location=%s",
self, controller, self.to_location)
return
fee.mode = mode
fee.currency = curr
fee.unit = unit
@@ -971,7 +1102,6 @@ class ShipmentIn(metaclass=PoolMeta):
sale_line.linked_currency = 1
sale_line.linked_unit = Uom.get_by_name(sell_price_unit)
sale_line.linked_price = round(sell_price,4)
sale_line.unit_price = sale_line.get_price_linked_currency()
else:
sale.currency = Currency.get_by_name(sell_price_currency)
sale_line.unit_price = round(sell_price,4)
@@ -984,6 +1114,8 @@ class ShipmentIn(metaclass=PoolMeta):
sale_line.product = Product.get_by_name('BRAZIL COTTON')
logger.info("PRODUCT:%s",sale_line.product)
sale_line.unit = Uom.get_by_name(lot_unit)
if sell_price_currency == 'USC':
sale_line.unit_price = sale_line.get_price_linked_currency()
sale_line.price_type = 'priced'
sale_line.created_by_code = False
sale_line.note = dec_key
@@ -2283,3 +2415,12 @@ class ShipmentPackingListReport(ShipmentTemplateReportMixin, BaseSupplierShippin
def _resolve_configured_report_path(cls, action):
return cls._resolve_template_path(
'shipment_packing_list_report_template', 'stock')
class ShipmentCOOReport(ShipmentTemplateReportMixin, BaseSupplierShipping):
__name__ = 'stock.shipment.in.coo'
@classmethod
def _resolve_configured_report_path(cls, action):
return cls._resolve_template_path(
'shipment_coo_report_template', 'stock')

View File

@@ -8,6 +8,11 @@ this repository contains the full copyright notices and license terms. -->
<field name="inherit" ref="stock.shipment_in_view_form"/>
<field name="name">shipment_in_form</field>
</record>
<record model="ir.ui.view" id="shipment_in_view_tree">
<field name="model">stock.shipment.in</field>
<field name="inherit" ref="stock.shipment_in_view_tree"/>
<field name="name">shipment_in_tree</field>
</record>
<record model="ir.ui.view" id="shipment_internal_view_form">
<field name="model">stock.shipment.internal</field>
<field name="inherit" ref="stock.shipment_internal_view_form"/>
@@ -73,6 +78,18 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_shipment_in_insurance"/>
</record>
<record model="ir.action.report" id="report_shipment_in_coo">
<field name="name">COO</field>
<field name="model">stock.shipment.in</field>
<field name="report_name">stock.shipment.in.coo</field>
<field name="report">stock/coo.fodt</field>
</record>
<record model="ir.action.keyword" id="report_shipment_in_coo_keyword">
<field name="keyword">form_print</field>
<field name="model">stock.shipment.in,-1</field>
<field name="action" ref="report_shipment_in_coo"/>
</record>
<record model="ir.action.report" id="report_shipment_in_packing_list">
<field name="name">Packing List</field>
<field name="model">stock.shipment.in</field>

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,7 @@ depends:
lot
document_incoming
incoterm
bank
xml:
purchase.xml
sale.xml

View File

@@ -76,6 +76,10 @@ class ValuationBase(ModelSQL):
}
return type_map.get(valuation_type, None)
@classmethod
def _is_finished(cls, record):
return bool(getattr(record, 'finished', False))
@classmethod
def _filter_values_by_types(cls, values, selected_types):
if selected_types is None:
@@ -406,6 +410,8 @@ class ValuationBase(ModelSQL):
sl_line = sl.sale_line
if not sl_line:
continue
if cls._is_finished(sl_line):
continue
if sl_line.price_type == 'basis':
premium_delta = cls._get_basis_premium_delta(sl_line)
@@ -633,6 +639,11 @@ class ValuationBase(ModelSQL):
result.extend(budgeted_fees)
return result
@classmethod
def _fee_amount_or_zero(cls, fee):
amount = fee.get_amount() if hasattr(fee, 'get_amount') else fee.amount
return Decimal(amount or 0)
@classmethod
def create_pnl_fee_from_line(cls, line):
fee_lines = []
@@ -641,7 +652,11 @@ class ValuationBase(ModelSQL):
FeeLots = Pool().get('fee.lots')
#if line is matched with sale_line we should add the open sale side
sale_lines = line.get_matched_lines() or []
sale_open_lots = tuple(s.lot_s for s in sale_lines if s.lot_s)
sale_open_lots = tuple(
s.lot_s for s in sale_lines
if s.lot_s and s.lot_s.sale_line
and not cls._is_finished(s.lot_s.sale_line)
)
all_lots = (line.lots or ()) + sale_open_lots
for lot in all_lots:
fl = FeeLots.search([('lot', '=', lot.id)])
@@ -654,7 +669,7 @@ class ValuationBase(ModelSQL):
qty = round(lot.get_current_quantity_converted(), 5)
if sf.mode == 'ppack' or sf.mode == 'rate':
price = sf.price
amount = sf.amount * sign
amount = cls._fee_amount_or_zero(sf) * sign
elif sf.mode == 'lumpsum':
price = sf.price
amount = sf.price * sign
@@ -713,7 +728,7 @@ class ValuationBase(ModelSQL):
qty = round(lot.get_current_quantity_converted(), 5)
if sf.mode == 'ppack' or sf.mode == 'rate':
price = sf.price
amount = sf.amount * sign
amount = cls._fee_amount_or_zero(sf) * sign
elif sf.mode == 'lumpsum':
price = sf.price
amount = sf.price * sign
@@ -821,6 +836,8 @@ class ValuationBase(ModelSQL):
def generate(cls, line, valuation_type='all'):
selected_types = cls._get_generate_types(valuation_type)
cls._delete_existing(line, selected_types=selected_types)
if cls._is_finished(line):
return
values = []
values.extend(cls.create_pnl_fee_from_line(line))
values.extend(cls.create_pnl_price_from_line(line))
@@ -837,6 +854,8 @@ class ValuationBase(ModelSQL):
def generate_from_sale_line(cls, sale_line, valuation_type='all'):
selected_types = cls._get_generate_types(valuation_type)
cls._delete_existing_sale_line(sale_line, selected_types=selected_types)
if cls._is_finished(sale_line):
return
values = []
values.extend(cls.create_pnl_fee_from_sale_line(sale_line))
values.extend(cls.create_pnl_price_from_sale_line(sale_line))

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/separator[@id='invoice']"
position="before">
<separator id="padding" string="Padding" colspan="4"/>
<label name="default_sale_padding_account"/>
<field name="default_sale_padding_account"/>
<label name="default_accrual_padding_account"/>
<field name="default_accrual_padding_account"/>
</xpath>
</data>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/notebook/page[@id='general']/label[@name='quantity']" position="before">
<label name="included_padding"/>
<field name="included_padding"/>
</xpath>
</data>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='quantity']" position="after">
<field name="included_padding" symbol="unit"/>
</xpath>
</data>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/label[@name='warrant_nb']" position="before">
<label name="sale_invoice_padding"/>
<field name="sale_invoice_padding"/>
</xpath>
</data>

View File

@@ -16,6 +16,8 @@
<field name="amount"/>
<label name="quantity_s"/>
<field name="quantity_s"/>
<label name="sale_padding"/>
<field name="sale_padding"/>
<label name="amount_s"/>
<field name="amount_s"/>
<newline/>

View File

@@ -3,6 +3,7 @@
<prefix name="qt_icon"/>
</field>
<field name="r_lot_p" width="60"/>
<field name="r_del_period" width="110"/>
<field name="r_supplier" width="90"/>
<field name="r_purchase" width="120"/>
<field name="r_lot_pur_inv" width="120"/>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='lot_quantity']" position="after">
<field name="sale_invoice_padding" optional="1"/>
</xpath>
</data>

View File

@@ -4,6 +4,7 @@
<field name="lot_shipment_origin"/>
<field name="lot_product"/>
<field name="lot_unit_line"/>
<field name="lot_qt"/>
<field name="lot_quantity"/>
<field name="lot_gross_quantity"/>
<field name="lot_quantity_new"/>

View File

@@ -80,7 +80,10 @@ this repository contains the full copyright notices and license terms. -->
</page>
</xpath>
<xpath expr="/form/notebook/page[@id='info']/label[@name='invoice_party']" position="before">
<field name="bank_accounts" colspan="4" invisible="1"/>
<label name="bank_account"/>
<field name="bank_account"/>
<label name="our_bank_account"/>
<field name="our_bank_account"/>
</xpath>
</data>

View File

@@ -93,7 +93,10 @@ this repository contains the full copyright notices and license terms. -->
<field name="incoterm_location"/>
</xpath>
<xpath expr="/form/notebook/page[@id='other']/label[@name='company']" position="before">
<field name="bank_accounts" colspan="4" invisible="1"/>
<label name="bank_account"/>
<field name="bank_account"/>
<label name="our_bank_account"/>
<field name="our_bank_account"/>
</xpath>
</data>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/tree/field[@name='number']" position="after">
<field name="bl_number"/>
</xpath>
</data>

View File

@@ -3,32 +3,60 @@
<separator id="sale_templates" string="Sale" colspan="4"/>
<label name="sale_report_template"/>
<field name="sale_report_template" colspan="3"/>
<label name="sale_report_label"/>
<field name="sale_report_label" colspan="3"/>
<label name="sale_bill_report_template"/>
<field name="sale_bill_report_template" colspan="3"/>
<label name="sale_bill_report_label"/>
<field name="sale_bill_report_label" colspan="3"/>
<label name="sale_final_report_template"/>
<field name="sale_final_report_template" colspan="3"/>
<separator id="invoice_templates" string="Invoice" colspan="4"/>
<label name="invoice_report_template"/>
<field name="invoice_report_template" colspan="3"/>
<label name="invoice_report_label"/>
<field name="invoice_report_label" colspan="3"/>
<label name="invoice_cndn_report_template"/>
<field name="invoice_cndn_report_template" colspan="3"/>
<label name="invoice_cndn_report_label"/>
<field name="invoice_cndn_report_label" colspan="3"/>
<label name="invoice_prepayment_report_template"/>
<field name="invoice_prepayment_report_template" colspan="3"/>
<label name="invoice_prepayment_report_label"/>
<field name="invoice_prepayment_report_label" colspan="3"/>
<label name="invoice_packing_list_report_template"/>
<field name="invoice_packing_list_report_template" colspan="3"/>
<label name="invoice_packing_list_report_label"/>
<field name="invoice_packing_list_report_label" colspan="3"/>
<separator id="payment_templates" string="Payment" colspan="4"/>
<label name="invoice_payment_order_report_template"/>
<field name="invoice_payment_order_report_template" colspan="3"/>
<label name="invoice_payment_order_report_label"/>
<field name="invoice_payment_order_report_label" colspan="3"/>
<separator id="purchase_templates" string="Purchase" colspan="4"/>
<label name="purchase_report_template"/>
<field name="purchase_report_template" colspan="3"/>
<label name="purchase_report_label"/>
<field name="purchase_report_label" colspan="3"/>
<separator id="shipment_templates" string="Shipment" colspan="4"/>
<label name="shipment_shipping_report_template"/>
<field name="shipment_shipping_report_template" colspan="3"/>
<label name="shipment_shipping_report_label"/>
<field name="shipment_shipping_report_label" colspan="3"/>
<label name="shipment_insurance_report_template"/>
<field name="shipment_insurance_report_template" colspan="3"/>
<label name="shipment_insurance_report_label"/>
<field name="shipment_insurance_report_label" colspan="3"/>
<label name="shipment_coo_report_template"/>
<field name="shipment_coo_report_template" colspan="3"/>
<label name="shipment_coo_report_label"/>
<field name="shipment_coo_report_label" colspan="3"/>
<label name="shipment_packing_list_report_template"/>
<field name="shipment_packing_list_report_template" colspan="3"/>
<label name="shipment_packing_list_report_label"/>
<field name="shipment_packing_list_report_label" colspan="3"/>
</form>

View File

@@ -206,6 +206,12 @@ class WeightReport(ModelSQL, ModelView):
def parse_date(date_str):
logger.info("TRY_TO_PARSE:%s",date_str)
if not date_str:
return None
if isinstance(date_str, datetime.date):
return date_str
if not isinstance(date_str, str):
date_str = str(date_str)
for fmt in ('%d %B %Y', '%d %b %Y'):
try:
return dt.strptime(date_str, fmt).date()
@@ -213,6 +219,28 @@ class WeightReport(ModelSQL, ModelView):
pass
return None
def parse_bales(value):
if value in (None, ''):
return 0
if isinstance(value, (int, float, Decimal)):
return int(Decimal(str(value)).quantize(Decimal('1')))
text = str(value).strip()
if not text:
return 0
text = text.replace(' ', '')
if ',' in text and '.' in text:
text = text.replace(',', '')
elif ',' in text:
text = text.replace(',', '.')
try:
decimal_value = Decimal(text)
except Exception:
if '.' in text:
decimal_value = Decimal(text.replace('.', ''))
else:
raise
return int(decimal_value.quantize(Decimal('1')))
report['report_date'] = parse_date(report_data.get('date', ''))
# 3. Contract Information
contract_data = json_data.get('contract', {})
@@ -287,7 +315,7 @@ class WeightReport(ModelSQL, ModelView):
report['weighing_place'] = shipment_data.get('weighing_place', '')
report['weighing_method'] = shipment_data.get('weighing_method', '')
report['bales'] = int(shipment_data.get('bales', 0) or 0)
report['bales'] = parse_bales(shipment_data.get('bales', 0))
# 6. Weights Information
weights_data = json_data.get('weights', {})

View File

@@ -1,30 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<dc:date>2026-03-15T13:01:38.668000000</dc:date><meta:editing-duration>PT10M4S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="7" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="22" meta:word-count="122" meta:character-count="932" meta:non-whitespace-character-count="828"/></office:meta>
<office:meta><meta:initial-creator>Giorgio Calligaro</meta:initial-creator><meta:creation-date>2026-03-12T13:26:00</meta:creation-date><dc:date>2026-03-12T17:30:00</dc:date><meta:print-date>2026-03-12T17:29:00</meta:print-date><meta:editing-cycles>3</meta:editing-cycles><meta:editing-duration>P0D</meta:editing-duration><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="11" meta:word-count="30" meta:character-count="221" meta:non-whitespace-character-count="186"/><meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator><meta:user-defined meta:name="Company">Fintel S.A.</meta:user-defined><meta:user-defined meta:name="Operator">HACER</meta:user-defined></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">31487</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">15713</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">43623</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">21098</config:config-item>
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">6627</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">7108</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">17221</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">7202</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">31485</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">15711</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">43621</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">21096</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
<config:config-item config:name="ZoomFactor" config:type="short">140</config:config-item>
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
<config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
@@ -37,9 +35,9 @@
<config:config-item-set config:name="ooo:configuration-settings">
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">true</config:config-item>
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
@@ -68,13 +66,13 @@
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddFrameOffsets" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
<config:config-item config:name="TableRowKeep" config:type="boolean">true</config:config-item>
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
@@ -93,11 +91,11 @@
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">1907347</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">1907347</config:config-item>
<config:config-item config:name="Rsid" config:type="int">1475016</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">1475016</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">true</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">true</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
@@ -106,24 +104,25 @@
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">true</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">true</config:config-item>
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">true</config:config-item>
<config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
<config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
<config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
<config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotBreakWrappedTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">true</config:config-item>
<config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
@@ -151,11 +150,15 @@
</office:scripts>
<office:font-face-decls>
<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
<style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
</office:font-face-decls>
<office:styles>
<style:default-style style:family="graphic">
@@ -163,11 +166,11 @@
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="9pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="9pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.249cm" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
@@ -175,7 +178,10 @@
<style:default-style style:family="table-row">
<style:table-row-properties fo:keep-together="auto"/>
</style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
<style:style style:name="Standard" style:family="paragraph" style:class="text">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" style:vertical-align="auto"/>
<style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="11pt" fo:language="fr" fo:country="FR" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="fr" style:country-asian="FR" style:font-name-complex="Arial1" style:font-family-complex="Arial" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
</style:style>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
<style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
@@ -194,12 +200,12 @@
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
<style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:orphans="0" fo:widows="0" text:number-lines="false" text:line-number="0"/>
</style:style>
<style:style style:name="Placeholder" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" loext:opacity="100%" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
<style:style style:name="Normal_20_Table_20__28_WW_29_" style:display-name="Normal Table (WW)" style:family="paragraph">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.353cm" style:contextual-spacing="false" fo:line-height="115%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" style:vertical-align="auto"/>
<style:text-properties style:font-name="Calibri" fo:font-family="Calibri" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="11pt" fo:language="en" fo:country="GB" style:font-name-asian="Times New Roman" style:font-family-asian="&apos;Times New Roman&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="GB" style:font-name-complex="Times New Roman" style:font-family-complex="&apos;Times New Roman&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
</style:style>
<style:style style:name="Style1" style:family="paragraph" style:parent-style-name="Standard"/>
<style:style style:name="Default_20_Paragraph_20_Font_20__28_WW_29_" style:display-name="Default Paragraph Font (WW)" style:family="text"/>
<text:outline-style style:name="Outline">
<text:outline-level-style text:level="1" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
@@ -255,6 +261,9 @@
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
<style:default-page-layout>
<style:page-layout-properties style:layout-grid-standard-mode="true"/>
</style:default-page-layout>
<loext:theme loext:name="Office Theme">
<loext:theme-colors loext:name="LibreOffice">
<loext:color loext:name="dark1" loext:color="#000000"/>
@@ -273,239 +282,154 @@
</loext:theme>
</office:styles>
<office:automatic-styles>
<style:style style:name="BillOfExchange" style:family="table">
<style:table-properties style:width="20.001cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
<style:style style:name="Tableau1" style:family="table">
<style:table-properties style:width="15.24cm" fo:margin-left="0.635cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left" style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="BillOfExchange.A" style:family="table-column">
<style:table-column-properties style:column-width="4.75cm"/>
<style:style style:name="Tableau1.A" style:family="table-column">
<style:table-column-properties style:column-width="1.905cm"/>
</style:style>
<style:style style:name="BillOfExchange.B" style:family="table-column">
<style:table-column-properties style:column-width="15.251cm"/>
<style:style style:name="Tableau1.B" style:family="table-column">
<style:table-column-properties style:column-width="2.54cm"/>
</style:style>
<style:style style:name="BillOfExchange.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
<style:style style:name="Tableau1.C" style:family="table-column">
<style:table-column-properties style:column-width="2.332cm"/>
</style:style>
<style:style style:name="BillOfExchange.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.101cm" fo:border="0.5pt solid #000000"/>
<style:style style:name="Tableau1.D" style:family="table-column">
<style:table-column-properties style:column-width="1.478cm"/>
</style:style>
<style:style style:name="Inner1" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
<style:style style:name="Tableau1.E" style:family="table-column">
<style:table-column-properties style:column-width="0.953cm"/>
</style:style>
<style:style style:name="Inner1.A" style:family="table-column">
<style:table-column-properties style:column-width="4.001cm"/>
<style:style style:name="Tableau1.F" style:family="table-column">
<style:table-column-properties style:column-width="6.031cm"/>
</style:style>
<style:style style:name="Inner1.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
<style:style style:name="Tableau1.1" style:family="table-row">
<style:table-row-properties style:min-row-height="2.223cm" fo:keep-together="auto"/>
</style:style>
<style:style style:name="Inner1.C" style:family="table-column">
<style:table-column-properties style:column-width="10.899cm"/>
<style:style style:name="Tableau1.A1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="" fo:padding-left="0.123cm" fo:padding-right="0.123cm" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:border="none" style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="Inner1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
<style:style style:name="Tableau1.2" style:family="table-row">
<style:table-row-properties fo:keep-together="always"/>
</style:style>
<style:style style:name="Inner1.C1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="middle" fo:padding="0.101cm" fo:border="1.5pt solid #000000"/>
<style:style style:name="Tableau1.3" style:family="table-row">
<style:table-row-properties fo:keep-together="always"/>
</style:style>
<style:style style:name="Inner2" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
<style:style style:name="Tableau1.4" style:family="table-row">
<style:table-row-properties fo:keep-together="always"/>
</style:style>
<style:style style:name="Inner2.A" style:family="table-column">
<style:table-column-properties style:column-width="4.5cm"/>
</style:style>
<style:style style:name="Inner2.B" style:family="table-column">
<style:table-column-properties style:column-width="13.899cm"/>
</style:style>
<style:style style:name="Inner2.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner2.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner3" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner3.A" style:family="table-column">
<style:table-column-properties style:column-width="18.399cm"/>
</style:style>
<style:style style:name="Inner3.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner4" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner4.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner4.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner4.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner4.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner5" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner5.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner5.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner5.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner5.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner6" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner6.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner6.F" style:family="table-column">
<style:table-column-properties style:column-width="3.902cm"/>
</style:style>
<style:style style:name="Inner6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner6.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner1" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner1.A" style:family="table-column">
<style:table-column-properties style:column-width="4.001cm"/>
</style:style>
<style:style style:name="Inner1.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner1.C" style:family="table-column">
<style:table-column-properties style:column-width="10.899cm"/>
</style:style>
<style:style style:name="Inner1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner1.C1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="middle" fo:padding="0.101cm" fo:border="1.5pt solid #000000"/>
</style:style>
<style:style style:name="Inner2" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner2.A" style:family="table-column">
<style:table-column-properties style:column-width="4.5cm"/>
</style:style>
<style:style style:name="Inner2.B" style:family="table-column">
<style:table-column-properties style:column-width="13.899cm"/>
</style:style>
<style:style style:name="Inner2.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner2.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner3" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner3.A" style:family="table-column">
<style:table-column-properties style:column-width="18.399cm"/>
</style:style>
<style:style style:name="Inner3.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner4" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner4.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner4.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner4.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner4.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner5" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner5.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner5.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner5.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner5.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner6" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner6.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner6.F" style:family="table-column">
<style:table-column-properties style:column-width="3.902cm"/>
</style:style>
<style:style style:name="Inner6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner6.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
<style:style style:name="Tableau1.5" style:family="table-row">
<style:table-row-properties fo:keep-together="auto"/>
</style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt" fo:font-weight="bold"/>
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="5pt" fo:language="en" fo:country="GB" fo:font-weight="bold" style:font-size-asian="5pt" style:font-weight-asian="bold" style:font-size-complex="5pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="end" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="3pt" fo:language="en" fo:country="GB" style:font-size-asian="3pt" style:font-size-complex="3pt"/>
</style:style>
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Style1">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" style:font-size-asian="8pt" style:font-size-complex="8pt" text:display="none"/>
</style:style>
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Style1">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="9pt" fo:font-weight="bold"/>
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Style1">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Style1">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:writing-mode="lr-tb">
<style:tab-stops>
<style:tab-stop style:position="7.303cm"/>
<style:tab-stop style:position="10.795cm"/>
<style:tab-stop style:position="22.86cm" style:type="right"/>
<style:tab-stop style:position="26.988cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="12pt" fo:language="en" fo:country="GB" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
</style:style>
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt" officeooo:paragraph-rsid="001d1a93"/>
<style:style style:name="T1" style:family="text">
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="T2" style:family="text">
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" style:font-size-asian="8pt" style:font-size-complex="8pt" text:display="none"/>
</style:style>
<style:style style:name="T3" style:family="text">
<style:text-properties fo:font-size="8pt" fo:language="en" fo:country="GB" fo:font-weight="bold" style:font-size-asian="8pt" style:font-weight-asian="bold" style:font-size-complex="8pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T4" style:family="text">
<style:text-properties fo:font-size="12pt" fo:language="en" fo:country="GB" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
</style:style>
<style:style style:name="T5" style:family="text">
<style:text-properties fo:language="en" fo:country="GB"/>
</style:style>
<style:style style:name="T6" style:family="text">
<style:text-properties fo:font-size="5pt" fo:language="en" fo:country="GB" fo:font-weight="bold" style:font-size-asian="5pt" style:font-weight-asian="bold" style:font-size-complex="5pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T7" style:family="text">
<style:text-properties fo:font-size="3pt" fo:language="en" fo:country="GB" style:font-size-asian="3pt" style:font-size-complex="3pt"/>
</style:style>
<style:page-layout style:name="pm1">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="9.999cm" style:num-format="1" style:print-orientation="landscape" fo:margin-top="0.4cm" fo:margin-bottom="0.4cm" fo:margin-left="0.499cm" fo:margin-right="0.499cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:page-layout-properties fo:page-width="29.7cm" fo:page-height="21.001cm" style:num-format="1" style:print-orientation="landscape" fo:margin-top="6.701cm" fo:margin-bottom="1.501cm" fo:margin-left="9.502cm" fo:margin-right="1.501cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="12798" style:layout-grid-base-height="0.176cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.388cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties>
<style:header-style/>
@@ -527,127 +451,103 @@
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
</text:sequence-decls>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;sale in records&quot;&gt;</text:placeholder></text:p>
<table:table table:name="BillOfExchange" table:style-name="BillOfExchange">
<table:table-column table:style-name="BillOfExchange.A"/>
<table:table-column table:style-name="BillOfExchange.B"/>
<table:table-row>
<table:table-cell table:style-name="BillOfExchange.A1" table:number-rows-spanned="2" office:value-type="string">
<text:p text:style-name="P6">Accepted by:</text:p>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P9">Per aval:</text:p>
<text:p text:style-name="P5" loext:marker-style-name="T2"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;sale in records&quot;&gt;</text:placeholder></text:p>
<table:table table:name="Tableau1" table:style-name="Tableau1">
<table:table-column table:style-name="Tableau1.A"/>
<table:table-column table:style-name="Tableau1.B"/>
<table:table-column table:style-name="Tableau1.C"/>
<table:table-column table:style-name="Tableau1.D"/>
<table:table-column table:style-name="Tableau1.E"/>
<table:table-column table:style-name="Tableau1.F"/>
<table:table-row table:style-name="Tableau1.1">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P6" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="BillOfExchange.B1" office:value-type="string">
<table:table table:name="Inner1" table:style-name="Inner1">
<table:table-column table:style-name="Inner1.A"/>
<table:table-column table:style-name="Inner1.B"/>
<table:table-column table:style-name="Inner1.C"/>
<table:table-row>
<table:table-cell table:style-name="Inner1.A1" office:value-type="string">
<text:p text:style-name="P1">Geneva, <text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date, sale.party.lang)&gt;</text:placeholder></text:p>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="2" office:value-type="string">
<text:p text:style-name="P7" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date, sale.party.lang)&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T4"/>
<text:p text:style-name="P7" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;format_date(sale.report_bill_maturity_date, sale.party.lang) if sale.report_bill_maturity_date else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P6" loext:marker-style-name="T1"/>
<text:p text:style-name="P6" loext:marker-style-name="T1"/>
<text:p text:style-name="P6" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Inner1.A1" office:value-type="string">
<text:p text:style-name="P1">For</text:p>
<table:covered-table-cell/>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="2" office:value-type="string">
<text:p text:style-name="P6" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Inner1.C1" office:value-type="string">
<text:p text:style-name="P7"><text:placeholder text:placeholder-type="text">&lt;format_currency(sale.lines[0].unit_price, sale.party.lang, sale.currency) if sale.lines else &apos;&apos;&gt;</text:placeholder></text:p>
<table:covered-table-cell/>
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P7" loext:marker-style-name="T5"><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text">&lt;format_currency(sale.report_bill_amount, sale.party.lang, sale.currency)&gt;</text:placeholder></text:span><text:span text:style-name="T3"/></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau1.2">
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="6" office:value-type="string">
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1">***<text:placeholder text:placeholder-type="text">&lt;sale.report_bill_amount_words&gt;</text:placeholder>***</text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
</table:table-row>
<table:table-row table:style-name="Tableau1.3">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="4" office:value-type="string">
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;sale.currency.symbol if sale.currency else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P3" loext:marker-style-name="T6"/>
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:s text:c="13"/><text:placeholder text:placeholder-type="text">&lt;(sale.party.addresses[0].country.name.upper()) if sale.party and sale.party.addresses and sale.party.addresses[0].country else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
</table:table-row>
<table:table-row table:style-name="Tableau1.4">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="5" office:value-type="string">
<text:p text:style-name="P4" loext:marker-style-name="T7"/>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;sale.party.rec_name&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;sale.full_number&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;sale.party.addresses[0].city if sale.party and sale.party.addresses else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text">&lt;sale.reference if sale.reference else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
</table:table-row>
<table:table-row table:style-name="Tableau1.5">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P1" loext:marker-style-name="T5"><text:span text:style-name="T1"><text:s/></text:span><text:span text:style-name="T1"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="2" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:covered-table-cell/>
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="2" office:value-type="string">
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
</table:table-cell>
<table:covered-table-cell/>
</table:table-row>
</table:table>
<table:table table:name="Inner2" table:style-name="Inner2">
<table:table-column table:style-name="Inner2.A"/>
<table:table-column table:style-name="Inner2.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner2.A1" office:value-type="string">
<text:p text:style-name="P1">At / on <text:placeholder text:placeholder-type="text">&lt;sale.payment_term.rec_name if sale.payment_term else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner2.B1" office:value-type="string">
<text:p text:style-name="P1">for value received, please pay against this sole Bill of Exchange</text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P1">to our order of Melya S.A., Switzerland, the amount of</text:p>
<table:table table:name="Inner3" table:style-name="Inner3">
<table:table-column table:style-name="Inner3.A"/>
<table:table-row>
<table:table-cell table:style-name="Inner3.A1" office:value-type="string">
<text:p text:style-name="P1"> </text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P5">effective payment to be made in <text:placeholder text:placeholder-type="text">&lt;sale.currency.symbol if sale.currency else &apos;&apos;&gt;</text:placeholder> only, without deduction for and free of any taxes, impost, levies or duties present or future of any nature under the laws of <text:placeholder text:placeholder-type="text">&lt;sale.party.addresses[0].country.name if sale.party and sale.party.addresses else &apos;&apos;&gt;</text:placeholder> or any political subdivision thereof or therein.</text:p>
<table:table table:name="Inner4" table:style-name="Inner4">
<table:table-column table:style-name="Inner4.A"/>
<table:table-column table:style-name="Inner4.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner4.A1" office:value-type="string">
<text:p text:style-name="P1">Payable at</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner4.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.party.addresses[0].city if sale.party and sale.party.addresses else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:table table:name="Inner5" table:style-name="Inner5">
<table:table-column table:style-name="Inner5.A"/>
<table:table-column table:style-name="Inner5.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner5.A1" office:value-type="string">
<text:p text:style-name="P1">Drawn on at</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner5.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.party.rec_name&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:table table:name="Inner6" table:style-name="Inner6">
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.B"/>
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.B"/>
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.F"/>
<table:table-row>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">No</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"> </text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">/ Invoice No</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.full_number&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">/ D:</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.reference if sale.reference else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
</table:table-cell>
</table:table-row>
<table:table-row>
<table:covered-table-cell table:style-name="BillOfExchange.A1"/>
<table:table-cell table:style-name="BillOfExchange.A1" office:value-type="string">
<text:p text:style-name="P6"/>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P2" loext:marker-style-name="T1"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>
</office:body>
</office:document>

653
modules/sale/bill_old.fodt Normal file
View File

@@ -0,0 +1,653 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<dc:date>2026-03-15T13:01:38.668000000</dc:date><meta:editing-duration>PT10M4S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="7" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="22" meta:word-count="122" meta:character-count="932" meta:non-whitespace-character-count="828"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">31487</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">15713</config:config-item>
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">6627</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">7108</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">31485</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">15711</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
<config:config-item config:name="ZoomFactor" config:type="short">140</config:config-item>
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
<config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
<config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
</config:config-item-map-entry>
</config:config-item-map-indexed>
</config:config-item-set>
<config:config-item-set config:name="ooo:configuration-settings">
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterName" config:type="string"/>
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">1907347</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">1907347</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">false</config:config-item>
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
<config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
<config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
<config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
<config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
<config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintFaxName" config:type="string"/>
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
</config:config-item-set>
</office:settings>
<office:scripts>
<office:script script:language="ooo:Basic">
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</office:script>
</office:scripts>
<office:font-face-decls>
<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
<style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="system" style:font-pitch="variable"/>
</office:font-face-decls>
<office:styles>
<style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="9pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="9pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
</style:default-style>
<style:default-style style:family="table-row">
<style:table-row-properties fo:keep-together="auto"/>
</style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
<style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
</style:style>
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
</style:style>
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
<style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
</style:style>
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
<style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:orphans="0" fo:widows="0" text:number-lines="false" text:line-number="0"/>
</style:style>
<style:style style:name="Placeholder" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" loext:opacity="100%" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style>
<text:outline-style style:name="Outline">
<text:outline-level-style text:level="1" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="2" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="3" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="4" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="5" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="6" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="7" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="8" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="9" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="10" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
</text:outline-style>
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
<loext:theme loext:name="Office Theme">
<loext:theme-colors loext:name="LibreOffice">
<loext:color loext:name="dark1" loext:color="#000000"/>
<loext:color loext:name="light1" loext:color="#ffffff"/>
<loext:color loext:name="dark2" loext:color="#000000"/>
<loext:color loext:name="light2" loext:color="#ffffff"/>
<loext:color loext:name="accent1" loext:color="#18a303"/>
<loext:color loext:name="accent2" loext:color="#0369a3"/>
<loext:color loext:name="accent3" loext:color="#a33e03"/>
<loext:color loext:name="accent4" loext:color="#8e03a3"/>
<loext:color loext:name="accent5" loext:color="#c99c00"/>
<loext:color loext:name="accent6" loext:color="#c9211e"/>
<loext:color loext:name="hyperlink" loext:color="#0000ee"/>
<loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
</loext:theme-colors>
</loext:theme>
</office:styles>
<office:automatic-styles>
<style:style style:name="BillOfExchange" style:family="table">
<style:table-properties style:width="20.001cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="BillOfExchange.A" style:family="table-column">
<style:table-column-properties style:column-width="4.75cm"/>
</style:style>
<style:style style:name="BillOfExchange.B" style:family="table-column">
<style:table-column-properties style:column-width="15.251cm"/>
</style:style>
<style:style style:name="BillOfExchange.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="BillOfExchange.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.101cm" fo:border="0.5pt solid #000000"/>
</style:style>
<style:style style:name="Inner1" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner1.A" style:family="table-column">
<style:table-column-properties style:column-width="4.001cm"/>
</style:style>
<style:style style:name="Inner1.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner1.C" style:family="table-column">
<style:table-column-properties style:column-width="10.899cm"/>
</style:style>
<style:style style:name="Inner1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner1.C1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="middle" fo:padding="0.101cm" fo:border="1.5pt solid #000000"/>
</style:style>
<style:style style:name="Inner2" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner2.A" style:family="table-column">
<style:table-column-properties style:column-width="4.5cm"/>
</style:style>
<style:style style:name="Inner2.B" style:family="table-column">
<style:table-column-properties style:column-width="13.899cm"/>
</style:style>
<style:style style:name="Inner2.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner2.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner3" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner3.A" style:family="table-column">
<style:table-column-properties style:column-width="18.399cm"/>
</style:style>
<style:style style:name="Inner3.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner4" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner4.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner4.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner4.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner4.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner5" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner5.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner5.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner5.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner5.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner6" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner6.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner6.F" style:family="table-column">
<style:table-column-properties style:column-width="3.902cm"/>
</style:style>
<style:style style:name="Inner6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner6.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner1" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner1.A" style:family="table-column">
<style:table-column-properties style:column-width="4.001cm"/>
</style:style>
<style:style style:name="Inner1.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner1.C" style:family="table-column">
<style:table-column-properties style:column-width="10.899cm"/>
</style:style>
<style:style style:name="Inner1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner1.C1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="middle" fo:padding="0.101cm" fo:border="1.5pt solid #000000"/>
</style:style>
<style:style style:name="Inner2" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner2.A" style:family="table-column">
<style:table-column-properties style:column-width="4.5cm"/>
</style:style>
<style:style style:name="Inner2.B" style:family="table-column">
<style:table-column-properties style:column-width="13.899cm"/>
</style:style>
<style:style style:name="Inner2.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner2.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner3" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner3.A" style:family="table-column">
<style:table-column-properties style:column-width="18.399cm"/>
</style:style>
<style:style style:name="Inner3.A1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner4" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner4.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner4.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner4.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner4.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner5" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner5.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner5.B" style:family="table-column">
<style:table-column-properties style:column-width="15.9cm"/>
</style:style>
<style:style style:name="Inner5.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner5.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Inner6" style:family="table">
<style:table-properties style:width="18.399cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left"/>
</style:style>
<style:style style:name="Inner6.A" style:family="table-column">
<style:table-column-properties style:column-width="2.499cm"/>
</style:style>
<style:style style:name="Inner6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.5cm"/>
</style:style>
<style:style style:name="Inner6.F" style:family="table-column">
<style:table-column-properties style:column-width="3.902cm"/>
</style:style>
<style:style style:name="Inner6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border="none"/>
</style:style>
<style:style style:name="Inner6.B1" style:family="table-cell">
<style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.049cm" fo:padding-top="0.049cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
</style:style>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt" fo:font-weight="bold"/>
</style:style>
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
</style:style>
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="end" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="8pt"/>
</style:style>
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
</style:style>
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
</style:style>
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="9pt" fo:font-weight="bold"/>
</style:style>
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt"/>
</style:style>
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Arial" fo:font-size="7pt" officeooo:paragraph-rsid="001d1a93"/>
</style:style>
<style:page-layout style:name="pm1">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="9.999cm" style:num-format="1" style:print-orientation="landscape" fo:margin-top="0.4cm" fo:margin-bottom="0.4cm" fo:margin-left="0.499cm" fo:margin-right="0.499cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties>
<style:header-style/>
<style:footer-style/>
</style:page-layout>
<style:style style:name="dp1" style:family="drawing-page">
<style:drawing-page-properties draw:background-size="full"/>
</style:style>
</office:automatic-styles>
<office:master-styles>
<style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
</office:master-styles>
<office:body>
<office:text>
<text:sequence-decls>
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
</text:sequence-decls>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;sale in records&quot;&gt;</text:placeholder></text:p>
<table:table table:name="BillOfExchange" table:style-name="BillOfExchange">
<table:table-column table:style-name="BillOfExchange.A"/>
<table:table-column table:style-name="BillOfExchange.B"/>
<table:table-row>
<table:table-cell table:style-name="BillOfExchange.A1" table:number-rows-spanned="2" office:value-type="string">
<text:p text:style-name="P6">Accepted by:</text:p>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P6"/>
<text:p text:style-name="P9">Per aval:</text:p>
</table:table-cell>
<table:table-cell table:style-name="BillOfExchange.B1" office:value-type="string">
<table:table table:name="Inner1" table:style-name="Inner1">
<table:table-column table:style-name="Inner1.A"/>
<table:table-column table:style-name="Inner1.B"/>
<table:table-column table:style-name="Inner1.C"/>
<table:table-row>
<table:table-cell table:style-name="Inner1.A1" office:value-type="string">
<text:p text:style-name="P1">Geneva, <text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date, sale.party.lang)&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner1.A1" office:value-type="string">
<text:p text:style-name="P1">For</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner1.C1" office:value-type="string">
<text:p text:style-name="P7"><text:placeholder text:placeholder-type="text">&lt;format_currency(sale.lines[0].unit_price, sale.party.lang, sale.currency) if sale.lines else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:table table:name="Inner2" table:style-name="Inner2">
<table:table-column table:style-name="Inner2.A"/>
<table:table-column table:style-name="Inner2.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner2.A1" office:value-type="string">
<text:p text:style-name="P1">At / on <text:placeholder text:placeholder-type="text">&lt;sale.payment_term.rec_name if sale.payment_term else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner2.B1" office:value-type="string">
<text:p text:style-name="P1">for value received, please pay against this sole Bill of Exchange</text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P1">to our order of Melya S.A., Switzerland, the amount of</text:p>
<table:table table:name="Inner3" table:style-name="Inner3">
<table:table-column table:style-name="Inner3.A"/>
<table:table-row>
<table:table-cell table:style-name="Inner3.A1" office:value-type="string">
<text:p text:style-name="P1"> </text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P5">effective payment to be made in <text:placeholder text:placeholder-type="text">&lt;sale.currency.symbol if sale.currency else &apos;&apos;&gt;</text:placeholder> only, without deduction for and free of any taxes, impost, levies or duties present or future of any nature under the laws of <text:placeholder text:placeholder-type="text">&lt;sale.party.addresses[0].country.name if sale.party and sale.party.addresses else &apos;&apos;&gt;</text:placeholder> or any political subdivision thereof or therein.</text:p>
<table:table table:name="Inner4" table:style-name="Inner4">
<table:table-column table:style-name="Inner4.A"/>
<table:table-column table:style-name="Inner4.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner4.A1" office:value-type="string">
<text:p text:style-name="P1">Payable at</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner4.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.party.addresses[0].city if sale.party and sale.party.addresses else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:table table:name="Inner5" table:style-name="Inner5">
<table:table-column table:style-name="Inner5.A"/>
<table:table-column table:style-name="Inner5.B"/>
<table:table-row>
<table:table-cell table:style-name="Inner5.A1" office:value-type="string">
<text:p text:style-name="P1">Drawn on at</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner5.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.party.rec_name&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:table table:name="Inner6" table:style-name="Inner6">
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.B"/>
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.B"/>
<table:table-column table:style-name="Inner6.A"/>
<table:table-column table:style-name="Inner6.F"/>
<table:table-row>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">No</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"> </text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">/ Invoice No</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.full_number&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.A1" office:value-type="string">
<text:p text:style-name="P1">/ D:</text:p>
</table:table-cell>
<table:table-cell table:style-name="Inner6.B1" office:value-type="string">
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;sale.reference if sale.reference else &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
</table:table>
</table:table-cell>
</table:table-row>
<table:table-row>
<table:covered-table-cell table:style-name="BillOfExchange.A1"/>
<table:table-cell table:style-name="BillOfExchange.A1" office:value-type="string">
<text:p text:style-name="P6"/>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>
</office:body>
</office:document>

View File

@@ -399,7 +399,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.report" id="report_sale">
<field name="name">Sale</field>
<field name="name">Proforma</field>
<field name="model">sale.sale</field>
<field name="report_name">sale.sale</field>
<field name="report">sale/sale.fodt</field>
@@ -411,7 +411,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.report" id="report_bill">
<field name="name">Bill</field>
<field name="name">Draft</field>
<field name="model">sale.sale</field>
<field name="report_name">sale.sale</field>
<field name="report">sale/bill.fodt</field>
@@ -422,18 +422,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_bill"/>
</record>
<record model="ir.action.report" id="report_sale_final">
<field name="name">Sale (final)</field>
<field name="model">sale.sale</field>
<field name="report_name">sale.sale</field>
<field name="report">sale/sale_final.fodt</field>
</record>
<record model="ir.action.keyword" id="report_sale_final_keyword">
<field name="keyword">form_print</field>
<field name="model">sale.sale,-1</field>
<field name="action" ref="report_sale_final"/>
</record>
<record model="ir.ui.view" id="sale_line_view_form">
<field name="model">sale.line</field>
<field name="type">form</field>

View File

@@ -1721,12 +1721,11 @@
</draw:image>
</draw:frame><text:tab/><text:tab/><text:span text:style-name="T1">PROFORMA INVOICE</text:span></text:p>
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T10">Proforma Nr:<text:tab/><text:tab/><text:tab/>Date:</text:span></text:p>
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text">&lt;sale.report_deal&gt;</text:placeholder></text:span><text:tab/><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date, sale.party.lang) if sale.sale_date else &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text">&lt;sale.report_melya_proforma_number&gt;</text:placeholder></text:span><text:tab/><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date, sale.party.lang) if sale.sale_date else &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:span text:style-name="T10">Buyer:</text:span></text:p>
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:span text:style-name="T33"><text:placeholder text:placeholder-type="text">&lt;sale.party.rec_name&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in sale.report_address.splitlines()&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in sale.report_melya_buyer_address.splitlines()&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P1"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:p>
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="Standard"/>
@@ -1763,8 +1762,8 @@
<text:p text:style-name="P25" loext:marker-style-name="T39"/>
<text:p text:style-name="P24" loext:marker-style-name="T39"/>
<text:p text:style-name="P24" loext:marker-style-name="T39"/>
<text:p text:style-name="P39" loext:marker-style-name="T26"><text:span text:style-name="T26"><text:s text:c="2"/></text:span><text:span text:style-name="T42"><text:placeholder text:placeholder-type="text">&lt;sale.report_product_name or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P30" loext:marker-style-name="T26"><text:span text:style-name="T42"><text:placeholder text:placeholder-type="text">&lt;sale.report_product_description or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P39" loext:marker-style-name="T26"><text:span text:style-name="T42"><text:placeholder text:placeholder-type="text">&lt;sale.report_product_name or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P39" loext:marker-style-name="T26"><text:span text:style-name="T42"><text:placeholder text:placeholder-type="text">&lt;sale.report_product_description or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P27" loext:marker-style-name="T42"><text:span text:style-name="T42"><text:s/></text:span></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau1.B2" office:value-type="string">
@@ -1799,24 +1798,25 @@
<text:p text:style-name="P3"/>
<text:p text:style-name="P3">TRANSPORTATION BY:<text:tab/>VESSEL</text:p>
<text:p text:style-name="P3"/>
<text:p text:style-name="P8">DELIVERY TERMS:<text:tab/><text:placeholder text:placeholder-type="text">&lt;sale.incoterm.code if sale.incoterm else &apos;&apos;&gt;</text:placeholder> <text:s/><text:placeholder text:placeholder-type="text">&lt;sale.incoterm_location.party_name if sale.incoterm_location else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P8">DELIVERY TERMS:<text:tab/><text:placeholder text:placeholder-type="text">&lt;sale.report_melya_incoterm&gt;</text:placeholder></text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P7">PAYMENT TERMS:<text:tab/><text:placeholder text:placeholder-type="text">&lt;sale.payment_term.description if sale.payment_term else &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P8">BANK: UBS SWITZERLAND AG</text:p>
<text:p text:style-name="P8">Case Postale</text:p>
<text:p text:style-name="P8">CH-1211 Geneve 2</text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P8">IBAN : CH36 0021 5215 2487 7461 D</text:p>
<text:p text:style-name="P8">SwifT Code: UBSWCHZH80A</text:p>
<text:p text:style-name="P8">BANK DETAILS:<text:tab/><text:tab/>UBS SWITZERLAND AG</text:p>
<text:p text:style-name="P8"><text:tab/><text:tab/><text:tab/>Case Postale CH-1211 Geneve 2</text:p>
<text:p text:style-name="P8"><text:tab/><text:tab/><text:tab/>IBAN : CH36 0021 5215 2487 7461 D, Swift Code: UBSWCHZH80A</text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2">DELIVERY IS SUBJECT TO THE DELIVERY BY OUR SUPPLIER.</text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/>Signed by :</text:p>
<text:p text:style-name="P2"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/>(The Seller)</text:p>
<text:p text:style-name="P2"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/> <text:s text:c="12"/><text:span text:style-name="T37">MELYA SA<text:line-break/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/>13 RUE ROBERT CEARD<text:line-break/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/> <text:s text:c="5"/>CH-1204 GENEVA<text:line-break/></text:span><text:span text:style-name="T37"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/> <text:s text:c="8"/>SWITZERLAND</text:span></text:p>
<text:p text:style-name="P2">Signed by :<text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/>Signed by :</text:p>
<text:p text:style-name="P2">(The Seller)<text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/>(The Buyer)</text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"><text:span text:style-name="T37">MELYA SA</text:span></text:p>
<text:p text:style-name="P2"><text:span text:style-name="T37">13 RUE ROBERT CEARD</text:span></text:p>
<text:p text:style-name="P2"><text:span text:style-name="T37">CH-1204 GENEVA</text:span></text:p>
<text:p text:style-name="P2"><text:span text:style-name="T37">SWITZERLAND</text:span></text:p>
<text:p text:style-name="P13"><text:soft-page-break/></text:p>
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>

186
modules/stock/coo.fodt Normal file
View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
office:version="1.3"
office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<meta:generator>LibreOffice</meta:generator>
<dc:title/>
<meta:initial-creator>Codex</meta:initial-creator>
<meta:creation-date>2026-04-23T00:00:00</meta:creation-date>
<dc:date>2026-04-23T00:00:00</dc:date>
<meta:editing-cycles>1</meta:editing-cycles>
<meta:editing-duration>PT0S</meta:editing-duration>
</office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings"/>
<config:config-item-set config:name="ooo:configuration-settings"/>
</office:settings>
<office:styles>
<style:default-style style:family="paragraph">
<style:paragraph-properties style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="12pt" fo:font-family="Arial"
style:font-size-asian="12pt" style:font-size-complex="12pt"/>
</style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text">
<style:text-properties fo:font-size="12pt" fo:font-family="Arial"/>
</style:style>
<style:style style:name="Center" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:text-align="center"/>
</style:style>
<style:style style:name="Right" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:text-align="right"/>
</style:style>
<style:style style:name="Bold" style:family="paragraph" style:parent-style-name="Standard">
<style:text-properties fo:font-weight="bold"/>
</style:style>
<style:page-layout style:name="PageLayout">
<style:page-layout-properties fo:page-width="29.7cm" fo:page-height="21.001cm"
style:print-orientation="landscape"
fo:margin-top="0.8cm" fo:margin-bottom="0.8cm"
fo:margin-left="0.8cm" fo:margin-right="0.8cm"
style:writing-mode="lr-tb"/>
</style:page-layout>
<style:master-page style:name="Standard" style:page-layout-name="PageLayout"/>
<style:style style:name="MainTable" style:family="table">
<style:table-properties style:width="27.9cm" fo:margin-left="0cm"/>
</style:style>
<style:style style:name="ColLeft" style:family="table-column">
<style:table-column-properties style:column-width="13.95cm"/>
</style:style>
<style:style style:name="ColRight" style:family="table-column">
<style:table-column-properties style:column-width="13.95cm"/>
</style:style>
<style:style style:name="Cell" style:family="table-cell">
<style:table-cell-properties fo:padding="0.02cm"
fo:border="0.01cm solid #bfbfbf"
style:vertical-align="middle"/>
</style:style>
<style:style style:name="CellTop" style:family="table-cell">
<style:table-cell-properties fo:padding="0.02cm"
fo:border="0.01cm solid #bfbfbf"
style:vertical-align="top"/>
</style:style>
<style:style style:name="CellBottom" style:family="table-cell">
<style:table-cell-properties fo:padding="0.02cm"
fo:border="0.01cm solid #bfbfbf"
style:vertical-align="bottom"/>
</style:style>
</office:styles>
<office:automatic-styles>
<style:style style:name="RowTop" style:family="table-row">
<style:table-row-properties style:row-height="3.1cm"/>
</style:style>
<style:style style:name="RowConsignee" style:family="table-row">
<style:table-row-properties style:row-height="3.2cm"/>
</style:style>
<style:style style:name="RowTransport" style:family="table-row">
<style:table-row-properties style:row-height="4.0cm"/>
</style:style>
<style:style style:name="RowGoods" style:family="table-row">
<style:table-row-properties style:row-height="1.8cm"/>
</style:style>
<style:style style:name="RowGross" style:family="table-row">
<style:table-row-properties style:row-height="4.2cm"/>
</style:style>
<style:style style:name="RowDate" style:family="table-row">
<style:table-row-properties style:row-height="2.2cm"/>
</style:style>
</office:automatic-styles>
<office:body>
<office:text>
<table:table table:name="COO" table:style-name="MainTable">
<table:table-column table:style-name="ColLeft"/>
<table:table-column table:style-name="ColRight"/>
<table:table-row table:style-name="RowTop">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_exporter or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="RowConsignee">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_consignee or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="RowTransport">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_transport or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Center"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_origin_country or &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="Standard"/>
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_observations or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="RowGoods">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Center"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_goods_description or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Center"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_net_weight_display or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="RowGross">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
</table:table-cell>
<table:table-cell table:style-name="CellBottom" office:value-type="string">
<text:p text:style-name="Center"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_gross_weight_display or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="RowDate">
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
<text:p text:style-name="Bold"><text:placeholder text:placeholder-type="text">&lt;records[0].report_coo_issue_date or &apos;&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Cell" office:value-type="string">
<text:p text:style-name="Standard"/>
</table:table-cell>
</table:table-row>
</table:table>
</office:text>
</office:body>
</office:document>

View File

@@ -1031,7 +1031,7 @@
</text:sequence-decls>
<text:p text:style-name="P46"/>
<text:h text:style-name="Heading_20_1" text:outline-level="1">Certificate of Insurance No. <text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text">&lt;records[0].report_insurance_certificate_number or &apos;&apos;&gt;</text:placeholder></text:span></text:span></text:h>
<text:h text:style-name="Heading_20_3" text:outline-level="3">This is to certify that we have insured for account of <text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text">&lt;records[0].report_insurance_account_of or &apos;&apos;&gt;</text:placeholder></text:span></text:span></text:h>
<text:h text:style-name="Heading_20_3" text:outline-level="3">This is to certify that we have insured for account of <text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text">&lt;records[0].company.party.rec_name if records[0].company and records[0].company.party else &apos;&apos;&gt;</text:placeholder></text:span></text:span></text:h>
<text:p text:style-name="P19"/>
<text:p text:style-name="P20"/>
<text:p text:style-name="P21"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12">Marine Insurance</text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T13"> </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12">Policy</text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T14"> </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12">No. 4.008.227.782<text:tab/>the following shipment: Description of goods and/or</text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T15"> </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12">services:</text:span></text:span></text:p>

View File

@@ -1662,7 +1662,7 @@
<text:p text:style-name="P13" loext:marker-style-name="T7"/>
<text:p text:style-name="P13" loext:marker-style-name="T7"/>
<text:p text:style-name="P13" loext:marker-style-name="T7"/>
<text:p text:style-name="P19" loext:marker-style-name="T9"><text:span text:style-name="T8"><text:time style:data-style-name="N10041" text:time-value="2026-04-08T09:32:08.310000034">April 8, 2026</text:time></text:span></text:p>
<text:p text:style-name="P19" loext:marker-style-name="T9"><text:span text:style-name="T8"><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_today_date or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"/>
<text:p text:style-name="P14" loext:marker-style-name="T9"/>
<text:p text:style-name="P16" loext:marker-style-name="T10"/>
@@ -1684,9 +1684,9 @@
<text:p text:style-name="P15" loext:marker-style-name="T9"/>
<text:p text:style-name="P18" loext:marker-style-name="T17"/>
<text:p text:style-name="P18" loext:marker-style-name="T17"/>
<text:p text:style-name="P20" loext:marker-style-name="T17"><text:span text:style-name="T17">Gross weight<text:tab/><text:tab/>:<text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_gross_weight or &apos;&apos;&gt;</text:placeholder><text:tab/>KGS</text:span><text:span text:style-name="T17"/></text:p>
<text:p text:style-name="P20" loext:marker-style-name="T17"><text:span text:style-name="T17">Gross weight<text:tab/><text:tab/>:<text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_gross_weight or &apos;&apos;&gt;</text:placeholder><text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_weight_unit or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T17"/></text:p>
<text:p text:style-name="P18" loext:marker-style-name="T17"/>
<text:p text:style-name="P20" loext:marker-style-name="T18"><text:span text:style-name="T18">Net weight<text:tab/><text:tab/>:<text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_net_weight or &apos;&apos;&gt;</text:placeholder><text:tab/><text:tab/>KGS</text:span><text:span text:style-name="T18"/></text:p>
<text:p text:style-name="P20" loext:marker-style-name="T18"><text:span text:style-name="T18">Net weight<text:tab/><text:tab/>:<text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_net_weight or &apos;&apos;&gt;</text:placeholder><text:tab/><text:placeholder text:placeholder-type="text">&lt;records[0].report_packing_weight_unit or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T18"/></text:p>
<text:p text:style-name="P17" loext:marker-style-name="T11"/>
<text:p text:style-name="P17" loext:marker-style-name="T11"/>
<text:p text:style-name="P17" loext:marker-style-name="T11"/>

View File

@@ -0,0 +1,123 @@
# Template Business Rules - Session Memo
Date: 2026-04-08
Scope: templates Relatorio + ponts `report_*` Python.
## 1) Regles metier confirmees
- `insurance.fodt`:
- "This is to certify that we have insured for account of" doit afficher la compagnie courante (`shipment.company.party`), pas le client.
- "Amount insured" suit la regle 110% de la valeur incoming.
- Base incoming: montant des incoming moves lies au shipment, derive des lots et de la source achat (`purchase.line.unit_price * current_quantity_converted`).
- `sale bill`:
- La 2eme date attendue est une maturity date (echeance), pas le libelle de condition de paiement.
- Le montant en toutes lettres doit correspondre au montant du bill (montant facture/total), pas au prix unitaire d'une ligne.
## 2) Pratiques templates Relatorio
- Preferer des proprietes Python `report_*` stables sur le modele plutot que des expressions Genshi complexes.
- Pour `stock.shipment.in`, privilegier `records[0].report_*` dans le template.
- Si un placeholder s'affiche en brut dans le PDF:
- verifier que c'est un vrai `text:placeholder` ODF et pas du texte simple.
- verifier le scope de variable (`records[0]` vs variable locale non definie).
- Dans les placeholders XML:
- utiliser `&quot;` et `&apos;` dans les expressions XML.
- eviter les echappements de type `\'`.
## 3) Decisions de conception appliquees
- `insurance.fodt`:
- ajout d'un champ shipment `surveyor` (party.party) via onglet "Surveyor".
- ajout d'une propriete `report_insurance_contact_surveyor` pour la zone "Contact the following surveyor".
- `payment_order.fodt`:
- migration des tags `<...>` legacy vers la syntaxe template habituelle du projet.
- ajout de la section de config template, et exposition depuis `account.invoice` comme pour CN/DN/Invoice/Prepayment.
- `packing_list.fodt`:
- date en haut droite basee sur la date du jour.
- unites Net/Gross alignees sur l'unite de `purchase.line`.
- `bill.fodt`:
- suppression du report `sale_final.fodt` du menu sale.
- ajout de ponts Python cote sale pour:
- montant bill numerique,
- montant bill en lettres,
- maturity date issue de `invoice.lines_to_pay.maturity_date` (avec fallback metier).
## 4) Check-list rapide avant validation d'un template
- Les placeholders sont-ils tous resolus (aucun `<records[...]...>` brut)?
- Le scope est-il correct (`records[0]` / `sale` / `invoice`) partout, y compris header/footer?
- La source metier est-elle correcte (compagnie vs client, total vs unit_price, maturity date vs payment term)?
- Les formats sont-ils conformes (date, devise, montant en lettres)?
- Le template est-il bien expose dans la config + menu d'impression de la forme cible?
## 5) Session 2026-04-09 - Rappels metier purchase_trade / account_invoice
- Factures trade:
- `NET` et `GROSS` viennent de `lot.qt.hist` du lot retenu, pas de `invoice.line.quantity`.
- priorite lots: `physic` d'abord, sinon lot `virtual` unique.
- l'unite affichee vient de `lot.lot_unit_line`.
- les infos shipment doivent dependre des lots reels des lignes facture.
- le label `S/I` doit afficher `shipment.reference`.
- `invoice_ict_final.fodt`: si `NB BALES = 0`, afficher `Unchanged`.
- les quantites de `invoice_ict` et `invoice_ict_final` sont uniformisees a `2` decimales.
- la conversion vers `LBS` doit passer par `product.uom.compute_qty`, pas un facteur fixe.
- si plusieurs lignes reutilisent le meme lot, les lignes detaillees utilisent la quantite facturee convertie, mais le `GROSS` global doit continuer a refleter le vrai delta historique du lot.
- CN / DN:
- cote `sale` / `out`: montant negatif => `Credit Note`, montant positif => `Debit Note`.
- cote `purchase` / `in`: logique inverse conservee.
- Report sale:
- meme priorite lots que facture.
- les quantites en lettres suivent l'unite reelle (`MT`, `KILOGRAM`, `LBS`).
- le total convertit les lignes vers une unite commune.
- l'unite commune est celle du lot virtuel seulement s'il y a un seul lot virtuel sur tout le report.
- Lots:
- `lot.report.r_del_period` affiche `sale.line.del_period` pour `lot_s` sans `lot_p`, sinon `purchase.line.del_period`.
- dans `Do weighing`, `lot_qt` doit etre editable et ecraser directement `lot.lot_qt`.
- Factures client / fournisseur:
- `Validate` cree aussi le `account.move` pour les factures client.
- `Validate` attribue aussi le `number` pour les factures client; la numerotation ne doit plus attendre `Post` cote `out`.
- `Post` ne doit plus forcer une fresh session / demande de mot de passe sur ce flux.
- Pricing:
- `pricing.pricing` peut etre saisi manuellement meme sans composant.
- en manuel, l'utilisateur saisit seulement `quantity` et `settl_price`.
- `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` sont derives automatiquement et restent non editables.
- `fixed_qt` = cumul des `quantity` du groupe.
- `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`.
- `unfixed_qt` = quantite de base restante a fixer.
- `unfixed_qt_price` = `settl_price` de la ligne.
- `eod_price` reste non editable et suit le prix moyen pondere.
- le mode auto suit la meme formule.
- `last` est gere par groupe metier (`line + component`), avec un seul `last=True` par groupe.
- la ligne `last=True` est celle de `pricing_date` la plus grande; `id` ne sert qu'en tie-break.
- Divers:
- `trader` filtre sur `TRADER`.
- `operator` filtre sur `OPERATOR`.
- les quotas/pricings doivent fallback sur `quantity` si `quantity_theorical` est vide.
- `sale.line` / `purchase.line`: en mode `basis`, si aucun `price_component` n'est defini, le prix et la progression doivent remonter depuis la ligne `Summary` / `pricing.summary` sans component.
## 6) Session 2026-04-26 - Padding facture provisoire vente
- Le wizard `lot.invoice` peut appliquer un padding global uniquement sur les
factures provisoires cote vente.
- Le padding global est reparti par lot et conserve sur `lot.lot` dans
`sale_invoice_padding`.
- La ligne facture affiche ce montant via `Inc. padding`, avec la meme unite que
`Quantity`.
- La quantite facturee est augmentee du padding, mais la quantite physique du
lot ne doit pas changer.
- Au `Validate` d'une facture, le move principal inclut deja le padding car il
est integre dans `account.invoice.line.quantity`.
- Deux comptes de configuration pilotent les ecritures padding:
`Default Sale Padding` et `Default Accrual Padding`, dans la section
`Padding` de `Financial / Configuration`.
- A la validation d'une provisoire vente, un `additional_move` est cree:
debit `Default Sale Padding`, credit `Default Accrual Padding`, pour
`sale_invoice_padding * unit_price` de la ligne provisoire.
- A la finale, l'ecriture inverse est creee pour le meme montant, calcule depuis
`lot.sale_invoice_line_prov` afin de reprendre le prix, la devise, la date et
le taux de la provisoire, pas ceux de la finale.
- Le wizard final doit ignorer le padding quand il calcule le delta de quantite:
comparer la quantite physique finale a
`lot.sale_invoice_line_prov.quantity - lot.sale_invoice_padding`.
- Detail complet:
`modules/purchase_trade/docs/padding-invoice-accounting.md`.