Plugin Directory

Changeset 3187721


Ignore:
Timestamp:
11/13/2024 02:35:10 PM (16 months ago)
Author:
labdav
Message:

v.0.7.6.1

Location:
woocommerce-pdf-invoices-italian-add-on
Files:
39 added
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-pdf-invoices-italian-add-on/trunk/includes/class-wcpdf-integration2.php

    r3183768 r3187721  
    1919        add_action( 'admin_enqueue_scripts', array( $this, 'wcpdf_admin_enqueue_scripts' ) );
    2020        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 );
    2221
    2322        add_filter( 'manage_edit-shop_order_columns', array( $this, 'add_receipt_number_column' ), 999 );
     
    288287    }
    289288
    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 
    315289    public function add_receipt_number_column( $columns ) {
    316290        $receipt = wcpdf_get_document( 'receipt', null );
  • woocommerce-pdf-invoices-italian-add-on/trunk/includes/class-wcpdf-integration3.php

    r3183768 r3187721  
    2323        add_action( 'admin_enqueue_scripts', array( $this, 'wcpdf_admin_enqueue_scripts' ) );
    2424        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 );
    2625
    2726        if($this->receipt_columns_enabled()) {
     
    432431    }
    433432
    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 
    459433    public function add_receipt_number_column( $columns ) {
    460434        $receipt = wcpdf_get_document( 'receipt', null );
  • woocommerce-pdf-invoices-italian-add-on/trunk/readme.txt

    r3183768 r3187721  
    44Requires at least: 4.4
    55Requires PHP: 8.0
    6 Tested up to: 6.6.2
    7 Stable tag: 0.7.6
     6Tested up to: 6.7
     7Stable tag: 0.7.6.1
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl.html
     
    107107== Changelog ==
    108108
    109 = 0.7.5 - 0.7.6 - 2024-11-07 =
     109= 0.7.5 - 0.7.6.1 - 2024-11-13 =
    110110* Verifica compatibilità con WooCommerce 9.3.3
    111111* Verifica compatibilità con PDF Invoices & Packing Slips for WooCommerce 3.9.0
     
    269269== Upgrade Notice ==
    270270
    271 = 0.7.5 - 0.7.6 - 2024-11-07 =
     271= 0.7.5 - 0.7.6.1 - 2024-11-13 =
    272272* Verifica compatibilità con WooCommerce 9.3.3
    273273* 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  
    44* Plugin URI: https://ldav.it/plugin/woocommerce-pdf-invoices-italian-add-on/
    55* 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
    77* Author: laboratorio d'Avanguardia
    88* Author URI: https://ldav.it/
     
    1313* Requires Plugins: woocommerce
    1414* WC requires at least: 8.0
    15 * WC tested up to: 9.3.3
     15* WC tested up to: 9.4.1
    1616*/
    1717
     
    2626    public static $plugin_path;
    2727    public static $plugin_basename;
    28     public $version = '0.7.6';
     28    public $version = '0.7.6.1';
    2929    protected static $instance = null;
    3030   
Note: See TracChangeset for help on using the changeset viewer.