Changeset 3187721
- Timestamp:
- 11/13/2024 02:35:10 PM (16 months ago)
- Location:
- woocommerce-pdf-invoices-italian-add-on
- Files:
-
- 39 added
- 4 edited
-
tags/0.7.6.1 (added)
-
tags/0.7.6.1/images (added)
-
tags/0.7.6.1/images/agenziaEntrate_logo.png (added)
-
tags/0.7.6.1/images/invoice_width.png (added)
-
tags/0.7.6.1/images/logo2.png (added)
-
tags/0.7.6.1/images/receipt.png (added)
-
tags/0.7.6.1/images/receipt.svg (added)
-
tags/0.7.6.1/includes (added)
-
tags/0.7.6.1/includes/checkout.js (added)
-
tags/0.7.6.1/includes/class-wc-settings-callbacks.php (added)
-
tags/0.7.6.1/includes/class-wc-settings-fpa.php (added)
-
tags/0.7.6.1/includes/class-wc-settings-general.php (added)
-
tags/0.7.6.1/includes/class-wc-settings-invoice-template.php (added)
-
tags/0.7.6.1/includes/class-wc-settings-premium.php (added)
-
tags/0.7.6.1/includes/class-wc-settings.php (added)
-
tags/0.7.6.1/includes/class-wcpdf-integration.php (added)
-
tags/0.7.6.1/includes/class-wcpdf-integration2.php (added)
-
tags/0.7.6.1/includes/class-wcpdf-integration3.php (added)
-
tags/0.7.6.1/includes/class-wcpdf-receipt-document.php (added)
-
tags/0.7.6.1/includes/class_wc_update_db.php (added)
-
tags/0.7.6.1/includes/order-script.js (added)
-
tags/0.7.6.1/includes/order-styles.css (added)
-
tags/0.7.6.1/includes/wcpdf-it-functions.php (added)
-
tags/0.7.6.1/languages (added)
-
tags/0.7.6.1/languages/woocommerce-pdf-italian-add-on-it_IT.mo (added)
-
tags/0.7.6.1/languages/woocommerce-pdf-italian-add-on-it_IT.po (added)
-
tags/0.7.6.1/languages/woocommerce-pdf-italian-add-on.pot (added)
-
tags/0.7.6.1/readme.txt (added)
-
tags/0.7.6.1/templates (added)
-
tags/0.7.6.1/templates/pdf (added)
-
tags/0.7.6.1/templates/pdf/Business (added)
-
tags/0.7.6.1/templates/pdf/Business/receipt.php (added)
-
tags/0.7.6.1/templates/pdf/Modern (added)
-
tags/0.7.6.1/templates/pdf/Modern/receipt.php (added)
-
tags/0.7.6.1/templates/pdf/Simple (added)
-
tags/0.7.6.1/templates/pdf/Simple Premium (added)
-
tags/0.7.6.1/templates/pdf/Simple Premium/receipt.php (added)
-
tags/0.7.6.1/templates/pdf/Simple/receipt.php (added)
-
tags/0.7.6.1/woocommerce-pdf-italian-add-on.php (added)
-
trunk/includes/class-wcpdf-integration2.php (modified) (2 diffs)
-
trunk/includes/class-wcpdf-integration3.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/woocommerce-pdf-italian-add-on.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-pdf-invoices-italian-add-on/trunk/includes/class-wcpdf-integration2.php
r3183768 r3187721 19 19 add_action( 'admin_enqueue_scripts', array( $this, 'wcpdf_admin_enqueue_scripts' ) ); 20 20 add_filter( 'wpo_wcpdf_document_classes', array( $this, 'wcpdf_register_documents' ), 10, 1 ); 21 add_action( 'wpo_wcpdf_after_order_details', array( $this, 'wcpdf_after_order_details' ), 10, 2 );22 21 23 22 add_filter( 'manage_edit-shop_order_columns', array( $this, 'add_receipt_number_column' ), 999 ); … … 288 287 } 289 288 290 function wcpdf_after_order_details($type, $order) {291 if($type === "invoice" || $type === "receipt") {292 $country = $order->get_billing_country();293 $taxes = $order->get_total_tax();294 //controlla solo se l'IVA è 0 e non se vat_exempt_if_UE_business = true perché potrebbero essere cambiate le condizioni di esenzione.295 if($taxes == 0) {296 if($country == WCPDF_IT()->default_country) {297 if(!empty(WCPDF_IT()->options["txtVatExempt"])){298 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExempt"><strong>' . WCPDF_IT()->options["txtVatExempt"] . '</strong></div>';299 }300 } else {301 $is_UE = in_array($country, WCPDF_IT()->eu_vat_countries);302 $azienda = (wcpdf_it_get_billing_customer_type($order) == "business" || wcpdf_it_get_billing_invoice_type($order) == "invoice");303 if($is_UE) {304 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExemptUE"><strong>' . WCPDF_IT()->options["txtVatExemptUE"] . '</strong></div>';305 } else {306 if($azienda || !empty(WCPDF_IT()->options["txtVatExempt"])) {307 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExemptExtraUE"><strong>' . WCPDF_IT()->options["txtVatExemptExtraUE"] . '</strong></div>';308 }309 }310 }311 }312 }313 }314 315 289 public function add_receipt_number_column( $columns ) { 316 290 $receipt = wcpdf_get_document( 'receipt', null ); -
woocommerce-pdf-invoices-italian-add-on/trunk/includes/class-wcpdf-integration3.php
r3183768 r3187721 23 23 add_action( 'admin_enqueue_scripts', array( $this, 'wcpdf_admin_enqueue_scripts' ) ); 24 24 add_filter( 'wpo_wcpdf_document_classes', array( $this, 'wcpdf_register_documents' ), 10, 1 ); 25 add_action( 'wpo_wcpdf_after_order_details', array( $this, 'wcpdf_after_order_details' ), 10, 2 );26 25 27 26 if($this->receipt_columns_enabled()) { … … 432 431 } 433 432 434 function wcpdf_after_order_details($type, $order) {435 if($type === "invoice" || $type === "receipt") {436 $country = $order->get_billing_country();437 $taxes = $order->get_total_tax();438 //controlla solo se l'IVA è 0 e non se vat_exempt_if_UE_business = true perché potrebbero essere cambiate le condizioni di esenzione.439 if($taxes == 0) {440 if($country == WCPDF_IT()->default_country) {441 if(!empty(WCPDF_IT()->options["txtVatExempt"])){442 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExempt"><strong>' . WCPDF_IT()->options["txtVatExempt"] . '</strong></div>';443 }444 } else {445 $is_UE = in_array($country, WCPDF_IT()->eu_vat_countries);446 $azienda = (wcpdf_it_get_billing_customer_type($order) == "business" || wcpdf_it_get_billing_invoice_type($order) == "invoice");447 if($is_UE) {448 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExemptUE"><strong>' . WCPDF_IT()->options["txtVatExemptUE"] . '</strong></div>';449 } else {450 if($azienda || !empty(WCPDF_IT()->options["txtVatExempt"])) {451 echo '<div class"wcpdf_IT_txtVatExempt wcpdf_IT_VatExemptExtraUE"><strong>' . WCPDF_IT()->options["txtVatExemptExtraUE"] . '</strong></div>';452 }453 }454 }455 }456 }457 }458 459 433 public function add_receipt_number_column( $columns ) { 460 434 $receipt = wcpdf_get_document( 'receipt', null ); -
woocommerce-pdf-invoices-italian-add-on/trunk/readme.txt
r3183768 r3187721 4 4 Requires at least: 4.4 5 5 Requires PHP: 8.0 6 Tested up to: 6. 6.27 Stable tag: 0.7.6 6 Tested up to: 6.7 7 Stable tag: 0.7.6.1 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl.html … … 107 107 == Changelog == 108 108 109 = 0.7.5 - 0.7.6 - 2024-11-07=109 = 0.7.5 - 0.7.6.1 - 2024-11-13 = 110 110 * Verifica compatibilità con WooCommerce 9.3.3 111 111 * Verifica compatibilità con PDF Invoices & Packing Slips for WooCommerce 3.9.0 … … 269 269 == Upgrade Notice == 270 270 271 = 0.7.5 - 0.7.6 - 2024-11-07=271 = 0.7.5 - 0.7.6.1 - 2024-11-13 = 272 272 * Verifica compatibilità con WooCommerce 9.3.3 273 273 * Verifica compatibilità con PDF Invoices & Packing Slips for WooCommerce 3.9.0 -
woocommerce-pdf-invoices-italian-add-on/trunk/woocommerce-pdf-italian-add-on.php
r3183768 r3187721 4 4 * Plugin URI: https://ldav.it/plugin/woocommerce-pdf-invoices-italian-add-on/ 5 5 * Description: Aggiunge a WooCommerce tutto il necessario per un e-commerce italiano e la fatturazione elettronica 6 * Version: 0.7.6 6 * Version: 0.7.6.1 7 7 * Author: laboratorio d'Avanguardia 8 8 * Author URI: https://ldav.it/ … … 13 13 * Requires Plugins: woocommerce 14 14 * WC requires at least: 8.0 15 * WC tested up to: 9. 3.315 * WC tested up to: 9.4.1 16 16 */ 17 17 … … 26 26 public static $plugin_path; 27 27 public static $plugin_basename; 28 public $version = '0.7.6 ';28 public $version = '0.7.6.1'; 29 29 protected static $instance = null; 30 30
Note: See TracChangeset
for help on using the changeset viewer.