diff --git a/assets/css/settings-styles.css b/assets/css/settings-styles.css index 0a0c383d7..c597044f4 100644 --- a/assets/css/settings-styles.css +++ b/assets/css/settings-styles.css @@ -401,6 +401,7 @@ body.woocommerce_page_wpo_wcpdf_options_page { #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > input[type="text"], #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > input[type="url"], +#wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > input[type="email"], #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > select, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > textarea { max-width: none; diff --git a/assets/css/settings-styles.min.css b/assets/css/settings-styles.min.css index 99b701ad9..bfc61b66c 100644 --- a/assets/css/settings-styles.min.css +++ b/assets/css/settings-styles.min.css @@ -1 +1 @@ -span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad,.wcpdf-promo-ad{position:relative;min-height:90px;border:1px solid #6e1edc;background-color:#f1e9fc;padding:15px;padding-left:100px;margin-top:30px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3,.wcpdf-promo-ad h3{margin:0;padding:20px;font-weight:400;font-family:serif;letter-spacing:-1px;font-size:2.25em}.wcpdf-promo-ad p{margin:0;padding:0 20px;font-size:1.15em}.wcpdf-promo-ad p.upgrade-tab{margin-top:30px;font-style:italic;font-size:1em}.wcpdf-promo-ad p.expiration{font-size:.8em;padding-top:8px}.wcpdf-extensions-ad a,.wcpdf-promo-ad a{color:#6e1edc}.wcpdf-extensions-ad a.dismiss,.wcpdf-promo-ad a.dismiss{padding:10px 20px}.wcpdf-promo-ad p strong.code{font-size:1.3em;font-family:serif;padding:.1em .4em;background:#6e1edc;color:#fff;border-radius:5px;font-weight:400}.wcpdf-extensions-ad i{padding-left:20px}.wcpdf-extensions-ad ul,.wcpdf-promo-ad ul{margin:0;margin-left:40px}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{padding-right:1em}table.multiple-text-input td{padding:0}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #c3c4c7;background:#fff}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:last-child{border-color:#c3c4c7}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.wcpdf_advanced_numbers_choose_table{margin-top:20px}.wcpdf_document_settings_document_output_formats{margin-bottom:30px}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fdfdfd}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:0 0!important;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr:not(:last-child)>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description>span.wpo-warning{width:100%;box-sizing:border-box;word-wrap:break-word}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=url],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size],#wpo-wcpdf-preview-wrapper input[type=url][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:grid;grid-template-columns:1fr 2fr;gap:4em}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2{border-bottom:1px solid #c3c4c7;padding:1em 0 1em 5px;margin:0;font-weight:400;color:#222;font-family:sans-serif;font-size:1.3em;letter-spacing:-.01em;position:relative;transition:transform .3s;cursor:pointer}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2~.form-table{border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7;padding:2em;margin-top:-1px;background:#fff;margin-bottom:20px}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2::after{content:'\f347';font-family:dashicons;font-size:16px;color:#82878c;position:absolute;right:5px;top:50%;transform:translateY(-50%);transition:transform .15s}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2:hover:after{color:#222}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2.active::after{transform:translateY(-50%) rotate(180deg)}#wpo-wcpdf-preview-wrapper .my_account_buttons_custom{margin-top:1em}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-settings table#document-link-access-type{margin-top:-15px}#wpo-wcpdf-settings table#document-link-access-type td.option{padding-left:0}#wpo-wcpdf-settings table#document-link-access-type td{padding-top:0;padding-bottom:6px;font-size:12px}#wpo-wcpdf-settings .system-status-table{margin-top:2em}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"].ubl .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-ubl{width:100%;height:100%;overflow-wrap:anywhere;background-color:#222;color:#fff;padding:2em}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02);-webkit-box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff;z-index:99}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}.wcpdf_ubl_settings_sections{margin-bottom:4em}#wpo-wcpdf-preview-wrapper input#due_date_days{text-align:right}#wpo-wcpdf-preview-wrapper input#due_date_days:disabled{background-color:#eaeaea;color:#999}sup.wcpdf_beta{background-color:#51266b;color:#fff;font-size:7pt;padding:1px 2px;border-radius:2px}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{gap:2em}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(2),#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3){float:left;margin-bottom:10px}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after{padding:.5em .8em;font-size:1.2em;line-height:inherit}}@media screen and (max-width:860px){#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:block}}div.upgrade-table-description{padding:0 0 3em 1em}div.upgrade-table-description h1{font-family:serif;letter-spacing:-1px;font-size:3em}div.upgrade-table-description p{font-size:1.1em}#upgrade-table{width:100%;border-collapse:collapse;font-size:1.2em;margin-bottom:3em}#upgrade-table td,#upgrade-table th{padding:.8em 2em;border-bottom:1px solid #ccc;text-align:center}#upgrade-table th{font-weight:400;font-size:1.1em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:200px}#upgrade-table tr:last-child td{border:none}#upgrade-table td.feature-label{text-align:left;padding-left:1em;font-weight:700;width:500px}#upgrade-table td.feature-label span.description{display:inline-block;padding-top:10px;font-size:.8em;line-height:1.4em;font-weight:400;color:#555}#upgrade-table td span.feature-available{display:inline-block;width:24px;height:24px;background-repeat:no-repeat;background-size:cover}#upgrade-table a,div.upgrade-table-description a{color:#6e1edc;white-space:nowrap}#upgrade-table .upgrade-links h4{margin:1em 0 .5em 0}#upgrade-table .upgrade-links p{margin:0;font-style:oblique;font-size:.8em}#plugin-recommendations a.upgrade_button,#upgrade-table .upgrade-links a.upgrade_button{display:inline-block;background:#fff;padding:1em 3em 1em 2em;border-radius:12px;border:1px solid #6e1edc;text-decoration:none;margin:2em 0;position:relative}#plugin-recommendations a.upgrade_button:after,#upgrade-table .upgrade-links a.upgrade_button:after{content:' \2192';display:block;position:absolute;right:1.8em;top:1.1em;transition:.5s}#plugin-recommendations a.upgrade_button:hover:after,#upgrade-table .upgrade-links a.upgrade_button:hover:after{right:1.1em;font-weight:700}#plugin-recommendations a.upgrade_button:focus,#plugin-recommendations a.upgrade_button:hover,#upgrade-table .upgrade-links a.upgrade_button:focus,#upgrade-table .upgrade-links a.upgrade_button:hover{background:#6e1edc;color:#fcfbf7}#plugin-recommendations{border-radius:8px;background-color:#f1e9fc;padding:4em 3em}#plugin-recommendations .card-container{max-width:1100px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:3em;padding:2em 0}#plugin-recommendations .recommendation-card{margin-top:0;border-radius:6px;background-color:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);box-sizing:border-box;font-size:15px;overflow:hidden;transition:.2s}#plugin-recommendations .recommendation-card:nth-child(n+4){display:none}#plugin-recommendations .recommendation-card:hover{scale:1.02}#plugin-recommendations .recommendation-card.currently-installed{opacity:.5}#plugin-recommendations .recommendation-card .card-content{padding:0 4em 3em 2em}#plugin-recommendations .recommendation-card img{width:100%}#plugin-recommendations .recommendation-card h5{text-align:left;font-size:1.4em;line-height:1.3em;font-weight:700;margin:1em 0}#plugin-recommendations .recommendation-card p{text-align:left;padding-bottom:10px}#plugin-recommendations .recommendation-card a.upgrade_button{margin:0}#plugin-recommendations .recommendation-card span.currently-installed{font-size:.7em;color:#fff;background-color:#6e1edc;padding:1em 2em;border-radius:12px;margin:0;display:inline-block}@media screen and (max-width:1100px){#upgrade-table{font-size:1em;line-height:1.2em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:25%;padding:.8em 1em}#upgrade-table td.last,#upgrade-table th.last{width:0;padding:0}#upgrade-table td.feature-label span.description{padding-top:6px}#plugin-recommendations .card-container{grid-gap:2em}}@media screen and (max-width:968px){#plugin-recommendations .card-container{grid-template-columns:repeat(1,1fr);padding-right:40%}}@media screen and (max-width:782px){#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td:has(input[type=checkbox]+input[type=text])>input{display:inline-block}}@media screen and (max-width:767px){#upgrade-table td.feature-label span.description{display:none}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:20%}#upgrade-table td.first{width:40%}#plugin-recommendations .card-container{padding-right:0}}@media screen and (max-width:649px){div.upgrade-table-description{padding-left:.8em}div.upgrade-table-description p{font-size:1em}#upgrade-table{font-size:.8em}#upgrade-table td,#upgrade-table th{padding:.5em .8em!important}#upgrade-table td span.feature-available{width:18px;height:18px}#upgrade-table .upgrade-links a{white-space:normal;padding:.6em .8em;border-radius:6px}#upgrade-table .upgrade-links a:after{display:none}#plugin-recommendations .card-container{justify-content:center}}@media screen and (max-width:782px){input[type=checkbox],input[type=radio]{margin-bottom:.5em}} \ No newline at end of file +span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad,.wcpdf-promo-ad{position:relative;min-height:90px;border:1px solid #6e1edc;background-color:#f1e9fc;padding:15px;padding-left:100px;margin-top:30px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3,.wcpdf-promo-ad h3{margin:0;padding:20px;font-weight:400;font-family:serif;letter-spacing:-1px;font-size:2.25em}.wcpdf-promo-ad p{margin:0;padding:0 20px;font-size:1.15em}.wcpdf-promo-ad p.upgrade-tab{margin-top:30px;font-style:italic;font-size:1em}.wcpdf-promo-ad p.expiration{font-size:.8em;padding-top:8px}.wcpdf-extensions-ad a,.wcpdf-promo-ad a{color:#6e1edc}.wcpdf-extensions-ad a.dismiss,.wcpdf-promo-ad a.dismiss{padding:10px 20px}.wcpdf-promo-ad p strong.code{font-size:1.3em;font-family:serif;padding:.1em .4em;background:#6e1edc;color:#fff;border-radius:5px;font-weight:400}.wcpdf-extensions-ad i{padding-left:20px}.wcpdf-extensions-ad ul,.wcpdf-promo-ad ul{margin:0;margin-left:40px}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{padding-right:1em}table.multiple-text-input td{padding:0}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #c3c4c7;background:#fff}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:last-child{border-color:#c3c4c7}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.wcpdf_advanced_numbers_choose_table{margin-top:20px}.wcpdf_document_settings_document_output_formats{margin-bottom:30px}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fdfdfd}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:0 0!important;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr:not(:last-child)>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description>span.wpo-warning{width:100%;box-sizing:border-box;word-wrap:break-word}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=email],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=url],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size],#wpo-wcpdf-preview-wrapper input[type=url][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:grid;grid-template-columns:1fr 2fr;gap:4em}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2{border-bottom:1px solid #c3c4c7;padding:1em 0 1em 5px;margin:0;font-weight:400;color:#222;font-family:sans-serif;font-size:1.3em;letter-spacing:-.01em;position:relative;transition:transform .3s;cursor:pointer}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2~.form-table{border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7;padding:2em;margin-top:-1px;background:#fff;margin-bottom:20px}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2::after{content:'\f347';font-family:dashicons;font-size:16px;color:#82878c;position:absolute;right:5px;top:50%;transform:translateY(-50%);transition:transform .15s}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2:hover:after{color:#222}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2.active::after{transform:translateY(-50%) rotate(180deg)}#wpo-wcpdf-preview-wrapper .my_account_buttons_custom{margin-top:1em}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-settings table#document-link-access-type{margin-top:-15px}#wpo-wcpdf-settings table#document-link-access-type td.option{padding-left:0}#wpo-wcpdf-settings table#document-link-access-type td{padding-top:0;padding-bottom:6px;font-size:12px}#wpo-wcpdf-settings .system-status-table{margin-top:2em}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"].ubl .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-ubl{width:100%;height:100%;overflow-wrap:anywhere;background-color:#222;color:#fff;padding:2em}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02);-webkit-box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff;z-index:99}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}.wcpdf_ubl_settings_sections{margin-bottom:4em}#wpo-wcpdf-preview-wrapper input#due_date_days{text-align:right}#wpo-wcpdf-preview-wrapper input#due_date_days:disabled{background-color:#eaeaea;color:#999}sup.wcpdf_beta{background-color:#51266b;color:#fff;font-size:7pt;padding:1px 2px;border-radius:2px}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{gap:2em}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(2),#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3){float:left;margin-bottom:10px}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after{padding:.5em .8em;font-size:1.2em;line-height:inherit}}@media screen and (max-width:860px){#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:block}}div.upgrade-table-description{padding:0 0 3em 1em}div.upgrade-table-description h1{font-family:serif;letter-spacing:-1px;font-size:3em}div.upgrade-table-description p{font-size:1.1em}#upgrade-table{width:100%;border-collapse:collapse;font-size:1.2em;margin-bottom:3em}#upgrade-table td,#upgrade-table th{padding:.8em 2em;border-bottom:1px solid #ccc;text-align:center}#upgrade-table th{font-weight:400;font-size:1.1em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:200px}#upgrade-table tr:last-child td{border:none}#upgrade-table td.feature-label{text-align:left;padding-left:1em;font-weight:700;width:500px}#upgrade-table td.feature-label span.description{display:inline-block;padding-top:10px;font-size:.8em;line-height:1.4em;font-weight:400;color:#555}#upgrade-table td span.feature-available{display:inline-block;width:24px;height:24px;background-repeat:no-repeat;background-size:cover}#upgrade-table a,div.upgrade-table-description a{color:#6e1edc;white-space:nowrap}#upgrade-table .upgrade-links h4{margin:1em 0 .5em 0}#upgrade-table .upgrade-links p{margin:0;font-style:oblique;font-size:.8em}#plugin-recommendations a.upgrade_button,#upgrade-table .upgrade-links a.upgrade_button{display:inline-block;background:#fff;padding:1em 3em 1em 2em;border-radius:12px;border:1px solid #6e1edc;text-decoration:none;margin:2em 0;position:relative}#plugin-recommendations a.upgrade_button:after,#upgrade-table .upgrade-links a.upgrade_button:after{content:' \2192';display:block;position:absolute;right:1.8em;top:1.1em;transition:.5s}#plugin-recommendations a.upgrade_button:hover:after,#upgrade-table .upgrade-links a.upgrade_button:hover:after{right:1.1em;font-weight:700}#plugin-recommendations a.upgrade_button:focus,#plugin-recommendations a.upgrade_button:hover,#upgrade-table .upgrade-links a.upgrade_button:focus,#upgrade-table .upgrade-links a.upgrade_button:hover{background:#6e1edc;color:#fcfbf7}#plugin-recommendations{border-radius:8px;background-color:#f1e9fc;padding:4em 3em}#plugin-recommendations .card-container{max-width:1100px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:3em;padding:2em 0}#plugin-recommendations .recommendation-card{margin-top:0;border-radius:6px;background-color:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);box-sizing:border-box;font-size:15px;overflow:hidden;transition:.2s}#plugin-recommendations .recommendation-card:nth-child(n+4){display:none}#plugin-recommendations .recommendation-card:hover{scale:1.02}#plugin-recommendations .recommendation-card.currently-installed{opacity:.5}#plugin-recommendations .recommendation-card .card-content{padding:0 4em 3em 2em}#plugin-recommendations .recommendation-card img{width:100%}#plugin-recommendations .recommendation-card h5{text-align:left;font-size:1.4em;line-height:1.3em;font-weight:700;margin:1em 0}#plugin-recommendations .recommendation-card p{text-align:left;padding-bottom:10px}#plugin-recommendations .recommendation-card a.upgrade_button{margin:0}#plugin-recommendations .recommendation-card span.currently-installed{font-size:.7em;color:#fff;background-color:#6e1edc;padding:1em 2em;border-radius:12px;margin:0;display:inline-block}@media screen and (max-width:1100px){#upgrade-table{font-size:1em;line-height:1.2em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:25%;padding:.8em 1em}#upgrade-table td.last,#upgrade-table th.last{width:0;padding:0}#upgrade-table td.feature-label span.description{padding-top:6px}#plugin-recommendations .card-container{grid-gap:2em}}@media screen and (max-width:968px){#plugin-recommendations .card-container{grid-template-columns:repeat(1,1fr);padding-right:40%}}@media screen and (max-width:782px){#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td:has(input[type=checkbox]+input[type=text])>input{display:inline-block}}@media screen and (max-width:767px){#upgrade-table td.feature-label span.description{display:none}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:20%}#upgrade-table td.first{width:40%}#plugin-recommendations .card-container{padding-right:0}}@media screen and (max-width:649px){div.upgrade-table-description{padding-left:.8em}div.upgrade-table-description p{font-size:1em}#upgrade-table{font-size:.8em}#upgrade-table td,#upgrade-table th{padding:.5em .8em!important}#upgrade-table td span.feature-available{width:18px;height:18px}#upgrade-table .upgrade-links a{white-space:normal;padding:.6em .8em;border-radius:6px}#upgrade-table .upgrade-links a:after{display:none}#plugin-recommendations .card-container{justify-content:center}}@media screen and (max-width:782px){input[type=checkbox],input[type=radio]{margin-bottom:.5em}} \ No newline at end of file diff --git a/includes/Documents/Invoice.php b/includes/Documents/Invoice.php index fed8f690a..f29366859 100644 --- a/includes/Documents/Invoice.php +++ b/includes/Documents/Invoice.php @@ -606,7 +606,12 @@ public function get_ubl_settings_fields( $option_name ) { 'options' => apply_filters( 'wpo_wcpdf_document_ubl_settings_formats', array( 'ubl_2_1' => __( 'UBL 2.1' , 'woocommerce-pdf-invoices-packing-slips' ), ), $this ), - 'description' => $this->get_ubl_format_description(), + 'description' => ! wpo_ips_ubl_is_country_format_extension_active() ? sprintf( + /* translators: %1$s: opening link tag, %2$s: closing link tag */ + __( 'Install extensions to support country-specific e-invoicing formats. See the latest %1$ssupported formats%2$s.', 'woocommerce-pdf-invoices-packing-slips' ), + '', + '' + ) : '', ) ), array( @@ -713,46 +718,6 @@ public function get_settings_categories( string $output_format ): array { return apply_filters( 'wpo_wcpdf_document_settings_categories', $settings_categories[ $output_format ] ?? array(), $output_format, $this ); } - /** - * Get UBL Format setting description - * - * @return string - */ - private function get_ubl_format_description(): string { - $extensions_available = array(); - $ubl_format_description = ''; - - if ( ! class_exists( 'WPO_IPS_XRechnung' ) ) { - $extensions_available['xrechnung'] = array( - 'title' => __( 'EN16931 XRechnung', 'woocommerce-pdf-invoices-packing-slips' ), - 'url' => 'https://github.com/wpovernight/wpo-ips-xrechnung/releases/latest/', - ); - } - - if ( ! empty( $extensions_available ) ) { - $ubl_format_description = __( 'Formats available through extensions', 'woocommerce-pdf-invoices-packing-slips' ) . ':'; - - foreach ( $extensions_available as $extension ) { - $ubl_format_description .= ' ' . esc_html( $extension['title'] ) . ''; - - if ( next( $extensions_available ) ) { - $ubl_format_description .= ','; - } else { - $ubl_format_description .= '
'; - } - } - } - - $ubl_format_description .= sprintf( - /* translators: %1$s: opening link tag, %2$s: closing link tag */ - __( 'If the format you need isn\'t listed, please don\'t hesitate to %1$scontact us%2$s!', 'woocommerce-pdf-invoices-packing-slips' ), - '', - '' - ); - - return $ubl_format_description; - } - } endif; // class_exists diff --git a/includes/Documents/OrderDocument.php b/includes/Documents/OrderDocument.php index 8a339b574..c4400c12f 100644 --- a/includes/Documents/OrderDocument.php +++ b/includes/Documents/OrderDocument.php @@ -482,7 +482,7 @@ public function regenerate( $order = null, $data = null ) { } // ubl - if ( $document->is_enabled( 'ubl' ) && wcpdf_is_ubl_available() ) { + if ( $this->is_enabled( 'ubl' ) && wcpdf_is_ubl_available() ) { wpo_ips_ubl_save_order_taxes( $order ); } diff --git a/includes/Settings/SettingsCallbacks.php b/includes/Settings/SettingsCallbacks.php index d6c18f43b..92fa2f714 100644 --- a/includes/Settings/SettingsCallbacks.php +++ b/includes/Settings/SettingsCallbacks.php @@ -145,6 +145,35 @@ public function url_input( $args ) { } } + /** + * Email input callback. + * + * args: + * option_name - name of the main option + * id - key of the setting + * size - size of the text input (em) + * default - default setting (optional) + * description - description (optional) + * type - type (optional) + * + * @return void. + */ + public function email_input( $args ) { + extract( $this->normalize_settings_args( $args ) ); + + if ( empty( $type ) ) { + $type = 'email'; + } + + $size = ! empty( $size ) ? sprintf( 'size="%s"', esc_attr( $size ) ) : ''; + printf( '', esc_attr( $type ), esc_attr( $id ), esc_attr( $setting_name ), sanitize_email( $current ), $size, esc_attr( $placeholder ), ! empty( $disabled ) ? 'disabled="disabled"' : '' ); + + // output description. + if ( ! empty( $description ) ) { + printf( '

%s

', wp_kses_post( $description ) ); + } + } + /** * Combined checkbox & text input callback. * diff --git a/languages/woocommerce-pdf-invoices-packing-slips.pot b/languages/woocommerce-pdf-invoices-packing-slips.pot index 66914cf0b..e28e7fe82 100644 --- a/languages/woocommerce-pdf-invoices-packing-slips.pot +++ b/languages/woocommerce-pdf-invoices-packing-slips.pot @@ -1,15 +1,15 @@ -# Copyright (C) 2024 WP Overnight +# Copyright (C) 2025 WP Overnight # This file is distributed under the GPLv2 or later. msgid "" msgstr "" -"Project-Id-Version: PDF Invoices & Packing Slips for WooCommerce 3.9.4\n" +"Project-Id-Version: PDF Invoices & Packing Slips for WooCommerce 3.9.5\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-12-22T19:57:06+00:00\n" +"POT-Creation-Date: 2025-01-20T10:39:58+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: woocommerce-pdf-invoices-packing-slips\n" @@ -54,15 +54,15 @@ msgid "Yes you deserve it!" msgstr "" #: includes/Admin.php:124 -#: includes/Main.php:853 -#: includes/Settings/SettingsDebug.php:1141 +#: includes/Main.php:852 +#: includes/Settings/SettingsDebug.php:1153 #: views/attachment-settings-hint.php:12 #: views/extensions.php:121 #: views/promo.php:34 -#: woocommerce-pdf-invoices-packingslips.php:339 -#: woocommerce-pdf-invoices-packingslips.php:398 -#: woocommerce-pdf-invoices-packingslips.php:436 -#: woocommerce-pdf-invoices-packingslips.php:570 +#: woocommerce-pdf-invoices-packingslips.php:340 +#: woocommerce-pdf-invoices-packingslips.php:399 +#: woocommerce-pdf-invoices-packingslips.php:437 +#: woocommerce-pdf-invoices-packingslips.php:571 msgid "Hide this message" msgstr "" @@ -94,17 +94,17 @@ msgstr "" #: includes/Admin.php:322 #: includes/Admin.php:1342 -#: includes/Assets.php:233 +#: includes/Assets.php:235 #: includes/Documents/Invoice.php:354 -#: includes/Main.php:1237 +#: includes/Main.php:1236 #: views/setup-wizard/display-options.php:81 msgid "Invoice Number" msgstr "" #: includes/Admin.php:323 #: includes/Documents/Invoice.php:322 -#: includes/Documents/OrderDocumentMethods.php:1306 -#: includes/Main.php:1238 +#: includes/Documents/OrderDocumentMethods.php:1300 +#: includes/Main.php:1237 #: views/setup-wizard/display-options.php:60 msgid "Invoice Date" msgstr "" @@ -251,56 +251,74 @@ msgstr "" msgid "DEBUG output enabled" msgstr "" -#: includes/Assets.php:87 +#: includes/Assets.php:89 msgid "You have to select order(s) first!" msgstr "" -#: includes/Assets.php:88 +#: includes/Assets.php:90 msgid "Are you sure you want to delete this document? This cannot be undone." msgstr "" -#: includes/Assets.php:89 +#: includes/Assets.php:91 msgid "Are you sure you want to regenerate this document? This will make the document reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings." msgstr "" -#: includes/Assets.php:118 +#: includes/Assets.php:120 msgid "Preview" msgstr "" -#: includes/Assets.php:121 -#: includes/Settings/SettingsDebug.php:1149 +#: includes/Assets.php:123 +#: includes/Settings/SettingsDebug.php:1161 msgid "Settings" msgstr "" -#: includes/Assets.php:180 +#: includes/Assets.php:182 msgid "Document settings" msgstr "" -#: includes/Assets.php:181 +#: includes/Assets.php:183 msgid "Select a document in the dropdown menu above to edit its settings." msgstr "" -#: includes/Assets.php:192 +#: includes/Assets.php:194 msgid "The number should be smaller than 2147483647. Please note you should add your next document number without prefix, suffix or padding." msgstr "" -#: includes/Assets.php:266 +#: includes/Assets.php:268 msgid "Download" msgstr "" -#: includes/Assets.php:267 +#: includes/Assets.php:269 msgid "Are you sure you want to reset this settings? This cannot be undone." msgstr "" -#: includes/Assets.php:268 +#: includes/Assets.php:270 msgid "Please select a document type" msgstr "" #. translators: 1. open anchor tag, 2. close anchor tag -#: includes/Assets.php:273 +#: includes/Assets.php:275 msgid "Enabled: %1$sclick here%2$s to start using the tools." msgstr "" +#: includes/Assets.php:299 +#: ubl/Settings/TaxesSettings.php:108 +#: ubl/Settings/TaxesSettings.php:112 +#: ubl/Settings/TaxesSettings.php:116 +#: ubl/Settings/TaxesSettings.php:147 +#: ubl/Settings/TaxesSettings.php:153 +#: ubl/Settings/TaxesSettings.php:159 +msgid "Code" +msgstr "" + +#: includes/Assets.php:300 +msgid "New" +msgstr "" + +#: includes/Assets.php:301 +msgid "unsaved" +msgstr "" + #: includes/Compatibility/ThirdPartyPlugins.php:391 msgid "Invoice numbers" msgstr "" @@ -312,7 +330,7 @@ msgid "Invoice" msgstr "" #: includes/Documents/Invoice.php:68 -#: includes/Documents/OrderDocumentMethods.php:1325 +#: includes/Documents/OrderDocumentMethods.php:1319 msgid "Invoice Number:" msgstr "" @@ -342,14 +360,14 @@ msgid "Enable" msgstr "" #: includes/Documents/Invoice.php:233 -#: includes/Documents/Invoice.php:615 +#: includes/Documents/Invoice.php:620 #: includes/Documents/PackingSlip.php:191 msgid "Attach to:" msgstr "" #. translators: directory path #: includes/Documents/Invoice.php:241 -#: includes/Documents/Invoice.php:623 +#: includes/Documents/Invoice.php:628 msgid "It looks like the temp folder (%s) is not writable, check the permissions for this folder! Without having write access to this folder, the plugin will not be able to email invoices." msgstr "" @@ -411,7 +429,7 @@ msgid "Display invoice date" msgstr "" #: includes/Documents/Invoice.php:323 -#: includes/Documents/OrderDocumentMethods.php:1307 +#: includes/Documents/OrderDocumentMethods.php:1301 #: views/setup-wizard/display-options.php:61 msgid "Order Date" msgstr "" @@ -623,124 +641,116 @@ msgstr "" msgid "UBL 2.1" msgstr "" -#: includes/Documents/Invoice.php:629 +#. translators: %1$s: opening link tag, %2$s: closing link tag +#: includes/Documents/Invoice.php:611 +msgid "Install extensions to support country-specific e-invoicing formats. See the latest %1$ssupported formats%2$s." +msgstr "" + +#: includes/Documents/Invoice.php:634 msgid "Include encrypted PDF:" msgstr "" -#: includes/Documents/Invoice.php:635 +#: includes/Documents/Invoice.php:640 msgid "Embed the encrypted PDF invoice file within the UBL document. Note that this option may not be supported by all UBL formats." msgstr "" -#: includes/Documents/Invoice.php:658 -#: includes/Documents/Invoice.php:702 -#: includes/Documents/PackingSlip.php:229 +#: includes/Documents/Invoice.php:663 +#: includes/Documents/Invoice.php:707 +#: includes/Documents/PackingSlip.php:230 #: includes/Settings.php:163 #: includes/Settings/SettingsDebug.php:682 msgid "General" msgstr "" -#: includes/Documents/Invoice.php:667 -#: includes/Documents/PackingSlip.php:236 +#: includes/Documents/Invoice.php:672 +#: includes/Documents/PackingSlip.php:237 msgid "Document details" msgstr "" -#: includes/Documents/Invoice.php:681 +#: includes/Documents/Invoice.php:686 msgid "Admin" msgstr "" -#: includes/Documents/Invoice.php:689 +#: includes/Documents/Invoice.php:694 #: includes/Settings.php:180 msgid "Advanced" msgstr "" -#: includes/Documents/Invoice.php:727 -msgid "EN16931 XRechnung" -msgstr "" - -#: includes/Documents/Invoice.php:733 -msgid "Formats available through extensions" -msgstr "" - -#. translators: %1$s: opening link tag, %2$s: closing link tag -#: includes/Documents/Invoice.php:748 -msgid "If the format you need isn't listed, please don't hesitate to %1$scontact us%2$s!" -msgstr "" - #. translators: 1. credit note title, 2. refund id -#: includes/Documents/OrderDocument.php:482 +#: includes/Documents/OrderDocument.php:491 msgid "%1$s (refund #%2$s) was regenerated." msgstr "" -#. translators: 1. credit note title, 2. refund id -#: includes/Documents/OrderDocument.php:482 +#. translators: 1. document title +#: includes/Documents/OrderDocument.php:496 msgid "%s was regenerated" msgstr "" #. translators: %s: document name -#: includes/Documents/OrderDocument.php:883 +#: includes/Documents/OrderDocument.php:902 msgid "%s Number:" msgstr "" #. translators: %s: document name -#: includes/Documents/OrderDocument.php:891 +#: includes/Documents/OrderDocument.php:910 msgid "%s Date:" msgstr "" -#: includes/Documents/OrderDocument.php:897 -#: includes/Main.php:1723 +#: includes/Documents/OrderDocument.php:916 +#: includes/Main.php:1722 msgid "Due Date:" msgstr "" -#: includes/Documents/OrderDocument.php:901 +#: includes/Documents/OrderDocument.php:920 msgid "Billing Address:" msgstr "" -#: includes/Documents/OrderDocument.php:904 +#: includes/Documents/OrderDocument.php:923 msgid "Shipping Address:" msgstr "" -#: includes/Documents/OrderDocument.php:907 +#: includes/Documents/OrderDocument.php:926 msgid "Order Number:" msgstr "" -#: includes/Documents/OrderDocument.php:910 +#: includes/Documents/OrderDocument.php:929 msgid "Order Date:" msgstr "" -#: includes/Documents/OrderDocument.php:913 +#: includes/Documents/OrderDocument.php:932 msgid "Payment Method:" msgstr "" -#: includes/Documents/OrderDocument.php:916 +#: includes/Documents/OrderDocument.php:935 #: languages/strings.php:6 msgid "Payment Date:" msgstr "" -#: includes/Documents/OrderDocument.php:919 +#: includes/Documents/OrderDocument.php:938 msgid "Shipping Method:" msgstr "" -#: includes/Documents/OrderDocument.php:922 +#: includes/Documents/OrderDocument.php:941 msgid "SKU:" msgstr "" -#: includes/Documents/OrderDocument.php:925 +#: includes/Documents/OrderDocument.php:944 msgid "Weight:" msgstr "" -#: includes/Documents/OrderDocument.php:928 +#: includes/Documents/OrderDocument.php:947 msgid "Notes:" msgstr "" -#: includes/Documents/OrderDocument.php:931 +#: includes/Documents/OrderDocument.php:950 msgid "Customer Notes:" msgstr "" -#: includes/Documents/OrderDocument.php:1565 +#: includes/Documents/OrderDocument.php:1582 msgid "Admin email" msgstr "" -#: includes/Documents/OrderDocument.php:1568 +#: includes/Documents/OrderDocument.php:1585 msgid "Manual email" msgstr "" @@ -749,29 +759,29 @@ msgstr "" msgid "N/A" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:985 +#: includes/Documents/OrderDocumentMethods.php:979 msgid "Subtotal" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:1010 +#: includes/Documents/OrderDocumentMethods.php:1004 msgid "Shipping" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:1041 +#: includes/Documents/OrderDocumentMethods.php:1035 msgid "Discount" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:1108 +#: includes/Documents/OrderDocumentMethods.php:1102 msgid "Total ex. VAT" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:1111 +#: includes/Documents/OrderDocumentMethods.php:1105 #: includes/Settings.php:425 -#: ubl/Settings/TaxesSettings.php:170 +#: ubl/Settings/TaxesSettings.php:279 msgid "Total" msgstr "" -#: includes/Documents/OrderDocumentMethods.php:1348 +#: includes/Documents/OrderDocumentMethods.php:1342 msgid "Reason for refund:" msgstr "" @@ -811,125 +821,125 @@ msgstr "" msgid "Download %s (PDF)" msgstr "" -#: includes/Main.php:361 +#: includes/Main.php:360 msgid "You do not have sufficient permissions to access this page. Reason: empty access key" msgstr "" -#: includes/Main.php:367 +#: includes/Main.php:366 msgid "You do not have sufficient permissions to access this page. Reason: empty action" msgstr "" -#: includes/Main.php:373 +#: includes/Main.php:372 msgid "You do not have sufficient permissions to access this page. Reason: invalid nonce" msgstr "" -#: includes/Main.php:383 +#: includes/Main.php:382 msgid "You haven't selected any orders" msgstr "" -#: includes/Main.php:388 +#: includes/Main.php:387 msgid "Some of the export parameters are missing." msgstr "" -#: includes/Main.php:407 +#: includes/Main.php:406 msgid "You have to save the order before generating a PDF document for it." msgstr "" #. translators: %s: Order ID -#: includes/Main.php:412 +#: includes/Main.php:411 msgid "Could not find the order #%s." msgstr "" -#: includes/Main.php:479 +#: includes/Main.php:478 #: includes/Settings.php:218 #: includes/Settings.php:366 msgid "You do not have sufficient permissions to access this page." msgstr "" #. translators: document type -#: includes/Main.php:534 +#: includes/Main.php:533 msgid "Document of type '%s' for the selected order(s) could not be generated" msgstr "" #. translators: 1. plugin name, 2. directory path -#: includes/Main.php:851 +#: includes/Main.php:850 msgid "The %1$s directory %2$s couldn't be created or is not writable!" msgstr "" -#: includes/Main.php:852 +#: includes/Main.php:851 msgid "Please check your directories write permissions or contact your hosting service provider." msgstr "" #. translators: 1,2. file count -#: includes/Main.php:1190 +#: includes/Main.php:1189 msgid "Unable to delete %1$d files! (deleted %2$d)" msgstr "" #. translators: file count -#: includes/Main.php:1194 +#: includes/Main.php:1193 msgid "Successfully deleted %d files!" msgstr "" -#: includes/Main.php:1198 +#: includes/Main.php:1197 msgid "Nothing to delete!" msgstr "" -#: includes/Main.php:1292 -#: includes/Main.php:1323 +#: includes/Main.php:1291 +#: includes/Main.php:1322 msgid "User" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/Main.php:1300 +#: includes/Main.php:1299 msgid "PDF %1$s created via %2$s." msgstr "" #. translators: document title -#: includes/Main.php:1330 +#: includes/Main.php:1329 msgid "PDF %s deleted." msgstr "" -#: includes/Main.php:1347 +#: includes/Main.php:1346 msgid "manually" msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/Main.php:1353 +#: includes/Main.php:1352 msgid "%1$s document marked as printed via %2$s." msgstr "" #. translators: 1. document title, 2. creation trigger -#: includes/Main.php:1369 +#: includes/Main.php:1368 msgid "%1$s document unmark printed." msgstr "" -#: includes/Main.php:1456 +#: includes/Main.php:1455 msgid "single order action" msgstr "" -#: includes/Main.php:1457 +#: includes/Main.php:1456 msgid "bulk order action" msgstr "" -#: includes/Main.php:1458 +#: includes/Main.php:1457 msgid "my account" msgstr "" -#: includes/Main.php:1459 +#: includes/Main.php:1458 msgid "order document data (number and/or date set manually)" msgstr "" -#: includes/Main.php:1463 +#: includes/Main.php:1462 msgid "email attachment" msgstr "" #. translators: 1. document type, 2. mark/unmark -#: includes/Main.php:1562 +#: includes/Main.php:1561 msgid "Document of type %1$s for the selected order could not be %2$s as printed." msgstr "" #. translators: document title -#: includes/Main.php:1659 +#: includes/Main.php:1658 msgid "Order %s Saved" msgstr "" @@ -1015,15 +1025,15 @@ msgstr "" msgid "These are used for the (optional) footer columns in the Modern (Premium) template, but can also be used for other elements in your custom template" msgstr "" -#: includes/Settings/SettingsCallbacks.php:467 +#: includes/Settings/SettingsCallbacks.php:496 msgid "Image resolution" msgstr "" -#: includes/Settings/SettingsCallbacks.php:475 +#: includes/Settings/SettingsCallbacks.php:504 msgid "The image resolution exceeds the recommended maximum of 600dpi. This will unnecessarily increase the size of your PDF files and could negatively affect performance." msgstr "" -#: includes/Settings/SettingsCallbacks.php:523 +#: includes/Settings/SettingsCallbacks.php:552 msgid "Save" msgstr "" @@ -1150,12 +1160,12 @@ msgid "Logged in (recommended)" msgstr "" #: includes/Settings/SettingsDebug.php:729 -#: includes/Settings/SettingsDebug.php:929 +#: includes/Settings/SettingsDebug.php:941 msgid "Guest" msgstr "" #: includes/Settings/SettingsDebug.php:730 -#: includes/Settings/SettingsDebug.php:933 +#: includes/Settings/SettingsDebug.php:945 msgid "Full" msgstr "" @@ -1263,151 +1273,159 @@ msgid "Log PDF document creation, deletion, and mark/unmark as printed to order msgstr "" #: includes/Settings/SettingsDebug.php:880 -msgid "Disable document preview" +msgid "Log missing translations" msgstr "" #: includes/Settings/SettingsDebug.php:886 -msgid "Disables the document preview on the plugin settings pages." +msgid "Enable this option to log dynamic strings that could not be translated. This can help you identify which strings need to be registered for translation." msgstr "" #: includes/Settings/SettingsDebug.php:892 -msgid "Enable semaphore logs" +msgid "Disable document preview" msgstr "" #: includes/Settings/SettingsDebug.php:898 -msgid "Our plugin uses a semaphore class that prevents race conditions in multiple places in the code. Enable this setting only if you are having issues with document numbers, yearly reset or documents being assigned to the wrong order." +msgid "Disables the document preview on the plugin settings pages." msgstr "" #: includes/Settings/SettingsDebug.php:904 -msgid "Enable danger zone tools" +msgid "Enable semaphore logs" msgstr "" #: includes/Settings/SettingsDebug.php:910 +msgid "Our plugin uses a semaphore class that prevents race conditions in multiple places in the code. Enable this setting only if you are having issues with document numbers, yearly reset or documents being assigned to the wrong order." +msgstr "" + +#: includes/Settings/SettingsDebug.php:916 +msgid "Enable danger zone tools" +msgstr "" + +#: includes/Settings/SettingsDebug.php:922 msgid "Enables the danger zone tools. The actions performed by these tools are irreversible!" msgstr "" -#: includes/Settings/SettingsDebug.php:925 +#: includes/Settings/SettingsDebug.php:937 msgid "Logged in" msgstr "" -#: includes/Settings/SettingsDebug.php:926 +#: includes/Settings/SettingsDebug.php:938 msgid "Document can be accessed by logged in users only." msgstr "" -#: includes/Settings/SettingsDebug.php:930 +#: includes/Settings/SettingsDebug.php:942 msgid "Document can be accessed by logged in and guest users." msgstr "" -#: includes/Settings/SettingsDebug.php:934 +#: includes/Settings/SettingsDebug.php:946 msgid "Document can be accessed by everyone with the link." msgstr "" -#: includes/Settings/SettingsDebug.php:962 +#: includes/Settings/SettingsDebug.php:974 msgid "7.4 or superior" msgstr "" -#: includes/Settings/SettingsDebug.php:975 +#: includes/Settings/SettingsDebug.php:987 msgid "Recommended, will use fallback functions" msgstr "" -#: includes/Settings/SettingsDebug.php:981 +#: includes/Settings/SettingsDebug.php:993 msgid "Required if you have images in your documents" msgstr "" -#: includes/Settings/SettingsDebug.php:984 +#: includes/Settings/SettingsDebug.php:996 msgid "Required when using .webp images" msgstr "" -#: includes/Settings/SettingsDebug.php:987 +#: includes/Settings/SettingsDebug.php:999 msgid "Required if you have .webp images in your documents" msgstr "" -#: includes/Settings/SettingsDebug.php:990 +#: includes/Settings/SettingsDebug.php:1002 msgid "To compress PDF documents" msgstr "" -#: includes/Settings/SettingsDebug.php:993 +#: includes/Settings/SettingsDebug.php:1005 msgid "Recommended to compress PDF documents" msgstr "" -#: includes/Settings/SettingsDebug.php:996 +#: includes/Settings/SettingsDebug.php:1008 msgid "For better performances" msgstr "" -#: includes/Settings/SettingsDebug.php:999 -#: includes/Settings/SettingsDebug.php:1005 +#: includes/Settings/SettingsDebug.php:1011 +#: includes/Settings/SettingsDebug.php:1017 msgid "Recommended for better performances" msgstr "" -#: includes/Settings/SettingsDebug.php:1002 +#: includes/Settings/SettingsDebug.php:1014 msgid "Better with transparent PNG images" msgstr "" -#: includes/Settings/SettingsDebug.php:1008 +#: includes/Settings/SettingsDebug.php:1020 msgid "Required to detect custom templates and to clear the temp folder periodically" msgstr "" -#: includes/Settings/SettingsDebug.php:1011 +#: includes/Settings/SettingsDebug.php:1023 msgid "Check PHP disable_functions" msgstr "" #. translators: tags -#: includes/Settings/SettingsDebug.php:1015 +#: includes/Settings/SettingsDebug.php:1027 msgid "Recommended: 128MB (especially for plugin-heavy setups)" msgstr "" #. translators: 1: opening anchor tag, 2: closing anchor tag -#: includes/Settings/SettingsDebug.php:1017 +#: includes/Settings/SettingsDebug.php:1029 msgid "See: %1$sIncreasing the WordPress Memory Limit%2$s" msgstr "" -#: includes/Settings/SettingsDebug.php:1025 +#: includes/Settings/SettingsDebug.php:1037 msgid "Allow remote stylesheets and images" msgstr "" -#: includes/Settings/SettingsDebug.php:1028 +#: includes/Settings/SettingsDebug.php:1040 msgid "allow_url_fopen disabled" msgstr "" -#: includes/Settings/SettingsDebug.php:1031 +#: includes/Settings/SettingsDebug.php:1043 msgid "Necessary to verify the MIME type of local images." msgstr "" -#: includes/Settings/SettingsDebug.php:1034 +#: includes/Settings/SettingsDebug.php:1046 msgid "fileinfo disabled" msgstr "" -#: includes/Settings/SettingsDebug.php:1037 +#: includes/Settings/SettingsDebug.php:1049 msgid "To compress and decompress font and image data" msgstr "" -#: includes/Settings/SettingsDebug.php:1040 +#: includes/Settings/SettingsDebug.php:1052 msgid "base64_decode disabled" msgstr "" -#: includes/Settings/SettingsDebug.php:1048 +#: includes/Settings/SettingsDebug.php:1060 msgid "Required for IMagick" msgstr "" -#: includes/Settings/SettingsDebug.php:1051 +#: includes/Settings/SettingsDebug.php:1063 msgid "ImageMagick library, integrated via the IMagick PHP extension for advanced image processing capabilities" msgstr "" #. translators: 1: Plugin name, 2: Open anchor tag, 3: Close anchor tag -#: includes/Settings/SettingsDebug.php:1131 +#: includes/Settings/SettingsDebug.php:1143 msgid "Your server does not meet the requirements for %1$s. Please check the %2$sStatus page%3$s for more information." msgstr "" -#: includes/Settings/SettingsDebug.php:1150 +#: includes/Settings/SettingsDebug.php:1162 #: views/advanced-status.php:203 msgid "Status" msgstr "" -#: includes/Settings/SettingsDebug.php:1151 +#: includes/Settings/SettingsDebug.php:1163 msgid "Tools" msgstr "" -#: includes/Settings/SettingsDebug.php:1152 +#: includes/Settings/SettingsDebug.php:1164 msgid "Numbers" msgstr "" @@ -1427,7 +1445,7 @@ msgid "Requires the %1$sProfessional extension%2$s." msgstr "" #: includes/Settings/SettingsGeneral.php:50 -#: includes/Settings/SettingsUbl.php:154 +#: includes/Settings/SettingsUbl.php:111 msgid "General settings" msgstr "" @@ -1599,12 +1617,20 @@ msgstr "" msgid "To ensure compliance with e-invoicing requirements, please complete the Taxes Classification. This information is essential for accurately generating legally compliant invoices." msgstr "" +#: includes/Settings/SettingsUbl.php:63 +msgid "Note" +msgstr "" + +#: includes/Settings/SettingsUbl.php:63 +msgid "Each rate line allows you to configure the tax scheme, category, and reason. If these values are set to \"Default,\" they will automatically inherit the settings selected in the \"Tax class default\" dropdowns at the bottom of the table." +msgstr "" + #. translators: 1. General Settings, 2. UBL Settings -#: includes/Settings/SettingsUbl.php:153 +#: includes/Settings/SettingsUbl.php:110 msgid "You've enabled UBL output for a document, but some essential details are missing. Please ensure you've added your VAT and CoC numbers in the %1$s. Also, specify your tax rates in the %2$s." msgstr "" -#: includes/Settings/SettingsUbl.php:155 +#: includes/Settings/SettingsUbl.php:112 msgid "UBL settings" msgstr "" @@ -1892,279 +1918,559 @@ msgstr "" msgid "Tax Category" msgstr "" -#: ubl/Settings/TaxesSettings.php:91 +#: ubl/Settings/TaxesSettings.php:56 +msgid "Reason" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:57 +msgid "Remarks" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:132 msgid "No taxes found for this class." msgstr "" -#: ubl/Settings/TaxesSettings.php:97 +#: ubl/Settings/TaxesSettings.php:138 msgid "Tax class default" msgstr "" -#: ubl/Settings/TaxesSettings.php:111 -#: ubl/Settings/TaxesSettings.php:178 +#: ubl/Settings/TaxesSettings.php:191 msgid "Default" msgstr "" -#: ubl/Settings/TaxesSettings.php:121 +#: ubl/Settings/TaxesSettings.php:202 +msgid "None" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:230 msgid "Value added tax (VAT)" msgstr "" -#: ubl/Settings/TaxesSettings.php:122 +#: ubl/Settings/TaxesSettings.php:231 msgid "Goods and services tax (GST)" msgstr "" -#: ubl/Settings/TaxesSettings.php:123 +#: ubl/Settings/TaxesSettings.php:232 msgid "Petroleum tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:124 +#: ubl/Settings/TaxesSettings.php:233 msgid "Provisional countervailing duty cash" msgstr "" -#: ubl/Settings/TaxesSettings.php:125 +#: ubl/Settings/TaxesSettings.php:234 msgid "Provisional countervailing duty bond" msgstr "" -#: ubl/Settings/TaxesSettings.php:126 +#: ubl/Settings/TaxesSettings.php:235 msgid "Tobacco tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:127 +#: ubl/Settings/TaxesSettings.php:236 msgid "Energy fee" msgstr "" -#: ubl/Settings/TaxesSettings.php:128 +#: ubl/Settings/TaxesSettings.php:237 msgid "Coffee tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:129 +#: ubl/Settings/TaxesSettings.php:238 msgid "Harmonised sales tax, Canadian" msgstr "" -#: ubl/Settings/TaxesSettings.php:130 +#: ubl/Settings/TaxesSettings.php:239 msgid "Quebec sales tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:131 +#: ubl/Settings/TaxesSettings.php:240 msgid "Canadian provincial sales tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:132 +#: ubl/Settings/TaxesSettings.php:241 msgid "Tax on replacement part" msgstr "" -#: ubl/Settings/TaxesSettings.php:133 +#: ubl/Settings/TaxesSettings.php:242 msgid "Mineral oil tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:134 +#: ubl/Settings/TaxesSettings.php:243 msgid "Special tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:135 +#: ubl/Settings/TaxesSettings.php:244 msgid "Anti-dumping duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:136 +#: ubl/Settings/TaxesSettings.php:245 msgid "Stamp duty (Imposta di Bollo)" msgstr "" -#: ubl/Settings/TaxesSettings.php:137 +#: ubl/Settings/TaxesSettings.php:246 msgid "Agricultural levy" msgstr "" -#: ubl/Settings/TaxesSettings.php:138 +#: ubl/Settings/TaxesSettings.php:247 msgid "Car tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:139 +#: ubl/Settings/TaxesSettings.php:248 msgid "Paper consortium tax (Italy)" msgstr "" -#: ubl/Settings/TaxesSettings.php:140 +#: ubl/Settings/TaxesSettings.php:249 msgid "Commodity specific tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:141 +#: ubl/Settings/TaxesSettings.php:250 msgid "Customs duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:142 +#: ubl/Settings/TaxesSettings.php:251 msgid "Countervailing duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:143 +#: ubl/Settings/TaxesSettings.php:252 msgid "Environmental tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:144 +#: ubl/Settings/TaxesSettings.php:253 msgid "Excise duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:145 +#: ubl/Settings/TaxesSettings.php:254 msgid "Agricultural export rebate" msgstr "" -#: ubl/Settings/TaxesSettings.php:146 +#: ubl/Settings/TaxesSettings.php:255 msgid "Federal excise tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:147 +#: ubl/Settings/TaxesSettings.php:256 msgid "Free" msgstr "" -#: ubl/Settings/TaxesSettings.php:148 +#: ubl/Settings/TaxesSettings.php:257 msgid "General construction tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:149 +#: ubl/Settings/TaxesSettings.php:258 msgid "Illuminants tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:150 +#: ubl/Settings/TaxesSettings.php:259 msgid "Import tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:151 +#: ubl/Settings/TaxesSettings.php:260 msgid "Individual tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:152 +#: ubl/Settings/TaxesSettings.php:261 msgid "Business license fee" msgstr "" -#: ubl/Settings/TaxesSettings.php:153 +#: ubl/Settings/TaxesSettings.php:262 msgid "Local construction tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:154 +#: ubl/Settings/TaxesSettings.php:263 msgid "Light dues payable" msgstr "" -#: ubl/Settings/TaxesSettings.php:155 +#: ubl/Settings/TaxesSettings.php:264 msgid "Local sales tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:156 +#: ubl/Settings/TaxesSettings.php:265 msgid "Lust tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:157 +#: ubl/Settings/TaxesSettings.php:266 msgid "Monetary compensatory amount" msgstr "" -#: ubl/Settings/TaxesSettings.php:158 +#: ubl/Settings/TaxesSettings.php:267 msgid "Miscellaneous cash deposit" msgstr "" -#: ubl/Settings/TaxesSettings.php:159 +#: ubl/Settings/TaxesSettings.php:268 msgid "Other taxes" msgstr "" -#: ubl/Settings/TaxesSettings.php:160 +#: ubl/Settings/TaxesSettings.php:269 msgid "Provisional duty bond" msgstr "" -#: ubl/Settings/TaxesSettings.php:161 +#: ubl/Settings/TaxesSettings.php:270 msgid "Provisional duty cash" msgstr "" -#: ubl/Settings/TaxesSettings.php:162 +#: ubl/Settings/TaxesSettings.php:271 msgid "Preference duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:163 +#: ubl/Settings/TaxesSettings.php:272 msgid "Special construction tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:164 +#: ubl/Settings/TaxesSettings.php:273 msgid "Shifted social securities" msgstr "" -#: ubl/Settings/TaxesSettings.php:165 +#: ubl/Settings/TaxesSettings.php:274 msgid "State/provincial sales tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:166 +#: ubl/Settings/TaxesSettings.php:275 msgid "Suspended duty" msgstr "" -#: ubl/Settings/TaxesSettings.php:167 +#: ubl/Settings/TaxesSettings.php:276 msgid "Surtax" msgstr "" -#: ubl/Settings/TaxesSettings.php:168 +#: ubl/Settings/TaxesSettings.php:277 msgid "Shifted wage tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:169 +#: ubl/Settings/TaxesSettings.php:278 msgid "Alcohol mark tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:171 +#: ubl/Settings/TaxesSettings.php:280 msgid "Turnover tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:172 +#: ubl/Settings/TaxesSettings.php:281 msgid "Tonnage taxes" msgstr "" -#: ubl/Settings/TaxesSettings.php:173 +#: ubl/Settings/TaxesSettings.php:282 msgid "Valuation deposit" msgstr "" -#: ubl/Settings/TaxesSettings.php:188 -msgid "Standard rate" +#: ubl/Settings/TaxesSettings.php:288 +msgid "Mixed tax rate" msgstr "" -#: ubl/Settings/TaxesSettings.php:189 +#: ubl/Settings/TaxesSettings.php:289 msgid "Lower rate" msgstr "" -#: ubl/Settings/TaxesSettings.php:190 -msgid "Zero rated goods" -msgstr "" - -#: ubl/Settings/TaxesSettings.php:191 -msgid "Mixed tax rate" -msgstr "" - -#: ubl/Settings/TaxesSettings.php:192 +#: ubl/Settings/TaxesSettings.php:290 msgid "Exempt for resale" msgstr "" -#: ubl/Settings/TaxesSettings.php:193 +#: ubl/Settings/TaxesSettings.php:291 msgid "Value Added Tax (VAT) not now due for payment" msgstr "" -#: ubl/Settings/TaxesSettings.php:194 +#: ubl/Settings/TaxesSettings.php:292 msgid "Value Added Tax (VAT) due from a previous invoice" msgstr "" -#: ubl/Settings/TaxesSettings.php:195 +#: ubl/Settings/TaxesSettings.php:293 +msgid "VAT Reverse Charge" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:294 msgid "Transferred (VAT)" msgstr "" -#: ubl/Settings/TaxesSettings.php:196 +#: ubl/Settings/TaxesSettings.php:295 msgid "Duty paid by supplier" msgstr "" -#: ubl/Settings/TaxesSettings.php:197 +#: ubl/Settings/TaxesSettings.php:296 +msgid "Value Added Tax (VAT) margin scheme - travel agents" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:297 msgid "Exempt from tax" msgstr "" -#: ubl/Settings/TaxesSettings.php:198 +#: ubl/Settings/TaxesSettings.php:298 +msgid "Value Added Tax (VAT) margin scheme - second-hand goods" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:299 msgid "Free export item, tax not charged" msgstr "" -#: ubl/Settings/TaxesSettings.php:199 +#: ubl/Settings/TaxesSettings.php:300 msgid "Higher rate" msgstr "" -#: ubl/Settings/TaxesSettings.php:200 +#: ubl/Settings/TaxesSettings.php:301 +msgid "Value Added Tax (VAT) margin scheme - works of art" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:302 +msgid "Value Added Tax (VAT) margin scheme - collector's items and antiques" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:303 +msgid "VAT exempt for EEA intra-community supply of goods and services" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:304 +msgid "Canary Islands general indirect tax" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:305 +msgid "Tax for production, services and importation in Ceuta and Melilla" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:306 msgid "Services outside scope of tax" msgstr "" +#: ubl/Settings/TaxesSettings.php:307 +msgid "Standard rate" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:308 +msgid "Zero rated goods" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:314 +msgid "Exempt based on article 79, point c of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:315 +msgid "Exempt based on article 132 of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:316 +msgid "Exempt based on article 132, section 1 (a) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:317 +msgid "Exempt based on article 132, section 1 (b) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:318 +msgid "Exempt based on article 132, section 1 (c) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:319 +msgid "Exempt based on article 132, section 1 (d) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:320 +msgid "Exempt based on article 132, section 1 (e) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:321 +msgid "Exempt based on article 132, section 1 (f) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:322 +msgid "Exempt based on article 132, section 1 (g) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:323 +msgid "Exempt based on article 132, section 1 (h) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:324 +msgid "Exempt based on article 132, section 1 (i) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:325 +msgid "Exempt based on article 132, section 1 (j) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:326 +msgid "Exempt based on article 132, section 1 (k) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:327 +msgid "Exempt based on article 132, section 1 (l) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:328 +msgid "Exempt based on article 132, section 1 (m) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:329 +msgid "Exempt based on article 132, section 1 (n) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:330 +msgid "Exempt based on article 132, section 1 (o) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:331 +msgid "Exempt based on article 132, section 1 (p) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:332 +msgid "Exempt based on article 132, section 1 (q) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:333 +msgid "Exempt based on article 143 of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:334 +msgid "Exempt based on article 143, section 1 (a) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:335 +msgid "Exempt based on article 143, section 1 (b) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:336 +msgid "Exempt based on article 143, section 1 (c) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:337 +msgid "Exempt based on article 143, section 1 (d) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:338 +msgid "Exempt based on article 143, section 1 (e) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:339 +msgid "Exempt based on article 143, section 1 (f) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:340 +msgid "Exempt based on article 143, section 1 (fa) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:341 +msgid "Exempt based on article 143, section 1 (g) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:342 +msgid "Exempt based on article 143, section 1 (h) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:343 +msgid "Exempt based on article 143, section 1 (i) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:344 +msgid "Exempt based on article 143, section 1 (j) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:345 +msgid "Exempt based on article 143, section 1 (k) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:346 +msgid "Exempt based on article 143, section 1 (l) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:347 +msgid "Exempt based on article 148 of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:348 +msgid "Exempt based on article 148, section (a) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:349 +msgid "Exempt based on article 148, section (b) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:350 +msgid "Exempt based on article 148, section (c) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:351 +msgid "Exempt based on article 148, section (d) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:352 +msgid "Exempt based on article 148, section (e) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:353 +msgid "Exempt based on article 148, section (f) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:354 +msgid "Exempt based on article 148, section (g) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:355 +msgid "Exempt based on article 151, section 1 (a) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:356 +msgid "Exempt based on article 151, section 1 (aa) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:357 +msgid "Exempt based on article 151, section 1 (b) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:358 +msgid "Exempt based on article 151, section 1 (c) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:359 +msgid "Exempt based on article 151, section 1 (d) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:360 +msgid "Exempt based on article 151, section 1 (e) of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:361 +msgid "Exempt based on article 309 of Council Directive 2006/112/EC" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:362 +msgid "Reverse charge" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:363 +msgid "Travel agents VAT scheme." +msgstr "" + +#: ubl/Settings/TaxesSettings.php:364 +msgid "Second hand goods VAT scheme." +msgstr "" + +#: ubl/Settings/TaxesSettings.php:365 +msgid "Export outside the EU" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:366 +msgid "Works of art VAT scheme." +msgstr "" + +#: ubl/Settings/TaxesSettings.php:367 +msgid "Intra-community supply" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:368 +msgid "Collectors items and antiques VAT scheme." +msgstr "" + +#: ubl/Settings/TaxesSettings.php:369 +msgid "Not subject to VAT" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:370 +msgid "France domestic VAT franchise in base" +msgstr "" + +#: ubl/Settings/TaxesSettings.php:371 +msgid "France domestic Credit Notes without VAT, due to supplier forfeit of VAT for discount" +msgstr "" + +#. translators: %s: tax category code +#: ubl/Settings/TaxesSettings.php:382 +msgid "Only use with tax category code %s" +msgstr "" + #: views/advanced-numbers.php:5 msgid "Choose a number store" msgstr "" @@ -2839,63 +3145,63 @@ msgid "Buy now" msgstr "" #. translators: 1. open anchor tag, 2. close anchor tag, 3. Woo version -#: woocommerce-pdf-invoices-packingslips.php:193 +#: woocommerce-pdf-invoices-packingslips.php:194 msgid "PDF Invoices & Packing Slips for WooCommerce requires %1$sWooCommerce%2$s version %3$s or higher to be installed & activated!" msgstr "" #. translators: PHP version -#: woocommerce-pdf-invoices-packingslips.php:238 +#: woocommerce-pdf-invoices-packingslips.php:239 msgid "PDF Invoices & Packing Slips for WooCommerce requires PHP %s or higher." msgstr "" #. translators: tags -#: woocommerce-pdf-invoices-packingslips.php:244 +#: woocommerce-pdf-invoices-packingslips.php:245 msgid "We strongly recommend to %1$supdate your PHP version%2$s." msgstr "" #. translators: directory path -#: woocommerce-pdf-invoices-packingslips.php:336 +#: woocommerce-pdf-invoices-packingslips.php:337 msgid "The PDF files in %s are not currently protected due to your site running on NGINX." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:337 +#: woocommerce-pdf-invoices-packingslips.php:338 msgid "To protect them, you must click the button below." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:338 +#: woocommerce-pdf-invoices-packingslips.php:339 msgid "Generate random temporary folder name" msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:395 +#: woocommerce-pdf-invoices-packingslips.php:396 msgid "When sending emails with MailPoet 3 and the active sending method is MailPoet Sending Service or Your web host / web server, MailPoet does not include the PDF Invoices & Packing Slips for WooCommerce attachments in the emails." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:396 +#: woocommerce-pdf-invoices-packingslips.php:397 msgid "To fix this you should select The default WordPress sending method (default) on the Advanced tab." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:397 +#: woocommerce-pdf-invoices-packingslips.php:398 msgid "Change MailPoet sending method to WordPress (default)" msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:434 +#: woocommerce-pdf-invoices-packingslips.php:435 msgid "PDF Invoices & Packing Slips for WooCommerce detected that your current site locale is right-to-left (RTL) which the current PDF engine does not support it. Please consider installing our mPDF extension that is compatible." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:435 +#: woocommerce-pdf-invoices-packingslips.php:436 msgid "Download mPDF extension" msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:480 +#: woocommerce-pdf-invoices-packingslips.php:481 msgid "The year-end is approaching, and we noticed that your PDF Invoices & Packing Slips for WooCommerce plugin doesn't have the scheduled action to reset invoice numbers annually, even though you've explicitly enabled this setting in the document options. Click the button below to schedule the action before the year ends." msgstr "" -#: woocommerce-pdf-invoices-packingslips.php:481 +#: woocommerce-pdf-invoices-packingslips.php:482 msgid "Schedule the action now" msgstr "" #. translators: legacy addon name -#: woocommerce-pdf-invoices-packingslips.php:565 +#: woocommerce-pdf-invoices-packingslips.php:566 msgid "While updating the PDF Invoices & Packing Slips for WooCommerce plugin we've noticed our legacy %s add-on was active on your site. This functionality is now incorporated into the core plugin. We've deactivated the add-on for you, and you are free to uninstall it." msgstr "" diff --git a/readme.txt b/readme.txt index de9b1a7e3..dd4b3d5b4 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: woocommerce, pdf, ubl, invoices, packing slips Requires at least: 4.4 Tested up to: 6.7 Requires PHP: 7.4 -Stable tag: 3.9.5-beta-7 +Stable tag: 3.9.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -102,6 +102,32 @@ There's a setting on the Advanced tab of the settings page that allows you to to == Changelog == += 3.9.5 (2025-01-20) = +- New: Email input callback function for settings +- New: Adds support for additional UBL root elements +- New: Add support for multiple handlers under a single root in `UblDocument::get_data()` +- New: Validation for order tax exemption to apply UBL tax reason +- New: The "Regenerate Invoice" feature now updates UBL Tax item data +- New: Enhance UBL Taxes default selector, 'None' Option +- New: Add `cbc:BaseQuantity` support to UBL structure +- New: UBL Tax settings now align with the latest settings option +- New: Add utility function for dynamic string translation +- New: Add `cbc:BuyerReference` element to UBL for buyer reference +- New: Enable Support for `cac:PaymentMeans` in UBL +- New: Filter hooks for UBL tax schemes, categories, and reasons +- New: Add `cac:Price` support to UBL +- New: Support for UBL Tax Category Reason +- Tweak: Replace UBL code to get the customer VAT number with new function +- Tweak: Update UBL format selector description +- Tweak: Allow `0` days for the due date +- Tweak: Apply `wpo_wcpdf_settings_fields_documents_{$this->type}_pdf` before checking the emptiness of the `$settings_fields` +- Fix: Logo height setting can break document layout on Simple template +- Fix: Setting categories not applied to disabled documents +- Fix: Postcode and city defaults in UBL tax output +- Fix: Incorrect treatment of UBL format setting as historical +- Translations: Updated translation template (POT). +- Tested: Tested up to WooCommerce 9.6. + = 3.9.4 (2024-12-23) = * New: add a note to inform users about the availability of additional documents * New: display a notice when the yearly reset action is not scheduled diff --git a/ubl/Builders/SabreBuilder.php b/ubl/Builders/SabreBuilder.php index f9eda847a..dfaa9452d 100644 --- a/ubl/Builders/SabreBuilder.php +++ b/ubl/Builders/SabreBuilder.php @@ -3,6 +3,7 @@ namespace WPO\IPS\UBL\Builders; use WPO\IPS\Vendor\Sabre\Xml\Service; +use WPO\IPS\Vendor\Sabre\Xml\Writer; use WPO\IPS\UBL\Documents\Document; if ( ! defined( 'ABSPATH' ) ) { @@ -11,19 +12,35 @@ class SabreBuilder extends Builder { - /** Service */ - private $service; + private Service $service; + private Document $document; public function __construct() { $this->service = new Service(); } - public function build( Document $document ) { - // Sabre wants namespaces in value/key format, so we need to flip it - $namespaces = array_flip( $document->get_namespaces() ); - $this->service->namespaceMap = $namespaces; + public function build( Document $document ): string { + $this->document = $document; - return $this->service->write( $document->get_root_element(), $document->get_data() ); + // Map namespaces (Sabre requires URI => prefix) + $this->service->namespaceMap = array_flip( $document->get_namespaces() ); + + return $this->service->write( + $document->get_root_element(), + function ( Writer $writer ) { + $this->xmlSerialize( $writer ); + } + ); + } + + public function xmlSerialize( Writer $writer ): void { + $additionalElements = $this->document->get_additional_root_elements(); + + if ( ! empty( $additionalElements ) && is_array( $additionalElements ) ) { + $writer->writeAttributes( $additionalElements ); + } + + $writer->write( $this->document->get_data() ); } } diff --git a/ubl/Documents/Document.php b/ubl/Documents/Document.php index 68626f8cb..99f197e38 100644 --- a/ubl/Documents/Document.php +++ b/ubl/Documents/Document.php @@ -33,6 +33,7 @@ public function set_order_document( OrderDocument $order_document ) { } abstract public function get_root_element(); + abstract public function get_additional_root_elements(); abstract public function get_format(); abstract public function get_namespaces(); abstract public function get_data(); @@ -70,7 +71,7 @@ public function get_tax_rates() { if ( empty( $tax_items ) ) { return $order_tax_data; } - + $use_historical_settings = $this->order_document->use_historical_settings(); // Loop through all the tax items... @@ -79,7 +80,7 @@ public function get_tax_rates() { $category = ''; $scheme = ''; $reason = ''; - + foreach ( $tax_items as $tax_item_key => $tax_item ) { if ( $tax_item['rate_id'] !== $tax_data_key ) { continue; @@ -95,7 +96,7 @@ public function get_tax_rates() { } else { $percentage = wc_get_order_item_meta( $tax_item_key, '_wcpdf_rate_percentage', true ); } - + $tax_rate_id = absint( $tax_item['rate_id'] ); if ( ! is_numeric( $percentage ) ) { @@ -104,19 +105,19 @@ public function get_tax_rates() { } $fields = array( 'category', 'scheme', 'reason' ); - + foreach ( $fields as $field ) { $meta_key = '_wcpdf_ubl_tax_' . $field; $value = wc_get_order_item_meta( $tax_item_key, $meta_key, true ); - + if ( empty( $value ) || 'default' === $value || ! $use_historical_settings ) { - $value = wpo_ips_ubl_get_tax_data_from_fallback( $field, $tax_rate_id ); + $value = wpo_ips_ubl_get_tax_data_from_fallback( $field, $tax_rate_id, $this->order ); } - + if ( $use_historical_settings ) { wc_update_order_item_meta( $tax_item_key, $meta_key, $value ); } - + ${$field} = $value; } } @@ -160,6 +161,6 @@ public function get_percentage_from_fallback( array $tax_data, int $rate_id ) { } return $percentage; - } + } } diff --git a/ubl/Documents/UblDocument.php b/ubl/Documents/UblDocument.php index 24fe267c6..c44b92bd3 100644 --- a/ubl/Documents/UblDocument.php +++ b/ubl/Documents/UblDocument.php @@ -9,10 +9,14 @@ } class UblDocument extends Document { - + public function get_root_element() { return apply_filters( 'wpo_wc_ubl_document_root_element', 'Invoice', $this ); } + + public function get_additional_root_elements() { + return apply_filters( 'wpo_wc_ubl_document_additional_root_elements', array(), $this ); + } public function get_format() { $format = apply_filters( 'wpo_wc_ubl_document_format' , array( @@ -113,11 +117,34 @@ public function get_data() { $data = array(); foreach ( $this->get_format() as $key => $value ) { - $handler = new $value['handler']($this); - $options = isset( $value['options'] ) && is_array( $value['options'] ) ? $value['options'] : array(); - $data = $handler->handle( $data, $options ); + $options = isset( $value['options'] ) && is_array( $value['options'] ) ? $value['options'] : array(); + $handlers = is_array( $value['handler'] ) ? $value['handler'] : array( $value['handler'] ); + + // Get the root from options if defined + $root_name = isset( $options['root'] ) ? $options['root'] : null; + $root_data = array(); + + foreach ( $handlers as $handler_class ) { + if ( ! class_exists( $handler_class ) ) { + continue; + } + + $handler = new $handler_class( $this ); + $root_data = $handler->handle( $root_data, $options ); + } + + // Add to $data under the root name if specified, otherwise merge directly + if ( $root_name ) { + $data[] = array( + 'name' => $root_name, + 'value' => $root_data, + ); + } else { + $data = array_merge( $data, $root_data ); + } } return apply_filters( 'wpo_wc_ubl_document_data', $data, $this ); } + } diff --git a/ubl/Handlers/Common/AddressHandler.php b/ubl/Handlers/Common/AddressHandler.php index b1d32f15a..1ad93e09e 100644 --- a/ubl/Handlers/Common/AddressHandler.php +++ b/ubl/Handlers/Common/AddressHandler.php @@ -151,31 +151,7 @@ public function return_supplier_party_details() { } public function return_customer_party( $data, $options = array() ) { - $vat_number = apply_filters( 'wpo_wc_ubl_vat_number', '', $this->document->order ); - - if ( empty( $vat_number ) ) { - // Try fetching VAT Number from meta - $vat_meta_keys = array( - '_vat_number', // WooCommerce EU VAT Number - 'VAT Number', // WooCommerce EU VAT Compliance - 'vat_number', // Aelia EU VAT Assistant - '_billing_vat_number', // WooCommerce EU VAT Number 2.3.21+ - '_billing_eu_vat_number', // EU VAT Number for WooCommerce (WP Whale/former Algoritmika) - 'yweu_billing_vat', // YITH WooCommerce EU VAT - 'billing_vat', // German Market - '_billing_vat_id', // Germanized Pro - '_shipping_vat_id' // Germanized Pro (alternative) - ); - - foreach ( $vat_meta_keys as $meta_key ) { - $vat_number = $this->document->order->get_meta( $meta_key ); - - if ( $vat_number ) { - break; - } - } - } - + $vat_number = apply_filters( 'wpo_wc_ubl_vat_number', wpo_wcpdf_get_order_customer_vat_number( $this->document->order ), $this->document->order ); $customerPartyName = $customerPartyContactName = $this->document->order->get_formatted_billing_full_name(); $billing_company = $this->document->order->get_billing_company(); diff --git a/ubl/Handlers/Common/TaxTotalHandler.php b/ubl/Handlers/Common/TaxTotalHandler.php index 5ea225ff6..63c6de2e7 100644 --- a/ubl/Handlers/Common/TaxTotalHandler.php +++ b/ubl/Handlers/Common/TaxTotalHandler.php @@ -12,13 +12,32 @@ class TaxTotalHandler extends UblHandler { public function handle( $data, $options = array() ) { - $taxReasons = TaxesSettings::get_available_reasons(); + $taxReasons = TaxesSettings::get_available_reasons(); + $orderTaxData = $this->document->order_tax_data; + + // Fallback if no tax data is available + if ( empty( $orderTaxData ) ) { + $orderTaxData = array( + 0 => array( + 'total_ex' => $this->document->order->get_total(), + 'total_tax' => 0, + 'items' => array(), + 'name' => '', + ), + ); + } $formatted_tax_array = array_map( function( $item ) use ( $taxReasons ) { + $itemTaxPercentage = ! empty( $item['percentage'] ) ? $item['percentage'] : 0; + $itemTaxCategory = ! empty( $item['category'] ) ? $item['category'] : wpo_ips_ubl_get_tax_data_from_fallback( 'category', null, $this->document->order ); + $itemTaxReasonKey = ! empty( $item['reason'] ) ? $item['reason'] : wpo_ips_ubl_get_tax_data_from_fallback( 'reason', null, $this->document->order ); + $itemTaxReason = ! empty( $taxReasons[ $itemTaxReasonKey ] ) ? $taxReasons[ $itemTaxReasonKey ] : $itemTaxReasonKey; + $itemTaxScheme = ! empty( $item['scheme'] ) ? $item['scheme'] : wpo_ips_ubl_get_tax_data_from_fallback( 'scheme', null, $this->document->order ); + $taxCategory = array( array( 'name' => 'cbc:ID', - 'value' => strtoupper( $item['category'] ), + 'value' => strtoupper( $itemTaxCategory ), ), array( 'name' => 'cbc:Name', @@ -26,31 +45,27 @@ public function handle( $data, $options = array() ) { ), array( 'name' => 'cbc:Percent', - 'value' => round( $item['percentage'], 1 ), + 'value' => round( $itemTaxPercentage, 1 ), ), ); - - // Add TaxExemptionReason only if it's not empty - if ( ! empty( $item['reason'] ) && 'none' !== $item['reason'] ) { - $reasonKey = $item['reason']; - $reason = ! empty( $taxReasons[ $reasonKey ] ) ? $taxReasons[ $reasonKey ] : $reasonKey; + + if ( 'none' !== $itemTaxReasonKey ) { $taxCategory[] = array( 'name' => 'cbc:TaxExemptionReasonCode', - 'value' => $reasonKey, + 'value' => $itemTaxReasonKey, ); $taxCategory[] = array( 'name' => 'cbc:TaxExemptionReason', - 'value' => $reason, + 'value' => $itemTaxReason, ); } - // Place the TaxScheme after the TaxExemptionReason $taxCategory[] = array( 'name' => 'cac:TaxScheme', 'value' => array( array( 'name' => 'cbc:ID', - 'value' => strtoupper( $item['scheme'] ), + 'value' => strtoupper( $itemTaxScheme ), ), ), ); @@ -78,7 +93,7 @@ public function handle( $data, $options = array() ) { ), ), ); - }, $this->document->order_tax_data ); + }, apply_filters( 'wpo_wc_ubl_orderTaxData', $orderTaxData, $data, $options, $this ) ); $array = array( 'name' => 'cac:TaxTotal', diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php index c9ba990a5..dcc641dc0 100644 --- a/woocommerce-pdf-invoices-packingslips.php +++ b/woocommerce-pdf-invoices-packingslips.php @@ -4,14 +4,14 @@ * Requires Plugins: woocommerce * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/ * Description: Create, print & email PDF or UBL Invoices & PDF Packing Slips for WooCommerce orders. - * Version: 3.9.5-beta-7 + * Version: 3.9.5 * Author: WP Overnight * Author URI: https://www.wpovernight.com * License: GPLv2 or later * License URI: https://opensource.org/licenses/gpl-license.php * Text Domain: woocommerce-pdf-invoices-packing-slips * WC requires at least: 3.3 - * WC tested up to: 9.5 + * WC tested up to: 9.6 */ if ( ! defined( 'ABSPATH' ) ) { @@ -22,7 +22,7 @@ class WPO_WCPDF { - public $version = '3.9.5-beta-7'; + public $version = '3.9.5'; public $version_php = '7.4'; public $version_woo = '3.3'; public $version_wp = '4.4'; diff --git a/wpo-ips-functions-ubl.php b/wpo-ips-functions-ubl.php index bee428f83..db4fc3ef0 100644 --- a/wpo-ips-functions-ubl.php +++ b/wpo-ips-functions-ubl.php @@ -25,33 +25,53 @@ function wpo_ips_ubl_sanitize_string( string $string ): string { /** * Get UBL tax data from fallback * - * @param string $key Can be category, scheme, or reason - * @param int $rate_id The tax rate ID + * @param string $key Can be category, scheme, or reason + * @param int|null $rate_id The tax rate ID + * @param \WC_Abstract_Order|null $order The order object * @return string */ -function wpo_ips_ubl_get_tax_data_from_fallback( string $key, int $rate_id ): string { +function wpo_ips_ubl_get_tax_data_from_fallback( string $key, ?int $rate_id, ?\WC_Abstract_Order $order ): string { $result = ''; - + if ( ! in_array( $key, array( 'category', 'scheme', 'reason' ) ) ) { return $result; } - if ( class_exists( '\WC_TAX' ) && is_callable( array( '\WC_TAX', '_get_tax_rate' ) ) ) { + $tax_rate_class = ''; + $ubl_tax_settings = get_option( 'wpo_wcpdf_settings_ubl_taxes', array() ); + + if ( ! is_null( $rate_id ) && class_exists( '\WC_TAX' ) && is_callable( array( '\WC_TAX', '_get_tax_rate' ) ) ) { $tax_rate = \WC_Tax::_get_tax_rate( $rate_id, OBJECT ); if ( ! empty( $tax_rate ) && is_numeric( $tax_rate->tax_rate ) ) { - $ubl_tax_settings = get_option( 'wpo_wcpdf_settings_ubl_taxes', array() ); - $result = isset( $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $key ] ) ? $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $key ] : ''; - $tax_rate_class = $tax_rate->tax_rate_class; + $result = isset( $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $key ] ) ? $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $key ] : ''; + $tax_rate_class = $tax_rate->tax_rate_class; + } + } - if ( empty( $tax_rate_class ) ) { - $tax_rate_class = 'standard'; - } + if ( empty( $tax_rate_class ) ) { + $tax_rate_class = 'standard'; + } - if ( empty( $result ) || 'default' === $result ) { - $result = isset( $ubl_tax_settings['class'][ $tax_rate_class ][ $key ] ) ? $ubl_tax_settings['class'][ $tax_rate_class ][ $key ] : ''; - } + if ( empty( $result ) || 'default' === $result ) { + $result = isset( $ubl_tax_settings['class'][ $tax_rate_class ][ $key ] ) ? $ubl_tax_settings['class'][ $tax_rate_class ][ $key ] : ''; + } + + // check if order is tax exempt + if ( wpo_wcpdf_order_is_vat_exempt( $order ) ) { + switch ( $key ) { + case 'scheme': + $result = 'VAT'; + break; + case 'category': + $result = 'AE'; + break; + case 'reason': + $result = 'VATEX-EU-AE'; + break; } + + $result = apply_filters( 'wpo_ips_ubl_get_tax_data_from_fallback_vat_exempt', $result, $key, $rate_id, $order ); } return $result; @@ -79,18 +99,27 @@ function wpo_ips_ubl_save_order_taxes( \WC_Abstract_Order $order ): void { $ubl_tax_settings = get_option( 'wpo_wcpdf_settings_ubl_taxes', array() ); $tax_fields = array( 'category', 'scheme', 'reason' ); - + foreach ( $tax_fields as $field ) { $value = isset( $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $field ] ) ? $ubl_tax_settings['rate'][ $tax_rate->tax_rate_id ][ $field ] : ''; - + if ( empty( $value ) || 'default' === $value ) { - $value = wpo_ips_ubl_get_tax_data_from_fallback( $field, $tax_rate_id ); + $value = wpo_ips_ubl_get_tax_data_from_fallback( $field, $tax_rate_id, $order ); } - + wc_update_order_item_meta( $item_id, '_wcpdf_ubl_tax_' . $field, $value ); } } } } } -} \ No newline at end of file +} + +/** + * Check if the country format extension is active + * + * @return bool + */ +function wpo_ips_ubl_is_country_format_extension_active(): bool { + return apply_filters( 'wpo_ips_ubl_is_country_format_extension_active', false ); +} diff --git a/wpo-ips-functions.php b/wpo-ips-functions.php index 7a7167cc4..e1e637f91 100644 --- a/wpo-ips-functions.php +++ b/wpo-ips-functions.php @@ -1027,3 +1027,80 @@ function wpo_wcpdf_dynamic_translate( string $string, string $textdomain ): stri return $translation ?: $string; } + +/** + * Check if the order is VAT exempt. + * + * @param \WC_Abstract_Order $order + * @return bool + */ +function wpo_wcpdf_order_is_vat_exempt( \WC_Abstract_Order $order ): bool { + // Check if order is VAT exempt based on order meta + $vat_exempt_meta_key = apply_filters( 'wpo_wcpdf_order_vat_exempt_meta_key', 'is_vat_exempt', $order ); + $is_vat_exempt = apply_filters( 'woocommerce_order_is_vat_exempt', 'yes' === $order->get_meta( $vat_exempt_meta_key ), $order ); + + // Fallback to customer VAT exemption if order is not exempt + if ( ! $is_vat_exempt && apply_filters( 'wpo_wcpdf_order_vat_exempt_fallback_to_customer', true, $order ) ) { + $customer_id = $order->get_customer_id(); + + if ( $customer_id ) { + $customer = new \WC_Customer( $customer_id ); + $is_vat_exempt = $customer->is_vat_exempt(); + } + } + + // Check VAT exemption for EU orders based on VAT number and tax details + if ( ! $is_vat_exempt && apply_filters( 'wpo_wcpdf_order_vat_exempt_fallback_to_customer_vat_number', true, $order ) ) { + $is_eu_order = in_array( + $order->get_billing_country(), + WC()->countries->get_european_union_countries( 'eu_vat' ), + true + ); + + if ( $is_eu_order && $order->get_total() > 0 && $order->get_total_tax() == 0 ) { + $vat_number = wpo_wcpdf_get_order_customer_vat_number( $order ); + $is_vat_exempt = ! empty( $vat_number ); + } + } + + return apply_filters( 'wpo_wcpdf_is_vat_exempt_order', $is_vat_exempt, $order ); +} + +/** + * Retrieve the customer VAT number from order meta. + * + * @param \WC_Abstract_Order $order + * @return string|null + */ +function wpo_wcpdf_get_order_customer_vat_number( \WC_Abstract_Order $order ): ?string { + $vat_meta_keys = apply_filters( 'wpo_wcpdf_order_customer_vat_number_meta_keys', array( + '_vat_number', // WooCommerce EU VAT Number + '_billing_vat_number', // WooCommerce EU VAT Number 2.3.21+ + 'VAT Number', // WooCommerce EU VAT Compliance + '_eu_vat_evidence', // Aelia EU VAT Assistant + '_billing_eu_vat_number', // EU VAT Number for WooCommerce (WP Whale/former Algoritmika) + 'yweu_billing_vat', // YITH WooCommerce EU VAT + 'billing_vat', // German Market + '_billing_vat_id', // Germanized Pro + '_shipping_vat_id', // Germanized Pro (alternative) + '_billing_dic', // EU/UK VAT Manager for WooCommerce + ), $order ); + + $vat_number = null; + + foreach ( $vat_meta_keys as $meta_key ) { + $meta_value = $order->get_meta( $meta_key ); + + // Handle multidimensional VAT data (e.g., Aelia EU VAT Assistant) + if ( '_eu_vat_evidence' === $meta_key && is_array( $meta_value ) ) { + $meta_value = $meta_value['exemption']['vat_number'] ?? ''; + } + + if ( $meta_value ) { + $vat_number = $meta_value; + break; + } + } + + return apply_filters( 'wpo_wcpdf_order_customer_vat_number', $vat_number, $order, $meta_key ?? null ); +}