diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_ch/static/src | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/l10n_ch/static/src')
| -rw-r--r-- | addons/l10n_ch/static/src/font/ocrb-license.txt | 4 | ||||
| -rw-r--r-- | addons/l10n_ch/static/src/font/ocrb.otf | bin | 0 -> 18012 bytes | |||
| -rwxr-xr-x | addons/l10n_ch/static/src/img/CH-Cross_7mm.png | bin | 0 -> 14703 bytes | |||
| -rw-r--r-- | addons/l10n_ch/static/src/img/background_virgin_isr.png | bin | 0 -> 26347 bytes | |||
| -rw-r--r-- | addons/l10n_ch/static/src/img/background_virgin_isr_bank.png | bin | 0 -> 27889 bytes | |||
| -rw-r--r-- | addons/l10n_ch/static/src/scss/report_isr.scss | 208 | ||||
| -rw-r--r-- | addons/l10n_ch/static/src/scss/report_swissqr.scss | 145 |
7 files changed, 357 insertions, 0 deletions
diff --git a/addons/l10n_ch/static/src/font/ocrb-license.txt b/addons/l10n_ch/static/src/font/ocrb-license.txt new file mode 100644 index 00000000..277bf4f8 --- /dev/null +++ b/addons/l10n_ch/static/src/font/ocrb-license.txt @@ -0,0 +1,4 @@ +Files: ocrb.otf +Copyright: 2012 Matthew Skala +License: public-domain + This file is released to the public domain by its author, Matthew Skala. diff --git a/addons/l10n_ch/static/src/font/ocrb.otf b/addons/l10n_ch/static/src/font/ocrb.otf Binary files differnew file mode 100644 index 00000000..6cc89cc2 --- /dev/null +++ b/addons/l10n_ch/static/src/font/ocrb.otf diff --git a/addons/l10n_ch/static/src/img/CH-Cross_7mm.png b/addons/l10n_ch/static/src/img/CH-Cross_7mm.png Binary files differnew file mode 100755 index 00000000..41d3c5f9 --- /dev/null +++ b/addons/l10n_ch/static/src/img/CH-Cross_7mm.png diff --git a/addons/l10n_ch/static/src/img/background_virgin_isr.png b/addons/l10n_ch/static/src/img/background_virgin_isr.png Binary files differnew file mode 100644 index 00000000..f1a54d0b --- /dev/null +++ b/addons/l10n_ch/static/src/img/background_virgin_isr.png diff --git a/addons/l10n_ch/static/src/img/background_virgin_isr_bank.png b/addons/l10n_ch/static/src/img/background_virgin_isr_bank.png Binary files differnew file mode 100644 index 00000000..1d03b17c --- /dev/null +++ b/addons/l10n_ch/static/src/img/background_virgin_isr_bank.png diff --git a/addons/l10n_ch/static/src/scss/report_isr.scss b/addons/l10n_ch/static/src/scss/report_isr.scss new file mode 100644 index 00000000..4d898709 --- /dev/null +++ b/addons/l10n_ch/static/src/scss/report_isr.scss @@ -0,0 +1,208 @@ +@font-face { + font-family: ocrb; + src: url('../font/ocrb.otf') format('opentype'); +} + +.l10n_ch_isr { + /* + all elements are positionned for A4 format (210 x 297mm) but the viewport + is bigger than this, hence we zoom the whole page to be bigger than the viewport + which will then be resized down by wkhtmltopdf to get back to an A4 format + */ + zoom: 1.25; + + &.o_in_iframe { + zoom: 1; + + /* display dummy check bacground in html rendering to help see the end result */ + #isr { + background: url(../img/background_virgin_isr.png) bottom no-repeat; + background-size: 100%; + + &.isr-print-bank { + background-image: url(../img/background_virgin_isr_bank.png); + } + } + } + + /* content outside isr needs margins to not overlap header */ + #content_outside_isr { + padding: 15px; + padding-top: 150px; + } + + /* ISR is intended for pre-printed paper, we don't want stylistic background */ + .o_report_layout_background { + background: none; + min-height: 0; + } + +#isr { + height: 106mm; + width: 210mm; + + position: absolute; + /* position bvr at bottom of page */ + top: 297 - 106mm; + left: 0; + + overflow: hidden; + font-family: ocrb; + line-height: 0.16in; + font-size: 10pt; + + p { + margin-bottom: 0; + } + + #voucher { + height: 4in; + width: 2.4in; + + position: absolute; + /* header title of BVR section */ + top: 0.167in; + /* right of voucher corresponds to left of slip */ + right: 5.9in; + } + + #voucher > * { + position: absolute; + /* default left margin for fields content */ + left: 0.15in; + + &#voucher-for-contact { + top: 0.25in; + } + + &#voucher-for-bank { + top: 0.18in; + } + + &#voucher-for-bank + #voucher-for-contact { + top: 0.68in; + } + + &#voucher-bank { + top: 1.51in; + left: 1.1in; + } + + &#voucher-amount_units { + width: 1.62in; + top: 1.87in; + + text-align: right; + font-size: 14px; + letter-spacing: 0.095in; + } + + &#voucher-amount_cents { + width: 0.4in; + top: 1.87in; + left: 1.96in; + + font-size: 14px; + letter-spacing: 0.095in; + } + + &#voucher-by { + top: 2.22in; + font-size: 9pt; + max-width: 2in; + + #voucher-by_reference_number { + font-size: 7.5pt; + margin-bottom: 0.05in; + } + } + } + + #slip { + height: 4in; + width: 5.9in; + + position: absolute; + /* header title of BVR section */ + top: 0.167in; + /* right of slip corresponds to right of slip */ + right: 0; + } + + #slip > * { + position: absolute; + /* default left margin for fields content */ + left: 0.15in; + + &#slip-for-contact { + top: 0.25in; + + p { + margin-bottom: 0; + } + } + + &#slip-for-bank { + top: 0.18in; + } + + &#slip-for-bank + #slip-for-contact { + top: 0.68in; + } + + &#slip-bank { + top: 1.51in; + left: 1.1in; + } + + &#slip-amount_units { + width: 1.62in; + top: 1.87in; + + text-align: right; + font-size: 14px; + letter-spacing: 0.095in; + } + + &#slip-amount_cents { + width: 0.4in; + top: 1.87in; + left: 1.96in; + + font-size: 14px; + letter-spacing: 0.095in; + } + + &#slip-reference { + width: 3.3in; + top: 1.2in; + left: 2.5in; + text-align: center; + } + + &#slip-by { + top: 1.85in; + left: 2.55in; + } + + &#slip-optical-line { + right: 0.32in; + bottom: 0.667in; + + /* Positioning is set for OCRB of Tsukurimashou Font Family */ + font-family: ocrb; + font-size: 10pt; + line-height: 0.1in; + + > div { + position: relative; + + > div { + position: absolute; + bottom: 0; + } + } + } + } +} +} diff --git a/addons/l10n_ch/static/src/scss/report_swissqr.scss b/addons/l10n_ch/static/src/scss/report_swissqr.scss new file mode 100644 index 00000000..2eefad0e --- /dev/null +++ b/addons/l10n_ch/static/src/scss/report_swissqr.scss @@ -0,0 +1,145 @@ +body.l10n_ch_qr { + padding:0; + + /* Disable custom bakground */ + .o_report_layout_background { + background: none; + min-height: 0; + } + + .swissqr_title { + position: absolute; + padding: 15px; + padding-top: 150px; + } + + .swissqr_content { + position: static; + } + + .swissqr_receipt { + position: absolute; + background-color: white; + border-color:black; + border-width: 1pt 1pt 1pt 1pt; + border-style: solid; + height: 131mm; /* 105 * 1.25 - 0.25 mm to cope for rendering issues due to header (probably a rounding issue) */ + width: 77.5mm; /* 62 * 1.25 */ + top: 240mm; /* 192 * 1.25 */ + left: 0mm; + /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/ + } + + .swissqr_body { + position: absolute; + background-color: white; + border-color:black; + border-width: 1pt 1pt 1pt 1pt; + border-style: solid; + height: 131mm; /* 105 * 1.25 - 0.25mm to cope for rendering issues due to header (probably a rounding issue)*/ + width: 185mm; /* 148 * 1.25 */ + top: 240mm; /* 192 * 1.25 */ + left: 77.5mm; /* 62 * 1.25 */ + /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/ + + } + + .swissqr { + position: absolute; + height: 57.5mm; /* 46 * 1.25 */ + width: 57.5mm; /* 46 * 1.25 */ + top: 20mm; /* 16 * 1.25 */ + left: 6.25mm; /* 5 * 1.25 min readability margin for QR */ + /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/ + } + + .ch_cross { + position: absolute; + background-color: white; + height: 8.75mm; /* 7 * 1.25 */ + width: 8.75mm; /* 7 * 1.25 */ + top: 44.375mm; /* (16 + 23 - 7/2) * 1.25 = 41.5 * 1.25 */ + left: 30.625mm; /* (5 + 23 - 7/2) * 1.25 = 24.5 * 1.25 */ + /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/ + } + + .swissqr_text { + font-family: Arial, Frutiger, Helvetica; + color: black; + line-height: 1; + padding-top: 1em; + + .title { + font-size: 8pt; + font-weight: bold; + margin-top: 2mm; + } + .content { + font-size: 10pt; + } + + } + + .main_title { + margin-top: 5mm; + font-size: 11pt; + font-weight: bold; + } + + .swissqr_column_left { + position: absolute; + left: 5mm; + } + + .swissqr_column_right { + position: absolute; + left: 70mm; /* (5 + 46 + 5) * 1.25 */ + max-width: 90mm; + } + + .procedure_zone { + top: 15mm; + } + + .receipt_indication_zone { + top: 10mm; + } + + .indication_zone { + top: 10mm; + } + + .receipt_amount_zone { + position: absolute; + top: 86mm; + + .column { + margin-right: 5mm; + float: left; + } + } + + .receipt_acceptance_point_zone { + position: relative; + top: 100mm; + + .content { + float: right; + padding-right: 1em; + } + + } + + .amount_zone { + position: absolute; + top: 86mm; + + .column { + margin-right: 5mm; + float: left; + } + } + +} + + |
