diff --git a/lib/classes/HTMLBuilder/Wrapper/HTMLWrapper.php b/lib/classes/HTMLBuilder/Wrapper/HTMLWrapper.php
index 291c556f4..a9bd47284 100644
--- a/lib/classes/HTMLBuilder/Wrapper/HTMLWrapper.php
+++ b/lib/classes/HTMLBuilder/Wrapper/HTMLWrapper.php
@@ -22,7 +22,7 @@ class HTMLWrapper implements WrapperInterface
if (!empty($values['label'])) {
$result .= '
-
';
+
';
}
if (!empty($values['icon-before']) || !empty($values['icon-after'])) {
diff --git a/pdfgen.php b/pdfgen.php
index af66dd5ab..820f5d3fe 100644
--- a/pdfgen.php
+++ b/pdfgen.php
@@ -31,9 +31,6 @@ if (file_exists($docroot.'/templates/'.$ptype.'/init.php')) {
// Individuazione delle impostazioni finali
$settings = array_merge($default, (array) $custom);
- // Fix per l'altezza minima del margine in alto
- $settings['header-height'] = ($settings['header-height'] < $settings['margins']['top']) ? $settings['margins']['top'] : $settings['header-height'];
-
// Individuazione delle variabili fondamentali per la sostituzione dei contenuti
if (file_exists($docroot.'/templates/'.$ptype.'/custom/init.php')) {
include $docroot.'/templates/'.$ptype.'/custom/init.php';
@@ -55,6 +52,24 @@ if (file_exists($docroot.'/templates/'.$ptype.'/init.php')) {
}
$report = ob_get_clean();
+ if(!empty($autofill)){
+ $result = '';
+
+ // max($autofill['additional']) = $autofill['rows'] - 1
+ for ($i = (floor($autofill['count']) % $autofill['rows']); $i < $autofill['additional']; ++$i) {
+ $result .= '
+
';
+ for($c = 0; $c < $autofill['columns']; $c++){
+ $result .= '
+ | ';
+ }
+ $result .= '
+
';
+ }
+
+ $report = str_replace('|autofill|', $result, $report);
+ }
+
// Generazione dei contenuti dell'header
ob_start();
if (file_exists($docroot.'/templates/'.$ptype.'/custom/header.php')) {
@@ -131,8 +146,8 @@ if (file_exists($docroot.'/templates/'.$ptype.'/init.php')) {
'helvetica',
$settings['margins']['left'],
$settings['margins']['right'],
- $settings['header-height'],
- $settings['footer-height'],
+ $settings['margins']['top'] + $settings['header-height'],
+ $settings['margins']['bottom'] + $settings['footer-height'],
$settings['margins']['top'],
$settings['margins']['bottom'],
strtolower($settings['orientation']) == 'l' ? 'l' : 'p'
diff --git a/templates/base/bootstrap.css b/templates/base/bootstrap.css
index 251961e5a..f1230975a 100644
--- a/templates/base/bootstrap.css
+++ b/templates/base/bootstrap.css
@@ -4,257 +4,216 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-/*!
- * Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.3/customize/?id=958fac01c3610bf1e17a88242fb98ad9)
- * Config saved to config.json and https://gist.github.com/958fac01c3610bf1e17a88242fb98ad9
- */
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
+
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
+
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
- }
- body {
+}
+
+body {
margin: 0;
- }
- article,
- aside,
- details,
- figcaption,
- figure,
- footer,
- header,
- hgroup,
- main,
- menu,
- nav,
- section,
- summary {
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
display: block;
- }
- audio,
- canvas,
- progress,
- video {
+}
+
+audio,
+canvas,
+progress,
+video {
display: inline-block;
vertical-align: baseline;
- }
- audio:not([controls]) {
+}
+
+audio:not([controls]) {
display: none;
height: 0;
- }
- [hidden],
- template {
+}
+
+[hidden],
+template {
display: none;
- }
- a {
+}
+
+a {
background-color: transparent;
- }
- a:active,
- a:hover {
+}
+
+a:active,
+a:hover {
outline: 0;
- }
- abbr[title] {
+}
+
+abbr[title] {
border-bottom: 1px dotted;
- }
- b,
- strong {
+}
+
+b,
+strong {
font-weight: bold;
- }
- dfn {
+}
+
+dfn {
font-style: italic;
- }
- h1 {
+}
+
+h1 {
font-size: 2em;
margin: 0.67em 0;
- }
- mark {
+}
+
+mark {
background: #ff0;
color: #000;
- }
- small {
+}
+
+small {
font-size: 80%;
- }
- sub,
- sup {
+}
+
+sub,
+sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
- }
- sup {
+}
+
+sup {
top: -0.5em;
- }
- sub {
+}
+
+sub {
bottom: -0.25em;
- }
- img {
+}
+
+img {
border: 0;
- }
- svg:not(:root) {
+}
+
+svg:not(:root) {
overflow: hidden;
- }
- figure {
+}
+
+figure {
margin: 1em 40px;
- }
- hr {
+}
+
+hr {
-webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
height: 0;
- }
- pre {
+}
+
+pre {
overflow: auto;
- }
- code,
- kbd,
- pre,
- samp {
+}
+
+code,
+kbd,
+pre,
+samp {
font-family: monospace, monospace;
font-size: 1em;
- }
- button,
- input,
- optgroup,
- select,
- textarea {
- color: inherit;
- font: inherit;
- margin: 0;
- }
- button {
- overflow: visible;
- }
- button,
- select {
- text-transform: none;
- }
- button,
- html input[type="button"],
- input[type="reset"],
- input[type="submit"] {
- -webkit-appearance: button;
- cursor: pointer;
- }
- button[disabled],
- html input[disabled] {
- cursor: default;
- }
- button::-moz-focus-inner,
- input::-moz-focus-inner {
- border: 0;
- padding: 0;
- }
- input {
- line-height: normal;
- }
- input[type="checkbox"],
- input[type="radio"] {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0;
- }
- input[type="number"]::-webkit-inner-spin-button,
- input[type="number"]::-webkit-outer-spin-button {
- height: auto;
- }
- input[type="search"] {
- -webkit-appearance: textfield;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- }
- input[type="search"]::-webkit-search-cancel-button,
- input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
- }
- fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
- }
- legend {
- border: 0;
- padding: 0;
- }
- textarea {
- overflow: auto;
- }
- optgroup {
- font-weight: bold;
- }
- table {
+}
+
+table {
border-collapse: collapse;
border-spacing: 0;
- }
- td,
- th {
+}
+
+td,
+th {
padding: 0;
- }
- * {
+}
+
+* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- }
- *:before,
- *:after {
+}
+
+*:before,
+*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- }
- html {
+}
+
+html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- }
- body {
+}
+
+body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: #ffffff;
- }
- input,
- button,
- select,
- textarea {
+}
+
+input,
+button,
+select,
+textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
- }
- a {
+}
+
+a {
color: #337ab7;
text-decoration: none;
- }
- a:hover,
- a:focus {
+}
+
+a:hover,
+a:focus {
color: #23527c;
text-decoration: underline;
- }
- a:focus {
+}
+
+a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
- }
- figure {
+}
+
+figure {
margin: 0;
- }
- img {
+}
+
+img {
vertical-align: middle;
- }
- .img-responsive {
+}
+
+.img-responsive {
display: block;
max-width: 100%;
height: auto;
- }
- .img-rounded {
+}
+
+.img-rounded {
border-radius: 6px;
- }
- .img-thumbnail {
+}
+
+.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #ffffff;
@@ -266,1561 +225,875 @@ html {
display: inline-block;
max-width: 100%;
height: auto;
- }
- .img-circle {
+}
+
+.img-circle {
border-radius: 50%;
- }
- hr {
+}
+
+hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eeeeee;
- }
- .sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
- }
- .sr-only-focusable:active,
- .sr-only-focusable:focus {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip: auto;
- }
- [role="button"] {
- cursor: pointer;
- }
- h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- .h1,
- .h2,
- .h3,
- .h4,
- .h5,
- .h6 {
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
- }
- h1 small,
- h2 small,
- h3 small,
- h4 small,
- h5 small,
- h6 small,
- .h1 small,
- .h2 small,
- .h3 small,
- .h4 small,
- .h5 small,
- .h6 small,
- h1 .small,
- h2 .small,
- h3 .small,
- h4 .small,
- h5 .small,
- h6 .small,
- .h1 .small,
- .h2 .small,
- .h3 .small,
- .h4 .small,
- .h5 .small,
- .h6 .small {
+}
+
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
font-weight: normal;
line-height: 1;
color: #777777;
- }
- h1,
- .h1,
- h2,
- .h2,
- h3,
- .h3 {
+}
+
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
margin-top: 20px;
margin-bottom: 10px;
- }
- h1 small,
- .h1 small,
- h2 small,
- .h2 small,
- h3 small,
- .h3 small,
- h1 .small,
- .h1 .small,
- h2 .small,
- .h2 .small,
- h3 .small,
- .h3 .small {
+}
+
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
font-size: 65%;
- }
- h4,
- .h4,
- h5,
- .h5,
- h6,
- .h6 {
+}
+
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
margin-top: 10px;
margin-bottom: 10px;
- }
- h4 small,
- .h4 small,
- h5 small,
- .h5 small,
- h6 small,
- .h6 small,
- h4 .small,
- .h4 .small,
- h5 .small,
- .h5 .small,
- h6 .small,
- .h6 .small {
+}
+
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
font-size: 75%;
- }
- h1,
- .h1 {
+}
+
+h1,
+.h1 {
font-size: 36px;
- }
- h2,
- .h2 {
+}
+
+h2,
+.h2 {
font-size: 30px;
- }
- h3,
- .h3 {
+}
+
+h3,
+.h3 {
font-size: 24px;
- }
- h4,
- .h4 {
+}
+
+h4,
+.h4 {
font-size: 18px;
- }
- h5,
- .h5 {
+}
+
+h5,
+.h5 {
font-size: 14px;
- }
- h6,
- .h6 {
+}
+
+h6,
+.h6 {
font-size: 12px;
- }
- p {
+}
+
+p {
margin: 0 0 10px;
- }
- .lead {
+}
+
+.lead {
margin-bottom: 20px;
font-size: 16px;
font-weight: 300;
line-height: 1.4;
- }
- @media (min-width: 768px) {
- .lead {
- font-size: 21px;
- }
- }
- small,
- .small {
+}
+
+small,
+.small {
font-size: 85%;
- }
- mark,
- .mark {
+}
+
+mark,
+.mark {
background-color: #fcf8e3;
padding: .2em;
- }
- .text-left {
+}
+
+.text-left {
text-align: left;
- }
- .text-right {
+}
+
+.text-right {
text-align: right;
- }
- .text-center {
+}
+
+.text-center {
text-align: center;
- }
- .text-justify {
+}
+
+.text-justify {
text-align: justify;
- }
- .text-nowrap {
+}
+
+.text-nowrap {
white-space: nowrap;
- }
- .text-lowercase {
+}
+
+.text-lowercase {
text-transform: lowercase;
- }
- .text-uppercase {
+}
+
+.text-uppercase {
text-transform: uppercase;
- }
- .text-capitalize {
+}
+
+.text-capitalize {
text-transform: capitalize;
- }
- .text-muted {
+}
+
+.text-muted {
color: #777777;
- }
- .text-primary {
+}
+
+.text-primary {
color: #337ab7;
- }
- a.text-primary:hover,
- a.text-primary:focus {
+}
+
+a.text-primary:hover,
+a.text-primary:focus {
color: #286090;
- }
- .text-success {
+}
+
+.text-success {
color: #3c763d;
- }
- a.text-success:hover,
- a.text-success:focus {
+}
+
+a.text-success:hover,
+a.text-success:focus {
color: #2b542c;
- }
- .text-info {
+}
+
+.text-info {
color: #31708f;
- }
- a.text-info:hover,
- a.text-info:focus {
+}
+
+a.text-info:hover,
+a.text-info:focus {
color: #245269;
- }
- .text-warning {
+}
+
+.text-warning {
color: #8a6d3b;
- }
- a.text-warning:hover,
- a.text-warning:focus {
+}
+
+a.text-warning:hover,
+a.text-warning:focus {
color: #66512c;
- }
- .text-danger {
+}
+
+.text-danger {
color: #a94442;
- }
- a.text-danger:hover,
- a.text-danger:focus {
+}
+
+a.text-danger:hover,
+a.text-danger:focus {
color: #843534;
- }
- .bg-primary {
+}
+
+.bg-primary {
color: #fff;
background-color: #337ab7;
- }
- a.bg-primary:hover,
- a.bg-primary:focus {
+}
+
+a.bg-primary:hover,
+a.bg-primary:focus {
background-color: #286090;
- }
- .bg-success {
+}
+
+.bg-success {
background-color: #dff0d8;
- }
- a.bg-success:hover,
- a.bg-success:focus {
+}
+
+a.bg-success:hover,
+a.bg-success:focus {
background-color: #c1e2b3;
- }
- .bg-info {
+}
+
+.bg-info {
background-color: #d9edf7;
- }
- a.bg-info:hover,
- a.bg-info:focus {
+}
+
+a.bg-info:hover,
+a.bg-info:focus {
background-color: #afd9ee;
- }
- .bg-warning {
+}
+
+.bg-warning {
background-color: #fcf8e3;
- }
- a.bg-warning:hover,
- a.bg-warning:focus {
+}
+
+a.bg-warning:hover,
+a.bg-warning:focus {
background-color: #f7ecb5;
- }
- .bg-danger {
+}
+
+.bg-danger {
background-color: #f2dede;
- }
- a.bg-danger:hover,
- a.bg-danger:focus {
+}
+
+a.bg-danger:hover,
+a.bg-danger:focus {
background-color: #e4b9b9;
- }
- .page-header {
+}
+
+.page-header {
padding-bottom: 9px;
margin: 40px 0 20px;
border-bottom: 1px solid #eeeeee;
- }
- ul,
- ol {
+}
+
+ul,
+ol {
margin-top: 0;
margin-bottom: 10px;
- }
- ul ul,
- ol ul,
- ul ol,
- ol ol {
+}
+
+ul ul,
+ol ul,
+ul ol,
+ol ol {
margin-bottom: 0;
- }
- .list-unstyled {
+}
+
+.list-unstyled {
padding-left: 0;
list-style: none;
- }
- .list-inline {
+}
+
+.list-inline {
padding-left: 0;
list-style: none;
margin-left: -5px;
- }
- .list-inline > li {
+}
+
+.list-inline>li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
- }
- dl {
- margin-top: 0;
- margin-bottom: 20px;
- }
- dt,
- dd {
- line-height: 1.42857143;
- }
- dt {
- font-weight: bold;
- }
- dd {
- margin-left: 0;
- }
- @media (min-width: 768px) {
- .dl-horizontal dt {
- float: left;
- width: 160px;
- clear: left;
- text-align: right;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .dl-horizontal dd {
- margin-left: 180px;
- }
- }
- abbr[title],
- abbr[data-original-title] {
+}
+
+abbr[title],
+abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #777777;
- }
- .initialism {
+}
+
+.initialism {
font-size: 90%;
text-transform: uppercase;
- }
- blockquote {
+}
+
+blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eeeeee;
- }
- blockquote p:last-child,
- blockquote ul:last-child,
- blockquote ol:last-child {
+}
+
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
margin-bottom: 0;
- }
- blockquote footer,
- blockquote small,
- blockquote .small {
+}
+
+blockquote footer,
+blockquote small,
+blockquote .small {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #777777;
- }
- blockquote footer:before,
- blockquote small:before,
- blockquote .small:before {
+}
+
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
content: '\2014 \00A0';
- }
- .blockquote-reverse,
- blockquote.pull-right {
+}
+
+.blockquote-reverse,
+blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid #eeeeee;
border-left: 0;
text-align: right;
- }
- .blockquote-reverse footer:before,
- blockquote.pull-right footer:before,
- .blockquote-reverse small:before,
- blockquote.pull-right small:before,
- .blockquote-reverse .small:before,
- blockquote.pull-right .small:before {
+}
+
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
content: '';
- }
- .blockquote-reverse footer:after,
- blockquote.pull-right footer:after,
- .blockquote-reverse small:after,
- blockquote.pull-right small:after,
- .blockquote-reverse .small:after,
- blockquote.pull-right .small:after {
+}
+
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
content: '\00A0 \2014';
- }
- address {
+}
+
+address {
margin-bottom: 20px;
font-style: normal;
line-height: 1.42857143;
- }
- .container {
- margin-right: auto;
- margin-left: auto;
- padding-left: 15px;
- padding-right: 15px;
- }
- @media (min-width: 768px) {
- .container {
- width: 750px;
- }
- }
- @media (min-width: 992px) {
- .container {
- width: 970px;
- }
- }
- @media (min-width: 1200px) {
- .container {
- width: 1170px;
- }
- }
- .container-fluid {
- margin-right: auto;
- margin-left: auto;
- padding-left: 15px;
- padding-right: 15px;
- }
- .row {
- margin-left: -15px;
- margin-right: -15px;
- }
- .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+}
+
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11,
+.col-xs-12,
+.col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
- }
- .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+}
+
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11,
+.col-xs-12 {
float: left;
- }
- .col-xs-12 {
+}
+
+.col-xs-12 {
width: 100%;
- }
- .col-xs-11 {
+}
+
+.col-xs-11 {
width: 91.66666667%;
- }
- .col-xs-10 {
+}
+
+.col-xs-10 {
width: 83.33333333%;
- }
- .col-xs-9 {
+}
+
+.col-xs-9 {
width: 75%;
- }
- .col-xs-8 {
+}
+
+.col-xs-8 {
width: 66.66666667%;
- }
- .col-xs-7 {
+}
+
+.col-xs-7 {
width: 58.33333333%;
- }
- .col-xs-6 {
+}
+
+.col-xs-6 {
width: 50%;
- }
- .col-xs-5 {
+}
+
+.col-xs-5 {
width: 41.66666667%;
- }
- .col-xs-4 {
+}
+
+.col-xs-4 {
width: 33.33333333%;
- }
- .col-xs-3 {
+}
+
+.col-xs-3 {
width: 25%;
- }
- .col-xs-2 {
+}
+
+.col-xs-2 {
width: 16.66666667%;
- }
- .col-xs-1 {
+}
+
+.col-xs-1 {
width: 8.33333333%;
- }
- .col-xs-pull-12 {
+}
+
+.col-xs-pull-12 {
right: 100%;
- }
- .col-xs-pull-11 {
+}
+
+.col-xs-pull-11 {
right: 91.66666667%;
- }
- .col-xs-pull-10 {
+}
+
+.col-xs-pull-10 {
right: 83.33333333%;
- }
- .col-xs-pull-9 {
+}
+
+.col-xs-pull-9 {
right: 75%;
- }
- .col-xs-pull-8 {
+}
+
+.col-xs-pull-8 {
right: 66.66666667%;
- }
- .col-xs-pull-7 {
+}
+
+.col-xs-pull-7 {
right: 58.33333333%;
- }
- .col-xs-pull-6 {
+}
+
+.col-xs-pull-6 {
right: 50%;
- }
- .col-xs-pull-5 {
+}
+
+.col-xs-pull-5 {
right: 41.66666667%;
- }
- .col-xs-pull-4 {
+}
+
+.col-xs-pull-4 {
right: 33.33333333%;
- }
- .col-xs-pull-3 {
+}
+
+.col-xs-pull-3 {
right: 25%;
- }
- .col-xs-pull-2 {
+}
+
+.col-xs-pull-2 {
right: 16.66666667%;
- }
- .col-xs-pull-1 {
+}
+
+.col-xs-pull-1 {
right: 8.33333333%;
- }
- .col-xs-pull-0 {
+}
+
+.col-xs-pull-0 {
right: auto;
- }
- .col-xs-push-12 {
+}
+
+.col-xs-push-12 {
left: 100%;
- }
- .col-xs-push-11 {
+}
+
+.col-xs-push-11 {
left: 91.66666667%;
- }
- .col-xs-push-10 {
+}
+
+.col-xs-push-10 {
left: 83.33333333%;
- }
- .col-xs-push-9 {
+}
+
+.col-xs-push-9 {
left: 75%;
- }
- .col-xs-push-8 {
+}
+
+.col-xs-push-8 {
left: 66.66666667%;
- }
- .col-xs-push-7 {
+}
+
+.col-xs-push-7 {
left: 58.33333333%;
- }
- .col-xs-push-6 {
+}
+
+.col-xs-push-6 {
left: 50%;
- }
- .col-xs-push-5 {
+}
+
+.col-xs-push-5 {
left: 41.66666667%;
- }
- .col-xs-push-4 {
+}
+
+.col-xs-push-4 {
left: 33.33333333%;
- }
- .col-xs-push-3 {
+}
+
+.col-xs-push-3 {
left: 25%;
- }
- .col-xs-push-2 {
+}
+
+.col-xs-push-2 {
left: 16.66666667%;
- }
- .col-xs-push-1 {
+}
+
+.col-xs-push-1 {
left: 8.33333333%;
- }
- .col-xs-push-0 {
+}
+
+.col-xs-push-0 {
left: auto;
- }
- .col-xs-offset-12 {
+}
+
+.col-xs-offset-12 {
margin-left: 100%;
- }
- .col-xs-offset-11 {
+}
+
+.col-xs-offset-11 {
margin-left: 91.66666667%;
- }
- .col-xs-offset-10 {
+}
+
+.col-xs-offset-10 {
margin-left: 83.33333333%;
- }
- .col-xs-offset-9 {
+}
+
+.col-xs-offset-9 {
margin-left: 75%;
- }
- .col-xs-offset-8 {
+}
+
+.col-xs-offset-8 {
margin-left: 66.66666667%;
- }
- .col-xs-offset-7 {
+}
+
+.col-xs-offset-7 {
margin-left: 58.33333333%;
- }
- .col-xs-offset-6 {
+}
+
+.col-xs-offset-6 {
margin-left: 50%;
- }
- .col-xs-offset-5 {
+}
+
+.col-xs-offset-5 {
margin-left: 41.66666667%;
- }
- .col-xs-offset-4 {
+}
+
+.col-xs-offset-4 {
margin-left: 33.33333333%;
- }
- .col-xs-offset-3 {
+}
+
+.col-xs-offset-3 {
margin-left: 25%;
- }
- .col-xs-offset-2 {
+}
+
+.col-xs-offset-2 {
margin-left: 16.66666667%;
- }
- .col-xs-offset-1 {
+}
+
+.col-xs-offset-1 {
margin-left: 8.33333333%;
- }
- .col-xs-offset-0 {
+}
+
+.col-xs-offset-0 {
margin-left: 0%;
- }
- @media (min-width: 768px) {
- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
- float: left;
- }
- .col-sm-12 {
- width: 100%;
- }
- .col-sm-11 {
- width: 91.66666667%;
- }
- .col-sm-10 {
- width: 83.33333333%;
- }
- .col-sm-9 {
- width: 75%;
- }
- .col-sm-8 {
- width: 66.66666667%;
- }
- .col-sm-7 {
- width: 58.33333333%;
- }
- .col-sm-6 {
- width: 50%;
- }
- .col-sm-5 {
- width: 41.66666667%;
- }
- .col-sm-4 {
- width: 33.33333333%;
- }
- .col-sm-3 {
- width: 25%;
- }
- .col-sm-2 {
- width: 16.66666667%;
- }
- .col-sm-1 {
- width: 8.33333333%;
- }
- .col-sm-pull-12 {
- right: 100%;
- }
- .col-sm-pull-11 {
- right: 91.66666667%;
- }
- .col-sm-pull-10 {
- right: 83.33333333%;
- }
- .col-sm-pull-9 {
- right: 75%;
- }
- .col-sm-pull-8 {
- right: 66.66666667%;
- }
- .col-sm-pull-7 {
- right: 58.33333333%;
- }
- .col-sm-pull-6 {
- right: 50%;
- }
- .col-sm-pull-5 {
- right: 41.66666667%;
- }
- .col-sm-pull-4 {
- right: 33.33333333%;
- }
- .col-sm-pull-3 {
- right: 25%;
- }
- .col-sm-pull-2 {
- right: 16.66666667%;
- }
- .col-sm-pull-1 {
- right: 8.33333333%;
- }
- .col-sm-pull-0 {
- right: auto;
- }
- .col-sm-push-12 {
- left: 100%;
- }
- .col-sm-push-11 {
- left: 91.66666667%;
- }
- .col-sm-push-10 {
- left: 83.33333333%;
- }
- .col-sm-push-9 {
- left: 75%;
- }
- .col-sm-push-8 {
- left: 66.66666667%;
- }
- .col-sm-push-7 {
- left: 58.33333333%;
- }
- .col-sm-push-6 {
- left: 50%;
- }
- .col-sm-push-5 {
- left: 41.66666667%;
- }
- .col-sm-push-4 {
- left: 33.33333333%;
- }
- .col-sm-push-3 {
- left: 25%;
- }
- .col-sm-push-2 {
- left: 16.66666667%;
- }
- .col-sm-push-1 {
- left: 8.33333333%;
- }
- .col-sm-push-0 {
- left: auto;
- }
- .col-sm-offset-12 {
- margin-left: 100%;
- }
- .col-sm-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-sm-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-sm-offset-9 {
- margin-left: 75%;
- }
- .col-sm-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-sm-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-sm-offset-6 {
- margin-left: 50%;
- }
- .col-sm-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-sm-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-sm-offset-3 {
- margin-left: 25%;
- }
- .col-sm-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-sm-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-sm-offset-0 {
- margin-left: 0%;
- }
- }
- @media (min-width: 992px) {
- .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
- float: left;
- }
- .col-md-12 {
- width: 100%;
- }
- .col-md-11 {
- width: 91.66666667%;
- }
- .col-md-10 {
- width: 83.33333333%;
- }
- .col-md-9 {
- width: 75%;
- }
- .col-md-8 {
- width: 66.66666667%;
- }
- .col-md-7 {
- width: 58.33333333%;
- }
- .col-md-6 {
- width: 50%;
- }
- .col-md-5 {
- width: 41.66666667%;
- }
- .col-md-4 {
- width: 33.33333333%;
- }
- .col-md-3 {
- width: 25%;
- }
- .col-md-2 {
- width: 16.66666667%;
- }
- .col-md-1 {
- width: 8.33333333%;
- }
- .col-md-pull-12 {
- right: 100%;
- }
- .col-md-pull-11 {
- right: 91.66666667%;
- }
- .col-md-pull-10 {
- right: 83.33333333%;
- }
- .col-md-pull-9 {
- right: 75%;
- }
- .col-md-pull-8 {
- right: 66.66666667%;
- }
- .col-md-pull-7 {
- right: 58.33333333%;
- }
- .col-md-pull-6 {
- right: 50%;
- }
- .col-md-pull-5 {
- right: 41.66666667%;
- }
- .col-md-pull-4 {
- right: 33.33333333%;
- }
- .col-md-pull-3 {
- right: 25%;
- }
- .col-md-pull-2 {
- right: 16.66666667%;
- }
- .col-md-pull-1 {
- right: 8.33333333%;
- }
- .col-md-pull-0 {
- right: auto;
- }
- .col-md-push-12 {
- left: 100%;
- }
- .col-md-push-11 {
- left: 91.66666667%;
- }
- .col-md-push-10 {
- left: 83.33333333%;
- }
- .col-md-push-9 {
- left: 75%;
- }
- .col-md-push-8 {
- left: 66.66666667%;
- }
- .col-md-push-7 {
- left: 58.33333333%;
- }
- .col-md-push-6 {
- left: 50%;
- }
- .col-md-push-5 {
- left: 41.66666667%;
- }
- .col-md-push-4 {
- left: 33.33333333%;
- }
- .col-md-push-3 {
- left: 25%;
- }
- .col-md-push-2 {
- left: 16.66666667%;
- }
- .col-md-push-1 {
- left: 8.33333333%;
- }
- .col-md-push-0 {
- left: auto;
- }
- .col-md-offset-12 {
- margin-left: 100%;
- }
- .col-md-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-md-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-md-offset-9 {
- margin-left: 75%;
- }
- .col-md-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-md-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-md-offset-6 {
- margin-left: 50%;
- }
- .col-md-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-md-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-md-offset-3 {
- margin-left: 25%;
- }
- .col-md-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-md-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-md-offset-0 {
- margin-left: 0%;
- }
- }
- @media (min-width: 1200px) {
- .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
- float: left;
- }
- .col-lg-12 {
- width: 100%;
- }
- .col-lg-11 {
- width: 91.66666667%;
- }
- .col-lg-10 {
- width: 83.33333333%;
- }
- .col-lg-9 {
- width: 75%;
- }
- .col-lg-8 {
- width: 66.66666667%;
- }
- .col-lg-7 {
- width: 58.33333333%;
- }
- .col-lg-6 {
- width: 50%;
- }
- .col-lg-5 {
- width: 41.66666667%;
- }
- .col-lg-4 {
- width: 33.33333333%;
- }
- .col-lg-3 {
- width: 25%;
- }
- .col-lg-2 {
- width: 16.66666667%;
- }
- .col-lg-1 {
- width: 8.33333333%;
- }
- .col-lg-pull-12 {
- right: 100%;
- }
- .col-lg-pull-11 {
- right: 91.66666667%;
- }
- .col-lg-pull-10 {
- right: 83.33333333%;
- }
- .col-lg-pull-9 {
- right: 75%;
- }
- .col-lg-pull-8 {
- right: 66.66666667%;
- }
- .col-lg-pull-7 {
- right: 58.33333333%;
- }
- .col-lg-pull-6 {
- right: 50%;
- }
- .col-lg-pull-5 {
- right: 41.66666667%;
- }
- .col-lg-pull-4 {
- right: 33.33333333%;
- }
- .col-lg-pull-3 {
- right: 25%;
- }
- .col-lg-pull-2 {
- right: 16.66666667%;
- }
- .col-lg-pull-1 {
- right: 8.33333333%;
- }
- .col-lg-pull-0 {
- right: auto;
- }
- .col-lg-push-12 {
- left: 100%;
- }
- .col-lg-push-11 {
- left: 91.66666667%;
- }
- .col-lg-push-10 {
- left: 83.33333333%;
- }
- .col-lg-push-9 {
- left: 75%;
- }
- .col-lg-push-8 {
- left: 66.66666667%;
- }
- .col-lg-push-7 {
- left: 58.33333333%;
- }
- .col-lg-push-6 {
- left: 50%;
- }
- .col-lg-push-5 {
- left: 41.66666667%;
- }
- .col-lg-push-4 {
- left: 33.33333333%;
- }
- .col-lg-push-3 {
- left: 25%;
- }
- .col-lg-push-2 {
- left: 16.66666667%;
- }
- .col-lg-push-1 {
- left: 8.33333333%;
- }
- .col-lg-push-0 {
- left: auto;
- }
- .col-lg-offset-12 {
- margin-left: 100%;
- }
- .col-lg-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-lg-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-lg-offset-9 {
- margin-left: 75%;
- }
- .col-lg-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-lg-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-lg-offset-6 {
- margin-left: 50%;
- }
- .col-lg-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-lg-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-lg-offset-3 {
- margin-left: 25%;
- }
- .col-lg-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-lg-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-lg-offset-0 {
- margin-left: 0%;
- }
- }
- table {
+}
+
+table {
background-color: transparent;
- }
- caption {
+}
+
+caption {
padding-top: 8px;
padding-bottom: 8px;
color: #777777;
text-align: left;
- }
- th {
+}
+
+th {
text-align: left;
- }
- .table {
+}
+
+.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
- }
- .table > thead > tr > th,
- .table > tbody > tr > th,
- .table > tfoot > tr > th,
- .table > thead > tr > td,
- .table > tbody > tr > td,
- .table > tfoot > tr > td {
+}
+
+.table>thead>tr>th,
+.table>tbody>tr>th,
+.table>tfoot>tr>th,
+.table>thead>tr>td,
+.table>tbody>tr>td,
+.table>tfoot>tr>td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #dddddd;
- }
- .table > thead > tr > th {
+}
+
+.table>thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid #dddddd;
- }
- .table > caption + thead > tr:first-child > th,
- .table > colgroup + thead > tr:first-child > th,
- .table > thead:first-child > tr:first-child > th,
- .table > caption + thead > tr:first-child > td,
- .table > colgroup + thead > tr:first-child > td,
- .table > thead:first-child > tr:first-child > td {
+}
+
+.table>caption+thead>tr:first-child>th,
+.table>colgroup+thead>tr:first-child>th,
+.table>thead:first-child>tr:first-child>th,
+.table>caption+thead>tr:first-child>td,
+.table>colgroup+thead>tr:first-child>td,
+.table>thead:first-child>tr:first-child>td {
border-top: 0;
- }
- .table > tbody + tbody {
+}
+
+.table>tbody+tbody {
border-top: 2px solid #dddddd;
- }
- .table .table {
+}
+
+.table .table {
background-color: #ffffff;
- }
- .table-condensed > thead > tr > th,
- .table-condensed > tbody > tr > th,
- .table-condensed > tfoot > tr > th,
- .table-condensed > thead > tr > td,
- .table-condensed > tbody > tr > td,
- .table-condensed > tfoot > tr > td {
+}
+
+.table-condensed>thead>tr>th,
+.table-condensed>tbody>tr>th,
+.table-condensed>tfoot>tr>th,
+.table-condensed>thead>tr>td,
+.table-condensed>tbody>tr>td,
+.table-condensed>tfoot>tr>td {
padding: 5px;
- }
- .table-bordered {
+}
+
+.table-bordered {
border: 1px solid #dddddd;
- }
- .table-bordered > thead > tr > th,
- .table-bordered > tbody > tr > th,
- .table-bordered > tfoot > tr > th,
- .table-bordered > thead > tr > td,
- .table-bordered > tbody > tr > td,
- .table-bordered > tfoot > tr > td {
+}
+
+.table-bordered>thead>tr>th,
+.table-bordered>tbody>tr>th,
+.table-bordered>tfoot>tr>th,
+.table-bordered>thead>tr>td,
+.table-bordered>tbody>tr>td,
+.table-bordered>tfoot>tr>td {
border: 1px solid #dddddd;
- }
- .table-bordered > thead > tr > th,
- .table-bordered > thead > tr > td {
+}
+
+.table-bordered>thead>tr>th,
+.table-bordered>thead>tr>td {
border-bottom-width: 2px;
- }
- .table-striped > tbody > tr:nth-of-type(odd) {
+}
+
+.table-striped>tbody>tr:nth-of-type(odd) {
background-color: #f9f9f9;
- }
- .table-hover > tbody > tr:hover {
- background-color: #f5f5f5;
- }
- table col[class*="col-"] {
+}
+
+table col[class*="col-"] {
position: static;
float: none;
display: table-column;
- }
- table td[class*="col-"],
- table th[class*="col-"] {
+}
+
+table td[class*="col-"],
+table th[class*="col-"] {
position: static;
float: none;
display: table-cell;
- }
- .table > thead > tr > td.active,
- .table > tbody > tr > td.active,
- .table > tfoot > tr > td.active,
- .table > thead > tr > th.active,
- .table > tbody > tr > th.active,
- .table > tfoot > tr > th.active,
- .table > thead > tr.active > td,
- .table > tbody > tr.active > td,
- .table > tfoot > tr.active > td,
- .table > thead > tr.active > th,
- .table > tbody > tr.active > th,
- .table > tfoot > tr.active > th {
+}
+
+.table>thead>tr>td.active,
+.table>tbody>tr>td.active,
+.table>tfoot>tr>td.active,
+.table>thead>tr>th.active,
+.table>tbody>tr>th.active,
+.table>tfoot>tr>th.active,
+.table>thead>tr.active>td,
+.table>tbody>tr.active>td,
+.table>tfoot>tr.active>td,
+.table>thead>tr.active>th,
+.table>tbody>tr.active>th,
+.table>tfoot>tr.active>th {
background-color: #f5f5f5;
- }
- .table-hover > tbody > tr > td.active:hover,
- .table-hover > tbody > tr > th.active:hover,
- .table-hover > tbody > tr.active:hover > td,
- .table-hover > tbody > tr:hover > .active,
- .table-hover > tbody > tr.active:hover > th {
- background-color: #e8e8e8;
- }
- .table > thead > tr > td.success,
- .table > tbody > tr > td.success,
- .table > tfoot > tr > td.success,
- .table > thead > tr > th.success,
- .table > tbody > tr > th.success,
- .table > tfoot > tr > th.success,
- .table > thead > tr.success > td,
- .table > tbody > tr.success > td,
- .table > tfoot > tr.success > td,
- .table > thead > tr.success > th,
- .table > tbody > tr.success > th,
- .table > tfoot > tr.success > th {
+}
+
+.table>thead>tr>td.success,
+.table>tbody>tr>td.success,
+.table>tfoot>tr>td.success,
+.table>thead>tr>th.success,
+.table>tbody>tr>th.success,
+.table>tfoot>tr>th.success,
+.table>thead>tr.success>td,
+.table>tbody>tr.success>td,
+.table>tfoot>tr.success>td,
+.table>thead>tr.success>th,
+.table>tbody>tr.success>th,
+.table>tfoot>tr.success>th {
background-color: #dff0d8;
- }
- .table-hover > tbody > tr > td.success:hover,
- .table-hover > tbody > tr > th.success:hover,
- .table-hover > tbody > tr.success:hover > td,
- .table-hover > tbody > tr:hover > .success,
- .table-hover > tbody > tr.success:hover > th {
- background-color: #d0e9c6;
- }
- .table > thead > tr > td.info,
- .table > tbody > tr > td.info,
- .table > tfoot > tr > td.info,
- .table > thead > tr > th.info,
- .table > tbody > tr > th.info,
- .table > tfoot > tr > th.info,
- .table > thead > tr.info > td,
- .table > tbody > tr.info > td,
- .table > tfoot > tr.info > td,
- .table > thead > tr.info > th,
- .table > tbody > tr.info > th,
- .table > tfoot > tr.info > th {
+}
+
+.table>thead>tr>td.info,
+.table>tbody>tr>td.info,
+.table>tfoot>tr>td.info,
+.table>thead>tr>th.info,
+.table>tbody>tr>th.info,
+.table>tfoot>tr>th.info,
+.table>thead>tr.info>td,
+.table>tbody>tr.info>td,
+.table>tfoot>tr.info>td,
+.table>thead>tr.info>th,
+.table>tbody>tr.info>th,
+.table>tfoot>tr.info>th {
background-color: #d9edf7;
- }
- .table-hover > tbody > tr > td.info:hover,
- .table-hover > tbody > tr > th.info:hover,
- .table-hover > tbody > tr.info:hover > td,
- .table-hover > tbody > tr:hover > .info,
- .table-hover > tbody > tr.info:hover > th {
- background-color: #c4e3f3;
- }
- .table > thead > tr > td.warning,
- .table > tbody > tr > td.warning,
- .table > tfoot > tr > td.warning,
- .table > thead > tr > th.warning,
- .table > tbody > tr > th.warning,
- .table > tfoot > tr > th.warning,
- .table > thead > tr.warning > td,
- .table > tbody > tr.warning > td,
- .table > tfoot > tr.warning > td,
- .table > thead > tr.warning > th,
- .table > tbody > tr.warning > th,
- .table > tfoot > tr.warning > th {
+}
+
+.table>thead>tr>td.warning,
+.table>tbody>tr>td.warning,
+.table>tfoot>tr>td.warning,
+.table>thead>tr>th.warning,
+.table>tbody>tr>th.warning,
+.table>tfoot>tr>th.warning,
+.table>thead>tr.warning>td,
+.table>tbody>tr.warning>td,
+.table>tfoot>tr.warning>td,
+.table>thead>tr.warning>th,
+.table>tbody>tr.warning>th,
+.table>tfoot>tr.warning>th {
background-color: #fcf8e3;
- }
- .table-hover > tbody > tr > td.warning:hover,
- .table-hover > tbody > tr > th.warning:hover,
- .table-hover > tbody > tr.warning:hover > td,
- .table-hover > tbody > tr:hover > .warning,
- .table-hover > tbody > tr.warning:hover > th {
- background-color: #faf2cc;
- }
- .table > thead > tr > td.danger,
- .table > tbody > tr > td.danger,
- .table > tfoot > tr > td.danger,
- .table > thead > tr > th.danger,
- .table > tbody > tr > th.danger,
- .table > tfoot > tr > th.danger,
- .table > thead > tr.danger > td,
- .table > tbody > tr.danger > td,
- .table > tfoot > tr.danger > td,
- .table > thead > tr.danger > th,
- .table > tbody > tr.danger > th,
- .table > tfoot > tr.danger > th {
+}
+
+.table>thead>tr>td.danger,
+.table>tbody>tr>td.danger,
+.table>tfoot>tr>td.danger,
+.table>thead>tr>th.danger,
+.table>tbody>tr>th.danger,
+.table>tfoot>tr>th.danger,
+.table>thead>tr.danger>td,
+.table>tbody>tr.danger>td,
+.table>tfoot>tr.danger>td,
+.table>thead>tr.danger>th,
+.table>tbody>tr.danger>th,
+.table>tfoot>tr.danger>th {
background-color: #f2dede;
- }
- .table-hover > tbody > tr > td.danger:hover,
- .table-hover > tbody > tr > th.danger:hover,
- .table-hover > tbody > tr.danger:hover > td,
- .table-hover > tbody > tr:hover > .danger,
- .table-hover > tbody > tr.danger:hover > th {
- background-color: #ebcccc;
- }
- .table-responsive {
- overflow-x: auto;
- min-height: 0.01%;
- }
- @media screen and (max-width: 767px) {
- .table-responsive {
- width: 100%;
- margin-bottom: 15px;
- overflow-y: hidden;
- -ms-overflow-style: -ms-autohiding-scrollbar;
- border: 1px solid #dddddd;
- }
- .table-responsive > .table {
- margin-bottom: 0;
- }
- .table-responsive > .table > thead > tr > th,
- .table-responsive > .table > tbody > tr > th,
- .table-responsive > .table > tfoot > tr > th,
- .table-responsive > .table > thead > tr > td,
- .table-responsive > .table > tbody > tr > td,
- .table-responsive > .table > tfoot > tr > td {
- white-space: nowrap;
- }
- .table-responsive > .table-bordered {
- border: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:first-child,
- .table-responsive > .table-bordered > tbody > tr > th:first-child,
- .table-responsive > .table-bordered > tfoot > tr > th:first-child,
- .table-responsive > .table-bordered > thead > tr > td:first-child,
- .table-responsive > .table-bordered > tbody > tr > td:first-child,
- .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:last-child,
- .table-responsive > .table-bordered > tbody > tr > th:last-child,
- .table-responsive > .table-bordered > tfoot > tr > th:last-child,
- .table-responsive > .table-bordered > thead > tr > td:last-child,
- .table-responsive > .table-bordered > tbody > tr > td:last-child,
- .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
- }
- .table-responsive > .table-bordered > tbody > tr:last-child > th,
- .table-responsive > .table-bordered > tfoot > tr:last-child > th,
- .table-responsive > .table-bordered > tbody > tr:last-child > td,
- .table-responsive > .table-bordered > tfoot > tr:last-child > td {
- border-bottom: 0;
- }
- }
- .clearfix:before,
- .clearfix:after,
- .dl-horizontal dd:before,
- .dl-horizontal dd:after,
- .container:before,
- .container:after,
- .container-fluid:before,
- .container-fluid:after,
- .row:before,
- .row:after {
+}
+
+.clearfix:before,
+.clearfix:after,
+.dl-horizontal dd:before,
+.dl-horizontal dd:after,
+.container:before,
+.container:after,
+.container-fluid:before,
+.container-fluid:after,
+.row:before,
+.row:after {
content: " ";
display: table;
- }
- .clearfix:after,
- .dl-horizontal dd:after,
- .container:after,
- .container-fluid:after,
- .row:after {
+}
+
+.clearfix:after,
+.dl-horizontal dd:after,
+.container:after,
+.container-fluid:after,
+.row:after {
clear: both;
- }
- .center-block {
+}
+
+.center-block {
display: block;
margin-left: auto;
margin-right: auto;
- }
- .pull-right {
+}
+
+.pull-right {
float: right !important;
- }
- .pull-left {
+}
+
+.pull-left {
float: left !important;
- }
- .hide {
+}
+
+.hide {
display: none !important;
- }
- .show {
+}
+
+.show {
display: block !important;
- }
- .invisible {
+}
+
+.invisible {
visibility: hidden;
- }
- .text-hide {
+}
+
+.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
- }
- .hidden {
+}
+
+.hidden {
display: none !important;
- }
- .affix {
+}
+
+.affix {
position: fixed;
- }
- @-ms-viewport {
- width: device-width;
- }
- .visible-xs,
- .visible-sm,
- .visible-md,
- .visible-lg {
- display: none !important;
- }
- .visible-xs-block,
- .visible-xs-inline,
- .visible-xs-inline-block,
- .visible-sm-block,
- .visible-sm-inline,
- .visible-sm-inline-block,
- .visible-md-block,
- .visible-md-inline,
- .visible-md-inline-block,
- .visible-lg-block,
- .visible-lg-inline,
- .visible-lg-inline-block {
- display: none !important;
- }
- @media (max-width: 767px) {
- .visible-xs {
- display: block !important;
- }
- table.visible-xs {
- display: table !important;
- }
- tr.visible-xs {
- display: table-row !important;
- }
- th.visible-xs,
- td.visible-xs {
- display: table-cell !important;
- }
- }
- @media (max-width: 767px) {
- .visible-xs-block {
- display: block !important;
- }
- }
- @media (max-width: 767px) {
- .visible-xs-inline {
- display: inline !important;
- }
- }
- @media (max-width: 767px) {
- .visible-xs-inline-block {
- display: inline-block !important;
- }
- }
- @media (min-width: 768px) and (max-width: 991px) {
- .visible-sm {
- display: block !important;
- }
- table.visible-sm {
- display: table !important;
- }
- tr.visible-sm {
- display: table-row !important;
- }
- th.visible-sm,
- td.visible-sm {
- display: table-cell !important;
- }
- }
- @media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-block {
- display: block !important;
- }
- }
- @media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline {
- display: inline !important;
- }
- }
- @media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline-block {
- display: inline-block !important;
- }
- }
- @media (min-width: 992px) and (max-width: 1199px) {
- .visible-md {
- display: block !important;
- }
- table.visible-md {
- display: table !important;
- }
- tr.visible-md {
- display: table-row !important;
- }
- th.visible-md,
- td.visible-md {
- display: table-cell !important;
- }
- }
- @media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-block {
- display: block !important;
- }
- }
- @media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline {
- display: inline !important;
- }
- }
- @media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline-block {
- display: inline-block !important;
- }
- }
- @media (min-width: 1200px) {
- .visible-lg {
- display: block !important;
- }
- table.visible-lg {
- display: table !important;
- }
- tr.visible-lg {
- display: table-row !important;
- }
- th.visible-lg,
- td.visible-lg {
- display: table-cell !important;
- }
- }
- @media (min-width: 1200px) {
- .visible-lg-block {
- display: block !important;
- }
- }
- @media (min-width: 1200px) {
- .visible-lg-inline {
- display: inline !important;
- }
- }
- @media (min-width: 1200px) {
- .visible-lg-inline-block {
- display: inline-block !important;
- }
- }
- @media (max-width: 767px) {
- .hidden-xs {
- display: none !important;
- }
- }
- @media (min-width: 768px) and (max-width: 991px) {
- .hidden-sm {
- display: none !important;
- }
- }
- @media (min-width: 992px) and (max-width: 1199px) {
- .hidden-md {
- display: none !important;
- }
- }
- @media (min-width: 1200px) {
- .hidden-lg {
- display: none !important;
- }
- }
- .visible-print {
- display: none !important;
- }
- @media print {
- .visible-print {
- display: block !important;
- }
- table.visible-print {
- display: table !important;
- }
- tr.visible-print {
- display: table-row !important;
- }
- th.visible-print,
- td.visible-print {
- display: table-cell !important;
- }
- }
- .visible-print-block {
- display: none !important;
- }
- @media print {
- .visible-print-block {
- display: block !important;
- }
- }
- .visible-print-inline {
- display: none !important;
- }
- @media print {
- .visible-print-inline {
- display: inline !important;
- }
- }
- .visible-print-inline-block {
- display: none !important;
- }
- @media print {
- .visible-print-inline-block {
- display: inline-block !important;
- }
- }
- @media print {
- .hidden-print {
- display: none !important;
- }
- }
+}
diff --git a/templates/base/settings.php b/templates/base/settings.php
index 8aca259a6..6762ee1de 100644
--- a/templates/base/settings.php
+++ b/templates/base/settings.php
@@ -5,11 +5,11 @@ return [
'dimension' => 'A4',
'font-size' => '11pt',
'margins' => [
- 'top' => 9,
- 'bottom' => 9,
+ 'top' => 10,
+ 'bottom' => 10,
'left' => 12,
'right' => 12,
],
- 'header-height' => 40,
+ 'header-height' => 30,
'footer-height' => 5,
];
diff --git a/templates/base/style.css b/templates/base/style.css
index 4b8a50acd..53d3d5d6b 100644
--- a/templates/base/style.css
+++ b/templates/base/style.css
@@ -78,15 +78,24 @@ table.table-striped tbody tr:nth-child(2n+1) td {
padding: 4px;
}
+#contents{
+ border: 1px solid #aaa;
+}
+
#contents td {
padding: 4px;
white-space: normal;
+ border-left: 1px solid #aaa;
+ border-right: 1px solid #aaa;
}
-#contents th {
- border-bottom: 1px solid #aaa;
- border-right: 1px solid #aaa;
+#contents th,
+table.border-full th {
background: #ddd;
- padding: 3px;
- font-size: 90%;
+ padding: 4px;
+ font-size: 80%;
+ border: 1px solid #aaa;
+}
+table.border-full th {
+ font-size: 70%;
}
diff --git a/templates/ddt/body.php b/templates/ddt/body.php
new file mode 100644
index 000000000..be537676f
--- /dev/null
+++ b/templates/ddt/body.php
@@ -0,0 +1,135 @@
+ 0,
+ 'words' => 70,
+ 'rows' => 16,
+ 'additional' => 15,
+ 'columns' => $mostra_prezzi ? 6 : 2,
+];
+
+$v_iva = [];
+$v_totale = [];
+
+$totale_ddt = 0.00;
+$totale_imponibile = 0.00;
+$totale_iva = 0.00;
+$sconto = 0.00;
+$sconto_generico = 0.00;
+
+// Intestazione tabella per righe
+echo "
+
+
+
+ ".strtoupper(tr('Descrizione'))." |
+ ".strtoupper(tr('Q.TÀ')).' | ';
+
+if ($mostra_prezzi) {
+ echo "
+ ".strtoupper(tr('Prezzo u.'))." |
+ ".strtoupper(tr('Importo'))." |
+ ".strtoupper(tr('Sconto'))." |
+ ".strtoupper(tr('IVA')).' (%) | ';
+}
+
+ echo '
+
+
+
+ ';
+
+// Righe
+$rs_gen = $dbo->fetchArray("SELECT *, (SELECT percentuale FROM co_iva WHERE id=idiva) AS perc_iva FROM `dt_righe_ddt` WHERE idddt='$idddt'");
+$imponibile_gen = 0.0;
+$iva_gen = 0.0;
+
+foreach ($rs_gen as $r) {
+ $autofill['count'] += ceil(strlen($r['descrizione']) / $autofill['words']);
+ $autofill['count'] += substr_count($r['descrizione'], PHP_EOL);
+
+ $descrizione = $r['descrizione'];
+ $qta = $r['qta'];
+ $subtot = $r['subtotale'] / $r['qta'];
+ $subtotale = $r['subtotale'];
+ $sconto = $r['sconto'];
+ $iva = $r['iva'];
+
+ if (str_contains($r['descrizione'], 'SCONTO')) {
+ $sconto_generico = $r['subtotale'];
+ $iva_gen += $r['iva'];
+ } else {
+ echo '
+
+
+ '.nl2br($descrizione);
+
+ // Aggiunta riferimento a ordine
+ if (!empty($r['idordine'])) {
+ $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id='.prepare($r['idordine']));
+ $numero = !empty($rso[0]['numero_esterno']) ? $rso[0]['numero_esterno'] : $rso[0]['numero'];
+ echo '
+ '.strtoupper(str_replace(['_NUM_', '_DATE_'], [$numero, Translator::dateToLocale($rso[0]['data'])], tr('Rif. ordine no_NUM_ del _DATE_'))).'';
+ $autofill['count'] += 0.4;
+ }
+
+ echo '
+ | ';
+
+ echo "
+
+ ".Translator::numberToLocale($qta, 2).'
+ | ';
+
+ if ($mostra_prezzi) {
+ echo "
+
+ ".Translator::numberToLocale($subtot, 2).' €
+ | ';
+
+ // Imponibile
+ echo "
+
+ ".Translator::numberToLocale($subtotale, 2).' €
+ | ';
+
+ // Sconto
+ echo "
+
+ ".Translator::numberToLocale($r['sconto_unitario'], 2).($r['tipo_sconto'] == 'PRC' ? '%' : ' €').'
+ | ';
+
+ // Iva
+ echo "
+ ";
+
+ if ($r['perc_iva'] > 0) {
+ echo '
+ '.$r['perc_iva'];
+ }
+
+ echo '
+ | ';
+ }
+ echo '
+
';
+
+ $imponibile_gen += $subtotale;
+ $iva_gen += $iva;
+ $sconto += $sconto;
+ }
+}
+
+echo '
+ |autofill|
+
+
';
+
+// Info per il footer
+$imponibile_ddt = $imponibile_gen;
+$totale_iva = $iva_gen;
+$totale_ddt = $imponibile_gen;
diff --git a/templates/ddt/ddt.html b/templates/ddt/ddt.html
deleted file mode 100644
index 692366efb..000000000
--- a/templates/ddt/ddt.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- $body$
-
diff --git a/templates/ddt/ddt_body.html b/templates/ddt/ddt_body.html
deleted file mode 100644
index cefe291ed..000000000
--- a/templates/ddt/ddt_body.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
- |
-
- $f_ragionesociale$
- $f_indirizzo$
- $f_citta$
- $f_piva$
- $f_codicefiscale$
- $f_capsoc$
- $f_telefono$
- $f_sitoweb$
- $f_email$
- |
-
-
-
-
-
-
- CLIENTE
-
- $c_ragionesociale$
- $c_indirizzo$
- $c_citta$
- $c_piva$
- $c_codicefiscale$
-
- |
-
-
- DESTINAZIONE
-
- $c_destinazione$
-
- |
-
-
-
-
diff --git a/templates/ddt/footer.php b/templates/ddt/footer.php
new file mode 100644
index 000000000..16903d6d9
--- /dev/null
+++ b/templates/ddt/footer.php
@@ -0,0 +1,151 @@
+';
+
+if ($mostra_prezzi) {
+ // Riga 1
+ echo "
+
+
+ ".strtoupper(tr('Note')).'
+ '.nl2br($rs[0]['note'])."
+ |
+
+ ".strtoupper(tr('Totale imponibile')).'
+ |
+
';
+
+ // Dati riga 1
+ echo "
+
+
+ ".Translator::numberToLocale($imponibile_ddt, 2).' €
+ |
+
';
+
+ // Riga 2
+ echo "
+
+
+ ".strtoupper(tr('Totale imposte'))."
+ |
+
+
+
+
+ ".Translator::numberToLocale($totale_iva, 2).' €
+ |
+
';
+
+ // Riga 3
+ echo "
+
+
+ ".strtoupper(tr('Totale documento'))."
+ |
+
+
+
+
+ ".Translator::numberToLocale($totale_ddt, 2).' €
+ |
+
';
+} else {
+ // Riga 1
+ echo "
+
+
+ ".strtoupper(tr('Note')).'
+ '.nl2br($rs[0]['note']).'
+ |
+
';
+}
+
+echo '
+';
+
+echo '
+
+
+
+ '.strtoupper(tr('Aspetto beni')).'
+ |
+
+
+ '.strtoupper(tr('Causale trasporto')).'
+ |
+
+
+ '.strtoupper(tr('Porto')).'
+ |
+
+
+
+
+ $aspettobeni$
+ |
+
+ $causalet$
+ |
+
+ $porto$
+ |
+
+
+
+
+ '.strtoupper(tr('No colli')).'
+ |
+
+
+ '.strtoupper(tr('Tipo di spedizione')).'
+ |
+
+
+ '.strtoupper(tr('Vettore')).'
+ |
+
+
+
+
+ $n_colli$
+ |
+
+ $spedizione$
+ |
+
+ $vettore$
+ |
+
+
+
+
+ '.strtoupper(tr('Firma conducente')).'
+ |
+
+
+ '.strtoupper(tr('Firma vettore')).'
+ |
+
+
+ '.strtoupper(tr('Firma destinatario')).'
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
';
+
+echo '
+$pagination$';
diff --git a/templates/ddt/header.php b/templates/ddt/header.php
new file mode 100644
index 000000000..5d3e3081e
--- /dev/null
+++ b/templates/ddt/header.php
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
$f_ragionesociale$
+
$f_indirizzo$ $f_citta$
+
$f_piva$
+
$f_codicefiscale$
+
$f_capsoc$
+
$f_telefono$
+
+
+
+
+
+
+
+
+
+ $tipo_doc$
+
+
+
+
+
+ '.strtoupper(tr('Nr. documento')).'
+ $numero_doc$
+ |
+
+
+ '.strtoupper(tr('Data documento')).'
+ $data$
+ |
+
+
+ '.strtoupper(tr('Cliente')).'
+ $c_codice$
+ |
+
+
+ '.strtoupper(tr('Foglio')).'
+ {PAGENO}/{nb}
+ |
+
+
+
+
+ '.strtoupper(tr('Partita IVA')).'
+ $c_piva$
+ |
+
+ '.strtoupper(tr('Codice fiscale')).'
+ $c_codicefiscale$
+ |
+
+
+
+
+ '.strtoupper(tr('Pagamento')).'
+ $pagamento$
+ |
+
+
+
+
+
+
+
+
+ '.strtoupper(tr('Spett.le')).'
+ $c_ragionesociale$
+ $c_indirizzo$ $c_citta$
+ |
+
+
+
+
+ '.strtoupper(tr('Destinazione diversa')).'
+ $c_destinazione$
+ |
+
+
+
+
';
diff --git a/templates/ddt/init.php b/templates/ddt/init.php
new file mode 100644
index 000000000..2468feb0b
--- /dev/null
+++ b/templates/ddt/init.php
@@ -0,0 +1,63 @@
+fetchArray($q);
+
+$module_name = ($rs[0]['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
+
+$idcliente = $rs[0]['idanagrafica'];
+$idsede = $rs[0]['idsede'];
+
+$numero = !empty($rs[0]['numero_esterno']) ? $rs[0]['numero_esterno'] : $rs[0]['numero'];
+
+if (empty($rs[0]['numero_esterno'])) {
+ $numero = 'pro-forma '.$numero;
+ $tipo_doc = 'DDT PRO-FORMA';
+}
+
+// Leggo i dati della destinazione (se 0=sede legale, se!=altra sede da leggere da tabella an_sedi)
+$destinazione = '';
+if (!empty($rs[0]['idsede'])) {
+ $rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale FROM an_sedi WHERE idanagrafica='.prepare($id_cliente).' AND id='.prepare($rs[0]['idsede']));
+
+ if (!empty($rsd[0]['indirizzo'])) {
+ $destinazione .= $rsd[0]['indirizzo'].'
';
+ }
+ if (!empty($rsd[0]['indirizzo2'])) {
+ $destinazione .= $rsd[0]['indirizzo2'].'
';
+ }
+ if (!empty($rsd[0]['cap'])) {
+ $destinazione .= $rsd[0]['cap'].' ';
+ }
+ if (!empty($rsd[0]['citta'])) {
+ $destinazione .= $rsd[0]['citta'];
+ }
+ if (!empty($rsd[0]['provincia'])) {
+ $destinazione .= ' ('.$rsd[0]['provincia'].')';
+ }
+}
+
+// Sostituzioni specifiche
+$replaces = [
+ 'tipo_doc' => strtoupper($tipo_doc),
+ 'numero_doc' => $numero,
+ 'data' => Translator::numberToLocale($rs[0]['data']),
+ 'pagamento' => $rs[0]['tipo_pagamento'],
+ 'c_destinazione' => $destinazione,
+ 'aspettobeni' => $rs[0]['aspettobeni'],
+ 'causalet' => $rs[0]['causalet'],
+ 'porto' => $rs[0]['porto'],
+ 'n_colli' => !empty($rs[0]['n_colli']) ? $rs[0]['n_colli'] : '',
+ 'spedizione' => $rs[0]['spedizione'],
+ 'vettore' => $rs[0]['vettore'],
+];
+
+// Controllo sui permessi
+if ($id_cliente != Auth::user()['idanagrafica'] && !Auth::admin()) {
+ die(tr('Non hai i permessi per questa stampa!'));
+}
+
+$mostra_prezzi = get_var("Stampa i prezzi sui ddt");
diff --git a/templates/ddt/pdfgen.ddt.php b/templates/ddt/pdfgen.ddt.php
deleted file mode 100644
index 1276be5e9..000000000
--- a/templates/ddt/pdfgen.ddt.php
+++ /dev/null
@@ -1,401 +0,0 @@
-fetchArray($q);
-$numero_ddt = $rs[0]['numero'];
-$idcliente = $rs[0]['idanagrafica'];
-(!empty($rs[0]['numero_esterno'])) ? $numero = $rs[0]['numero_esterno'] : $numero = $rs[0]['numero'];
-
-// Lettura righe ddt
-$q2 = "SELECT * FROM dt_righe_ddt WHERE idddt='$idddt'";
-$righe = $dbo->fetchArray($q2);
-
-// carica report html
-$report = file_get_contents(__DIR__.'/ddt.html');
-$body = file_get_contents(__DIR__.'/ddt_body.html');
-
-include_once $docroot.'/templates/pdfgen_variables.php';
-
-// Leggo i dati della destinazione (se 0=sede legale, se!=altra sede da leggere da tabella an_sedi)
-$destinazione = '';
-if ($rs[0]['idsede'] == 0) {
- $queryd = "SELECT ragione_sociale, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale FROM an_anagrafiche WHERE idanagrafica='".$idcliente."'";
- $rsd = $dbo->fetchArray($queryd);
-
- if ($rsd[0]['ragione_sociale'] != '') {
- $destinazione .= $rsd[0]['ragione_sociale']."
\n";
- }
- if ($rsd[0]['indirizzo'] != '') {
- $destinazione .= $rsd[0]['indirizzo']."
\n";
- }
- if ($rsd[0]['indirizzo2'] != '') {
- $destinazione .= $rsd[0]['indirizzo2']."
\n";
- }
- if ($rsd[0]['cap'] != '') {
- $destinazione .= $rsd[0]['cap'].' ';
- }
- if ($rsd[0]['citta'] != '') {
- $destinazione .= $rsd[0]['citta'];
- }
- if ($rsd[0]['provincia'] != '') {
- $destinazione .= ' ('.$rsd[0]['provincia'].")
\n";
- }
- if ($rsd[0]['piva'] != '') {
- $destinazione .= 'P.IVA: '.$rsd[0]['piva']."
\n";
- }
- if ($rsd[0]['codice_fiscale'] != '') {
- $destinazione .= 'C.F.: '.$rsd[0]['codice_fiscale']."
\n";
- }
-} else {
- $queryd = "SELECT (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale FROM an_sedi WHERE idanagrafica='".$idcliente."' AND id='".$rs[0]['idsede']."'";
- $rsd = $dbo->fetchArray($queryd);
-
- if ($rsd[0]['ragione_sociale'] != '') {
- $destinazione .= $rsd[0]['ragione_sociale']."
\n";
- }
- if ($rsd[0]['indirizzo'] != '') {
- $destinazione .= $rsd[0]['indirizzo']."
\n";
- }
- if ($rsd[0]['indirizzo2'] != '') {
- $destinazione .= $rsd[0]['indirizzo2']."
\n";
- }
- if ($rsd[0]['cap'] != '') {
- $destinazione .= $rsd[0]['cap'].' ';
- }
- if ($rsd[0]['citta'] != '') {
- $destinazione .= $rsd[0]['citta'];
- }
- if ($rsd[0]['provincia'] != '') {
- $destinazione .= ' ('.$rsd[0]['provincia'].")
\n";
- }
- if ($rsd[0]['piva'] != '') {
- $destinazione .= 'P.IVA: '.$rsd[0]['piva']."
\n";
- }
- if ($rsd[0]['codice_fiscale'] != '') {
- $destinazione .= 'C.F.: '.$rsd[0]['codice_fiscale']."
\n";
- }
-}
-$body = str_replace('$c_destinazione$', $destinazione, $body);
-
-// Dati generici ddt
-$body .= "
\n";
-$body .= "".$rs[0]['tipo_doc']." no $numero | \n";
-$body .= "Data: ".Translator::dateToLocale($rs[0]['data'])." | \n";
-$body .= "Pagamento: ".$rs[0]['tipo_pagamento']." |
\n";
-$body .= "
\n";
-
-// Intestazione tabella per righe
-$body .= "
\n";
-$body .= "\n";
-$body .= "\n";
-$body .= "Descrizione | \n";
-$body .= "Q.tà | \n";
-$body .= "u.m. | \n";
-$body .= "Costo unitario | \n";
-$body .= "Iva | \n";
-$body .= "Imponibile |
\n";
-$body .= "\n";
-
-$body .= "\n";
-
-// Mostro le righe del ddt
-$totale_ddt = 0.00;
-$totale_imponibile = 0.00;
-$totale_iva = 0.00;
-$sconto = 0.00;
-
-/*
- Articoli
-*/
-$q_art = "SELECT *, CONCAT_WS(serial, 'SN: ', ', ') AS codice, SUM(qta) AS sumqta FROM `dt_righe_ddt` JOIN mg_prodotti ON dt_righe_ddt.idarticolo = mg_prodotti.id_articolo GROUP BY idarticolo, idddt, lotto HAVING idddt='$idddt' AND NOT idarticolo='0' ORDER BY idarticolo ASC";
-$rs_art = $dbo->fetchArray($q_art);
-$tot_art = sizeof($rs_art);
-$imponibile_art = 0.0;
-$iva_art = 0.0;
-
-if ($tot_art > 0) {
- for ($i = 0; $i < $tot_art; ++$i) {
- $body .= "\n";
- $body .= nl2br($rs_art[$i]['descrizione']);
- if ($rs_art[$i]['codice'] != '') {
- $body .= ' '.$rs_art[$i]['codice']."\n";
- }
-
- // Aggiunta riferimento a ordine
- if (!empty($rs_art[$i]['idordine'])) {
- $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id="'.$rs_art[$i]['idordine'].'"');
- ($rso[0]['numero_esterno'] != '') ? $numero = $rso[0]['numero_esterno'] : $numero = $rso[0]['numero'];
- $body .= ' Rif. ordine no'.$numero.' del '.Translator::dateToLocale($rso[0]['data']).'';
- }
-
- $body .= " | \n";
-
- $body .= "\n";
- $body .= Translator::numberToLocale($rs_art[$i]['sumqta'], 2)."\n";
- $body .= " | \n";
-
- $body .= "\n";
- $body .= $rs_art[$i]['um']."\n";
- $body .= " | \n";
-
- $body .= "\n";
- if ($show_costi) {
- $body .= Translator::numberToLocale($rs_art[$i]['subtotale'], 2)." €\n";
- } else {
- $body .= '-';
- }
- $body .= " | \n";
-
- // Iva
- $body .= "\n";
- $iva = $rs_art[$i]['iva'];
- if ($show_costi) {
- $body .= Translator::numberToLocale($iva, 2)." €\n";
- } else {
- $body .= '-';
- }
- $body .= " | \n";
-
- // Imponibile
- $body .= "\n";
- if ($show_costi) {
- $body .= Translator::numberToLocale($rs_art[$i]['subtotale'], 2)." €\n";
-
- if ($rs_art[$i]['sconto'] > 0) {
- $body .= " \n- sconto ".Translator::numberToLocale($rs_art[$i]['sconto'], 2)." €\n";
- }
- } else {
- $body .= '-';
- }
- $body .= " |
\n";
-
- $imponibile_art += $rs_art[$i]['subtotale'];
- $iva_art += $iva;
- $sconto += $rs_art[$i]['sconto'];
- }
- $imponibile_ddt += $imponibile_art;
- $totale_iva += $iva_art;
- $totale_ddt += $imponibile_art;
-}
-
-/*
- Righe generiche
-*/
-$q_gen = "SELECT * FROM `dt_righe_ddt` WHERE idddt='$idddt' AND idarticolo=0";
-$rs_gen = $dbo->fetchArray($q_gen);
-$tot_gen = sizeof($rs_gen);
-$imponibile_gen = 0.0;
-$iva_gen = 0.0;
-
-if ($tot_gen > 0) {
- for ($i = 0; $i < $tot_gen; ++$i) {
- $body .= "\n";
- $body .= nl2br($rs_gen[$i]['descrizione']);
-
- // Aggiunta riferimento a ordine
- if (!empty($rs_gen[$i]['idordine'])) {
- $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id="'.$rs_gen[$i]['idordine'].'"');
- ($rso[0]['numero_esterno'] != '') ? $numero = $rso[0]['numero_esterno'] : $numero = $rso[0]['numero'];
- $body .= ' Rif. ordine no'.$numero.' del '.Translator::dateToLocale($rso[0]['data']).'';
- }
- $body .= " | \n";
-
- $body .= "\n";
- $body .= Translator::numberToLocale($rs_gen[$i]['qta'], 2)."\n";
- $body .= " | \n";
-
- $body .= "\n";
- $body .= $rs_gen[$i]['um']."\n";
- $body .= " | \n";
-
- $body .= "\n";
- if ($show_costi) {
- $body .= Translator::numberToLocale($rs_gen[$i]['subtotale'] / $rs_gen[$i]['qta'], 2)." €\n";
- } else {
- $body .= '-';
- }
- $body .= " | \n";
-
- // Iva
- $body .= "\n";
- $iva = $rs_gen[$i]['iva'];
- if ($show_costi) {
- $body .= Translator::numberToLocale($iva, 2)." €\n";
- } else {
- $body .= '-';
- }
- $body .= " | \n";
-
- // Imponibile
- $body .= "\n";
- if ($show_costi) {
- $body .= Translator::numberToLocale($rs_gen[$i]['subtotale'], 2)." €\n";
-
- if ($rs_gen[$i]['sconto'] > 0) {
- $body .= " \n- sconto ".Translator::numberToLocale($rs_gen[$i]['sconto'], 2)." €\n";
- }
- } else {
- $body .= '-';
- }
- $body .= " |
\n";
-
- $imponibile_gen += $rs_gen[$i]['subtotale'];
- $iva_gen += $iva;
- $sconto += $rs_gen[$i]['sconto'];
- }
- $imponibile_ddt += $imponibile_gen;
- $totale_iva += $iva_gen;
- $totale_ddt += $imponibile_gen;
-}
-
-// Totale imponibile
-if ($show_costi) {
- $body .= "\n";
- $body .= 'Totale imponibile:';
- $body .= " | \n";
-
- $body .= "\n";
- $body .= ''.Translator::numberToLocale($imponibile_ddt, 2)." €\n";
- $body .= " |
\n";
-
- // Mostra sconto se c'è
- if (abs($sconto) > 0) {
- $body .= "\n";
- $body .= 'Sconto:';
- $body .= " | \n";
-
- // Sconto
- $body .= "\n";
- $body .= Translator::numberToLocale($sconto, 2).' €';
- $body .= ' | ';
- $body .= "
\n";
-
- // Totale scontato
- $body .= "\n";
- $body .= 'Totale scontato:';
- $body .= " | \n";
-
- // Sconto
- $body .= "\n";
- $totale_ddt -= $sconto;
- $body .= Translator::numberToLocale($totale_ddt, 2).' €';
- $body .= " |
\n";
- }
-
- // Mostra INPS se c'è
- if (abs($rs[0]['rivalsainps']) > 0) {
- $body .= "\n";
- $body .= 'Rivalsa INPS:';
- $body .= " | \n";
-
- // Rivalsa INPS
- $body .= "\n";
- $body .= Translator::numberToLocale($rs[0]['rivalsainps'], 2).' €';
- $body .= " |
\n";
- $totale_ddt += $rs[0]['rivalsainps'];
- }
-
- // Mostra iva se c'è
- $totale_iva += $rs[0]['iva_rivalsainps'];
- if (abs($totale_iva) > 0) {
- $body .= "\n";
- $body .= 'Iva:';
- $body .= " | \n";
-
- // Iva
- $body .= "\n";
- $body .= Translator::numberToLocale($totale_iva, 2)." €\n";
- $body .= " |
\n";
- $totale_ddt += $totale_iva;
- }
-
- /*
- Totale ddt
- */
- $body .= "\n";
- $body .= 'Totale ddt:';
- $body .= " | \n";
-
- $body .= "\n";
- $body .= ''.Translator::numberToLocale($totale_ddt, 2)." €\n";
- $body .= " |
\n";
- $netto_a_pagare = $totale_ddt;
-
- // Mostra marca da bollo se c'è
- if (abs($rs[0]['bollo']) > 0) {
- $body .= "\n";
- $body .= 'Marca da bollo:';
- $body .= " | \n";
-
- // Marca da bollo
- $body .= "\n";
- $marca_da_bollo = str_replace(',', '.', $rs[0]['bollo']);
- $body .= Translator::numberToLocale($marca_da_bollo, 2).' €';
- $body .= " |
\n";
- $netto_a_pagare += $marca_da_bollo;
- }
-
- // Mostra ritenuta d'acconto se c'è
- if (abs($rs[0]['ritenutaacconto']) > 0) {
- $body .= "\n";
- $body .= "Ritenuta d'acconto:";
- $body .= " | \n";
-
- // Ritenuta d'acconto
- $body .= "\n";
- $body .= Translator::numberToLocale($rs[0]['ritenutaacconto'], 2).' €';
- $body .= " |
\n";
- $netto_a_pagare -= $rs[0]['ritenutaacconto'];
- }
-
- /*
- Netto a pagare (se diverso dal totale)
- */
- if ($totale_ddt != $netto_a_pagare) {
- $body .= "\n";
- $body .= 'Netto a pagare:';
- $body .= " | \n";
-
- $body .= "\n";
- $body .= ''.Translator::numberToLocale($netto_a_pagare, 2)." €\n";
- $body .= " |
\n";
- }
-}
-$body .= "\n";
-$body .= "
\n";
-
-// Note
-$body .= '
'.nl2br($rs[0]['note'])."
\n";
-
-if ($rs[0]['vettore'] != '') {
- $vettore = ' ('.$rs[0]['vettore'].')';
-} else {
- $vettore = '';
-}
-
-// Dati footer ddt
-$footer = "
\n";
-$footer .= "\n";
-$footer .= "Colli: ".$rs[0]['n_colli']." | \n";
-$footer .= "Aspetto beni: ".$rs[0]['aspettobeni']." | \n";
-$footer .= "Causale trasporto: ".$rs[0]['causalet']." | \n";
-$footer .= "Porto: ".$rs[0]['porto']." |
\n";
-$footer .= "
\n";
-
-$footer .= "
\n";
-$footer .= "\n";
-$footer .= "Tipo di spedizione: ".$rs[0]['spedizione'].$vettore." | \n";
-$footer .= "Conducente: ______________________ | \n";
-$footer .= "Destinatario: ______________________ |
\n";
-$footer .= "
\n";
-
-$body = str_replace('|footer|', $footer, $body);
-
-$report_name = 'ddt_'.$numero_ddt.'.pdf';
diff --git a/templates/ddt/settings.php b/templates/ddt/settings.php
new file mode 100644
index 000000000..701304036
--- /dev/null
+++ b/templates/ddt/settings.php
@@ -0,0 +1,6 @@
+ '80',
+ 'footer-height' => '80',
+];
diff --git a/templates/fatture/body.php b/templates/fatture/body.php
index dd75548e8..4d5d02a35 100644
--- a/templates/fatture/body.php
+++ b/templates/fatture/body.php
@@ -4,21 +4,24 @@ include_once __DIR__.'/../../core.php';
$report_name = 'fattura_'.$numero.'.pdf';
-$n_rows = 0;
-$words4row = 70;
+$autofill = [
+ 'count' => 0, // Conteggio delle righe
+ 'words' => 70, // Numero di parolo dopo cui contare una riga nuova
+ 'rows' => 20, // Numero di righe massimo presente nella pagina
+ 'additional' => 15, // Numero di righe massimo da aggiungere
+ 'columns' => 6, // Numero di colonne della tabella
+];
$v_iva = [];
$v_totale = [];
-$totale_documento = 0;
-$totale_iva = 0;
$sconto = 0;
$imponibile = 0;
$iva = 0;
// Intestazione tabella per righe
echo "
-
+
".strtoupper(tr('Descrizione'))." |
@@ -36,69 +39,69 @@ echo "
$righe = $dbo->fetchArray("SELECT *, IFNULL((SELECT codice FROM mg_articoli WHERE id=idarticolo),'') AS codice_articolo, (SELECT percentuale FROM co_iva WHERE id=idiva) AS perc_iva FROM `co_righe_documenti` WHERE iddocumento=".prepare($iddocumento).' ORDER BY `order`');
$tot_righe = sizeof($righe);
-foreach ($righe as $i => $riga) {
- $n_rows += ceil(strlen($riga['descrizione']) / $words4row);
- $n_rows += substr_count($riga['descrizione'], PHP_EOL);
+foreach ($righe as $r) {
+ $autofill['count'] += ceil(strlen($r['descrizione']) / $autofill['words']);
+ $autofill['count'] += substr_count($r['descrizione'], PHP_EOL);
- echo "
+ echo '
-
- ".nl2br($riga['descrizione']);
+ |
+ '.nl2br($r['descrizione']);
- if (!empty($riga['codice_articolo'])) {
+ if (!empty($r['codice_articolo'])) {
echo '
- '.str_replace('_COD_', $riga['codice_articolo'], tr('COD. _COD_')).'';
- $n_rows += 0.4;
+ '.str_replace('_COD_', $r['codice_articolo'], tr('COD. _COD_')).'';
+ $autofill['count'] += 0.4;
}
// Aggiunta riferimento a ordine
- if (!empty($riga['idordine'])) {
- $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id='.prepare($riga['idordine']));
+ if (!empty($r['idordine'])) {
+ $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id='.prepare($r['idordine']));
$numero = !empty($rso[0]['numero_esterno']) ? $rso[0]['numero_esterno'] : $rso[0]['numero'];
echo '
'.str_replace(['_NUM_', '_DATE_'], [$numero, Translator::dateToLocale($rso[0]['data'])], tr('Rif. ordine no_NUM_ del _DATE_')).'';
- $n_rows += 0.4;
+ $autofill['count'] += 0.4;
}
// Aggiunta riferimento a ddt
- elseif (!empty($riga['idddt'])) {
- $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM dt_ddt WHERE id='.prepare($riga['idddt']));
+ elseif (!empty($r['idddt'])) {
+ $rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM dt_ddt WHERE id='.prepare($r['idddt']));
$numero = !empty($rso[0]['numero_esterno']) ? $rso[0]['numero_esterno'] : $rso[0]['numero'];
echo '
'.str_replace(['_NUM_', '_DATE_'], [$numero, Translator::dateToLocale($rso[0]['data'])], tr('Rif. ddt no_NUM_ del _DATE_')).'';
- $n_rows += 0.4;
+ $autofill['count'] += 0.4;
}
echo '
| ';
echo "
-
- ".(empty($riga['qta']) ? '' : Translator::numberToLocale($riga['qta'], 2)).'
+ |
+ ".(empty($r['qta']) ? '' : Translator::numberToLocale($r['qta'], 2)).'
| ';
// Unità di miusura
echo "
-
- ".nl2br(strtoupper($riga['um'])).'
+ |
+ ".nl2br(strtoupper($r['um'])).'
| ';
// Costo unitario
echo "
-
- ".(empty($riga['qta']) || empty($riga['subtotale']) ? '' : Translator::numberToLocale($riga['subtotale'] / $riga['qta'], 2)).' €
+ |
+ ".(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'], 2)).' €
| ';
// Imponibile
echo "
-
- ".(empty($riga['subtotale']) ? '' : Translator::numberToLocale($riga['subtotale'], 2)).' €';
+ |
+ ".(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'], 2)).' €';
- if ($riga['sconto'] > 0) {
- $n_rows += 0.4;
+ if ($r['sconto'] > 0) {
+ $autofill['count'] += 0.4;
echo "
- - sconto ".Translator::numberToLocale($riga['sconto_unitario']).($riga['tipo_sconto'] == 'PRC' ? '%' : ' €').'';
+ - sconto ".Translator::numberToLocale($r['sconto_unitario']).($r['tipo_sconto'] == 'PRC' ? '%' : ' €').'';
}
echo '
@@ -107,26 +110,22 @@ foreach ($righe as $i => $riga) {
// Iva
echo "
| ";
- if (!empty($riga['idiva'])) {
+ if ($r['perc_iva'] > 0) {
echo '
- '.intval($riga['perc_iva']).'%';
+ '.$r['perc_iva'].'%';
}
echo '
|
';
- $imponibile += $riga['subtotale'];
- $iva += $riga['iva'];
- $sconto += $riga['sconto'];
+ $imponibile += $r['subtotale'];
+ $iva += $r['iva'];
+ $sconto += $r['sconto'];
- $v_iva[$riga['desc_iva']] += $riga['iva'];
- $v_totale[$riga['desc_iva']] += $riga['subtotale'] - $riga['sconto'];
+ $v_iva[$r['desc_iva']] += $r['iva'];
+ $v_totale[$r['desc_iva']] += $r['subtotale'] - $r['sconto'];
}
-$imponibile_documento += $imponibile;
-$totale_iva += $iva;
-$totale_documento += $imponibile;
-
// Aggiungo diciture per condizioni iva particolari
if (!empty($v_iva)) {
$elenco = [
@@ -139,12 +138,12 @@ if (!empty($v_iva)) {
// Controllo se è stata applicata questa tipologia di iva
foreach ($elenco as $e => $testo) {
if (in_array($e, $keys)) {
- $n_rows += strlen($testo) / $words4row;
- $n_rows += substr_count($riga['descrizione'], PHP_EOL);
+ $autofill['count'] += strlen($testo) / $autofill['words'];
+ $autofill['count'] += substr_count($r['descrizione'], PHP_EOL);
echo "
-
+ |
".nl2br($testo)."
|
@@ -156,28 +155,19 @@ if (!empty($v_iva)) {
}
}
-// % 20 -> < 19 righe
-for ($i = (floor($n_rows) % 20); $i < 15; ++$i) {
- echo '
-
- |
- |
- |
- |
- |
- |
-
';
-}
echo '
+ |autofill|
';
-$imponibile_documento -= $sconto;
-$totale_documento = $totale_documento - $sconto + $totale_iva;
-
if (!empty($rs[0]['note'])) {
echo '
'.strtoupper(tr('Note')).':
'.$rs[0]['note'].'
';
}
+
+// Info per il footer
+$totale_iva = $iva;
+$imponibile_documento = $imponibile - $sconto;
+$totale_documento = $imponibile - $sconto + $totale_iva;
diff --git a/templates/fatture/settings.php b/templates/fatture/settings.php
index 59bd8dc0e..77c015061 100644
--- a/templates/fatture/settings.php
+++ b/templates/fatture/settings.php
@@ -1,6 +1,6 @@
'90',
- 'footer-height' => '70',
+ 'header-height' => '80',
+ 'footer-height' => '60',
];