UNPKG

@salaxy/reports

Version:

Salaxy (Palkkaus.fi) reporting library

591 lines (590 loc) 21.4 kB
/*! * Layout for the Palkkaus.fi reports. * Reports are shown either as HTML in a PDF-like preview window * OR rendered to PDF (PNG-preview) in a server-side process. */ /* Customize colors fonts etc. here. */ /** * Variables used by salaxy-reports.less. * To be compatible with the basic NG1-library we use the same variable names, * which in turn come from Bootstrap (v3). * HOWEVER, it is important to understand that **salaxy-lib-reports is independent from Bootstrap**. */ /* Set brand logo url (.svg .png .jpg etc) */ /* Set brand logo's height (max-height is 50px). Width auto adjusts up to 40% of content area width. */ /* Define Google Fonts and font family base */ /* Import Google Fonts as defined in @family */ @font-face { font-family: 'Roboto'; font-style: italic; font-weight: 400; font-stretch: normal; src: url(https://fonts.gstatic.com/s/roboto/v50/KFOKCnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmOClHrs6ljXfMMLoHQuAj-lg.ttf) format('truetype'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 300; font-stretch: normal; src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuaabVmUiA8.ttf) format('truetype'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-stretch: normal; src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbVmUiA8.ttf) format('truetype'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-stretch: normal; src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWub2bVmUiA8.ttf) format('truetype'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-stretch: normal; src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjalmUiA8.ttf) format('truetype'); } *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; } table { width: 100%; } td, th { vertical-align: top; text-align: left; font-size: 14px; padding-left: 2px; padding-right: 2px; } td.text-right, th.text-right, td.right, th.right { text-align: right; } tr.total td, tr.total th { border-top: 1px solid black; border-bottom: 3px double black; } .valign-middle { vertical-align: middle !important; } .salaxy-rpt { /* Preview layout - the document is inside .document-preview TODO: maybe remove? */ /* .calendar-report tr:nth-child(odd) td, .calendar-report tr:nth-child(odd) th { background-color: #f9f9f9; } */ } .salaxy-rpt .document-preview { background-color: Gray; width: 100%; padding: 10mm; min-height: 303mm; } .salaxy-rpt .document-preview.document-preview-no-height { padding: 2mm; } .salaxy-rpt .document-preview .document { margin-bottom: 2mm; } .salaxy-rpt .document-preview .document #header, .salaxy-rpt .document-preview .document .header { border-bottom: 0.5mm solid #009fd8; margin-bottom: 2mm; padding-bottom: 3mm; height: 20mm; } .salaxy-rpt .document-preview .document #header #reportBrandLogo, .salaxy-rpt .document-preview .document .header #reportBrandLogo, .salaxy-rpt .document-preview .document #header .reportbrandlogo, .salaxy-rpt .document-preview .document .header .reportbrandlogo { width: auto; height: 80px; max-height: 50px; background: url('https://cdn.salaxy.com/img/palkkaus/logo/palkkaus_logo.svg'); background-size: contain; background-repeat: no-repeat; } .salaxy-rpt .document-preview .document #footer, .salaxy-rpt .document-preview .document .header { width: calc(100% - 20mm); position: absolute; bottom: 10mm; left: 10mm; height: 20mm; border-top: 0.5mm solid #009fd8; padding: 2mm 0; font-size: 12px; line-height: 1.3; } .salaxy-rpt .document-preview .document #footnote, .salaxy-rpt .document-preview .document .footnote { font-size: 9px; line-height: 13px; } .salaxy-rpt .document-preview .document .document-body { padding-bottom: 20mm; } .salaxy-rpt .document-preview .a4Portrait, .salaxy-rpt .document-preview .a4portrait { padding: 10mm; height: 277mm; /* 297 - 2 * 10 = 277 */ width: 190mm; /* 210 - 2 * 10 = 190 */ } .salaxy-rpt .document-preview .a4Portrait-no-height, .salaxy-rpt .document-preview .a4portrait-no-height { padding: 10mm; width: 190mm; /* 210 - 2 * 10 = 190 */ } .salaxy-rpt .document-preview .a4Landscape, .salaxy-rpt .document-preview .a4landscape { padding: 10mm; height: 190mm; /* 210 - 2 * 10 = 190 */ width: 277mm; /* 297 - 2 * 10 = 277 */ } .salaxy-rpt .document-preview .a4Landscape-no-height, .salaxy-rpt .document-preview .a4landscape-no-height { padding: 10mm; width: 277mm; /* 297 - 2 * 10 = 277 */ } .salaxy-rpt .document-pdf .document { page-break-after: always; } .salaxy-rpt .document-pdf .document #footer, .salaxy-rpt .document-pdf .document .footer { display: none; } .salaxy-rpt .document-pdf .document #header, .salaxy-rpt .document-pdf .document .header { border-bottom: 0.5mm solid #009fd8; margin-bottom: 2mm; padding-bottom: 3mm; height: 20mm; } .salaxy-rpt .document-pdf .document #header #reportBrandLogo, .salaxy-rpt .document-pdf .document .header #reportBrandLogo, .salaxy-rpt .document-pdf .document #header .reportbrandlogo, .salaxy-rpt .document-pdf .document .header .reportbrandlogo { width: auto; height: 80px; max-height: 50px; background: url('https://cdn.salaxy.com/img/palkkaus/logo/palkkaus_logo.svg'); background-size: contain; background-repeat: no-repeat; } .salaxy-rpt .document-pdf .a4Portrait, .salaxy-rpt .document-pdf .a4portrait { height: auto; overflow: hidden; width: 210mm; } .salaxy-rpt .document-pdf .a4Landscape, .salaxy-rpt .document-pdf .a4landscape { height: auto; width: auto; } .salaxy-rpt .document { background-color: White; margin: 0px auto; position: relative; font-size: 14px; /* Tables */ } .salaxy-rpt .document header { border-bottom: 0.5mm solid #009fd8; padding-bottom: 3mm; margin-bottom: 10mm; } .salaxy-rpt .document footer { width: 170mm; position: absolute; bottom: 10mm; left: 10mm; border-top: 0.5mm solid #009fd8; } .salaxy-rpt .document footer p, .salaxy-rpt .document footer table tr td { font-size: 12px; line-height: 1.3; } .salaxy-rpt .document h1, .salaxy-rpt .document h2, .salaxy-rpt .document h3 { margin: 0; font-size: 18px; font-weight: bold; } .salaxy-rpt .document h1 { font-size: 1.3em; } .salaxy-rpt .document h2 { font-size: 1.2em; } .salaxy-rpt .document h3 { font-size: 1.1em; } .salaxy-rpt .document h2.salaxy-content-subheader { margin: 12px 0 10px; } .salaxy-rpt .document h3.salaxy-content-subheader { margin: 10px 0 5px; } .salaxy-rpt .document p { margin: 5px 50px 5px 0; } .salaxy-rpt .document.a4Portrait .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4portrait .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4Portrait-no-height .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4portrait-no-height .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4Portrait .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4portrait .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4Portrait-no-height .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1), .salaxy-rpt .document.a4portrait-no-height .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(1) { padding-left: 20px; } .salaxy-rpt .document.a4Landscape .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4landscape .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4Landscape-no-height .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4landscape-no-height .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4Landscape .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4landscape .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4Landscape-no-height .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2), .salaxy-rpt .document.a4landscape-no-height .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row td:nth-child(2) { padding-left: 20px; } .salaxy-rpt .document .salaxy-report-table, .salaxy-rpt .document .salaxy-accounting-report-table { margin-top: 20px; } .salaxy-rpt .document .salaxy-report-table th, .salaxy-rpt .document .salaxy-accounting-report-table th, .salaxy-rpt .document .salaxy-report-table td, .salaxy-rpt .document .salaxy-accounting-report-table td { text-align: right; } .salaxy-rpt .document .salaxy-report-table th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table th:first-child, .salaxy-rpt .document .salaxy-report-table td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table td:first-child { text-align: left; } .salaxy-rpt .document .salaxy-report-table.columns-three th, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three th, .salaxy-rpt .document .salaxy-report-table.columns-three td, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three td { width: 25%; } .salaxy-rpt .document .salaxy-report-table.columns-three th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three th:first-child, .salaxy-rpt .document .salaxy-report-table.columns-three td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three td:first-child { width: 50%; } .salaxy-rpt .document .salaxy-report-table.columns-three.columns-first-narrow th, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three.columns-first-narrow th, .salaxy-rpt .document .salaxy-report-table.columns-three.columns-first-narrow td, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three.columns-first-narrow td { width: 40%; } .salaxy-rpt .document .salaxy-report-table.columns-three.columns-first-narrow th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three.columns-first-narrow th:first-child, .salaxy-rpt .document .salaxy-report-table.columns-three.columns-first-narrow td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-three.columns-first-narrow td:first-child { width: 20%; } .salaxy-rpt .document .salaxy-report-table.columns-four th, .salaxy-rpt .document .salaxy-accounting-report-table.columns-four th, .salaxy-rpt .document .salaxy-report-table.columns-four td, .salaxy-rpt .document .salaxy-accounting-report-table.columns-four td { width: 20%; } .salaxy-rpt .document .salaxy-report-table.columns-four th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-four th:first-child, .salaxy-rpt .document .salaxy-report-table.columns-four td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-four td:first-child { width: 40%; } .salaxy-rpt .document .salaxy-report-table.columns-five th, .salaxy-rpt .document .salaxy-accounting-report-table.columns-five th, .salaxy-rpt .document .salaxy-report-table.columns-five td, .salaxy-rpt .document .salaxy-accounting-report-table.columns-five td { width: 17.5%; } .salaxy-rpt .document .salaxy-report-table.columns-five th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-five th:first-child, .salaxy-rpt .document .salaxy-report-table.columns-five td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-five td:first-child { width: 30%; } .salaxy-rpt .document .salaxy-report-table.columns-five th:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-five th:nth-child(2), .salaxy-rpt .document .salaxy-report-table.columns-five td:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-five td:nth-child(2) { text-align: left; } .salaxy-rpt .document .salaxy-report-table.columns-six th, .salaxy-rpt .document .salaxy-accounting-report-table.columns-six th, .salaxy-rpt .document .salaxy-report-table.columns-six td, .salaxy-rpt .document .salaxy-accounting-report-table.columns-six td { width: 15%; } .salaxy-rpt .document .salaxy-report-table.columns-six th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-six th:first-child, .salaxy-rpt .document .salaxy-report-table.columns-six td:first-child, .salaxy-rpt .document .salaxy-accounting-report-table.columns-six td:first-child { width: 25%; } .salaxy-rpt .document .salaxy-report-table.columns-six th:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-six th:nth-child(2), .salaxy-rpt .document .salaxy-report-table.columns-six td:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-six td:nth-child(2) { text-align: left; } .salaxy-rpt .document .salaxy-report-table.columns-first-two-text th:nth-child(1), .salaxy-rpt .document .salaxy-accounting-report-table.columns-first-two-text th:nth-child(1), .salaxy-rpt .document .salaxy-report-table.columns-first-two-text th:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-first-two-text th:nth-child(2), .salaxy-rpt .document .salaxy-report-table.columns-first-two-text td:nth-child(1), .salaxy-rpt .document .salaxy-accounting-report-table.columns-first-two-text td:nth-child(1), .salaxy-rpt .document .salaxy-report-table.columns-first-two-text td:nth-child(2), .salaxy-rpt .document .salaxy-accounting-report-table.columns-first-two-text td:nth-child(2) { text-align: left !important; } .salaxy-rpt .document .salaxy-report-table .salaxy-accounting-report-group-header td, .salaxy-rpt .document .salaxy-accounting-report-table .salaxy-accounting-report-group-header td { padding-top: 6px; padding-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; } .salaxy-rpt .document .salaxy-report-table .salaxy-report-table .salaxy-accounting-report-row, .salaxy-rpt .document .salaxy-accounting-report-table .salaxy-report-table .salaxy-accounting-report-row, .salaxy-rpt .document .salaxy-report-table .salaxy-accounting-report-table .salaxy-accounting-report-row, .salaxy-rpt .document .salaxy-accounting-report-table .salaxy-accounting-report-table .salaxy-accounting-report-row { font-weight: bold; } .salaxy-rpt .document .salaxy-report-table .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row, .salaxy-rpt .document .salaxy-accounting-report-table .salaxy-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row, .salaxy-rpt .document .salaxy-report-table .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row, .salaxy-rpt .document .salaxy-accounting-report-table .salaxy-accounting-report-table .salaxy-accounting-report-row.salaxy-accounting-report-child-row { font-weight: normal; } .salaxy-rpt .document .salaxy-report-table tfoot tr.total th, .salaxy-rpt .document .salaxy-accounting-report-table tfoot tr.total th { padding-top: 10px; font-weight: bold; } .salaxy-rpt .document .salaxy-report-table tfoot tr.total th:first-child, .salaxy-rpt .document .salaxy-accounting-report-table tfoot tr.total th:first-child { text-transform: uppercase; } .salaxy-rpt .document .table { width: 100%; max-width: 100%; margin-bottom: 14px; } .salaxy-rpt .document .table thead tr th, .salaxy-rpt .document .table tbody tr th, .salaxy-rpt .document .table tfoot tr th, .salaxy-rpt .document .table thead tr td, .salaxy-rpt .document .table tbody tr td, .salaxy-rpt .document .table tfoot tr td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } .salaxy-rpt .document .table thead tr th { vertical-align: bottom; border-bottom: 2px solid #ddd; border-top: 0px none; } .salaxy-rpt .document .table .table { background-color: #fff; } .salaxy-rpt .document .table .margin-top { margin-top: 20px; } .salaxy-rpt .document .report-table { border-spacing: 0; margin-bottom: 20px; margin-top: 0px; } .salaxy-rpt .document .report-table-compact { border-spacing: 0; margin-bottom: 10px; } .salaxy-rpt .document .report-table td, .salaxy-rpt .document table td, .salaxy-rpt .document table th, .salaxy-rpt .document .report-table-compact td, .salaxy-rpt .document .document-preview p, .salaxy-rpt .document .document-preview time { padding: 0 5px; padding-left: 1px; } .salaxy-rpt .document .report-table thead th, .salaxy-rpt .document .report-table-compact th { font-size: 13px; font-weight: bold; padding: 0 5px 5px 0; } .salaxy-rpt .document .report-table-separator tr td:nth-child(2) { border-right: 1px solid black; padding-right: 5px; } .salaxy-rpt .document .report-signature-line { height: 25px; border-bottom: 1px solid black; margin-bottom: 8px; } .salaxy-rpt .document .report-header-txt { line-height: 1.3; margin: 3px 0 0; } .salaxy-rpt .document .report-section { min-height: 200px; } .salaxy-rpt .document .table-condensed thead tr th, .salaxy-rpt .document .table-condensed tbody tr th, .salaxy-rpt .document .table-condensed tfoot tr th, .salaxy-rpt .document .table-condensed thead tr td, .salaxy-rpt .document .table-condensed tbody tr td, .salaxy-rpt .document .table-condensed tfoot tr td { padding: 1px; font-size: 14px; line-height: normal; } .salaxy-rpt .document .small thead tr th, .salaxy-rpt .document .small tbody tr th, .salaxy-rpt .document .small tfoot tr th, .salaxy-rpt .document .small thead tr td, .salaxy-rpt .document .small tbody tr td, .salaxy-rpt .document .small tfoot tr td { font-size: 11px; } .salaxy-rpt .document .table-bordered { border: 1px solid #ddd; } .salaxy-rpt .document .table-bordered thead tr th, .salaxy-rpt .document .table-bordered tbody tr th, .salaxy-rpt .document .table-bordered tfoot tr th, .salaxy-rpt .document .table-bordered thead tr td, .salaxy-rpt .document .table-bordered tbody tr td, .salaxy-rpt .document .table-bordered tfoot tr td { border: 1px solid #ddd; } .salaxy-rpt .document .table-bordered thead tr th, .salaxy-rpt .document .table-bordered thead tr td { border-bottom-width: 2px; } .salaxy-rpt .document .table-striped tbody tr:nth-of-type(odd) { -webkit-print-color-adjust: exact; background-color: #f9f9f9; } .salaxy-rpt .watermark { position: absolute; left: 0; top: 40%; font-weight: bold; font-size: 20mm; opacity: 0.3; color: #d55552; text-align: center; width: 100%; transform: rotate(-45deg); -ms-transform: rotate(-45deg); /* IE 9 */ -webkit-transform: rotate(-45deg); /* Opera, Chrome, and Safari */ } .salaxy-rpt .calendar-report { border-collapse: collapse; border-spacing: 0; border: 2px solid black; } .salaxy-rpt .calendar-report .calendar-title, .salaxy-rpt .calendar-report .month-title { width: 100px; vertical-align: middle; text-align: center; text-transform: uppercase; padding: 2px 6px; font-size: 12px; } .salaxy-rpt .calendar-report .week-number { text-align: center; vertical-align: middle; font-weight: normal; } .salaxy-rpt .calendar-report .series-title { width: 100px; vertical-align: middle; padding: 2px 6px; font-size: 12px; } .salaxy-rpt .calendar-report .day-number { font-size: 8px; } .salaxy-rpt .calendar-report tr td { height: 35px; } .salaxy-rpt .calendar-report tr th { font-weight: normal; } .salaxy-rpt .calendar-report tr td, .salaxy-rpt .calendar-report tr th { border: 2px solid black; position: relative; padding: 2px 0 0 0; } .salaxy-rpt .calendar-report tr td.day, .salaxy-rpt .calendar-report tr th.day { font-size: 8px; width: 14px; text-align: center; } .salaxy-rpt .calendar-report tr td.day-of-week-6, .salaxy-rpt .calendar-report tr th.day-of-week-6 { background-color: #DDD !important; } .salaxy-rpt .calendar-report tr td.day-of-week-7, .salaxy-rpt .calendar-report tr th.day-of-week-7, .salaxy-rpt .calendar-report tr td.day-type-holiday, .salaxy-rpt .calendar-report tr th.day-type-holiday, .salaxy-rpt .calendar-report tr td.day-type-holiday.day-of-week-6, .salaxy-rpt .calendar-report tr th.day-type-holiday.day-of-week-6 { background-color: #BBB !important; } .salaxy-rpt .event-primary { background-color: #009fd8 !important; }