Plugin Directory

Changeset 2112711


Ignore:
Timestamp:
06/26/2019 11:34:32 AM (7 years ago)
Author:
mslsantos
Message:

Fix.

Location:
woo-masterway/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • woo-masterway/trunk/readme.txt

    r2102340 r2112711  
    2828
    2929== Changelog ==
     30
     31= 1.0.12 =
     32* Fix.
    3033
    3134= 1.0.11 =
  • woo-masterway/trunk/woocommerce-masterway.php

    r2102340 r2112711  
    44Plugin URI: http://woothemes.com/woocommerce
    55Description:  Allows you to invoice your clients using Masterway
    6 Version: 1.0.11
     6Version: 1.0.12
    77Author: Masterway
    88Author URI: http://masterway.net
     
    406406                        $EntityName = $order->billing_first_name." ".$order->billing_last_name;
    407407                        $EntityTypeCode='CN';
    408                         $TaxID = $order->billing_nif;
    409408                       
    410409                        $TaxID = trim($order->billing_eu_vat_number);
     
    416415                        else
    417416                        {
     417                            $TaxID = trim($order->get_meta('vat_number'));
     418                            if($TaxID)
     419                            {
     420                                $order->billing_country = $order->get_meta('_vat_country');
     421                                $TaxID = substr($TaxID, 2);
     422                            }
     423                        }
     424                        if(!$TaxID)
     425                        {
    418426                            $TaxID = trim($order->billing_nif);
    419                         }
     427                        }   
    420428                       
    421429                        if(!$TaxID){
     
    635643                            //TaxCode
    636644                            //CALC PRECO SEM IVA PARA ENVIAR
    637                             if($TaxStatus=='taxable' && $TaxClass!='zero-rate'){
     645                            if($TaxStatus=='taxable' && $TaxClass!='zero-rate' && $VATType != 'I'){
    638646                                if($TaxClass==''){
    639647                                    $TaxCode='NOR';
     
    693701                            $ProductInventoryType='M';
    694702                            $ExemptionReasonCode='';
    695                             $TaxCode='NOR';
    696                            
    697                            
    698                             $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
    699                             $Taxa=($Taxa/100)+1;
    700                             //$UnitPrice=(float)($UnitPrice/$Taxa);
     703                           
     704                           
     705                            if($TaxStatus=='taxable' && $TaxClass!='zero-rate' && $VATType != 'I'){
     706                                if($TaxClass==''){
     707                                    $TaxCode='NOR';
     708                                    $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
     709                                }
     710                                if($TaxClass=='reduced-rate'){
     711                                    $TaxCode='RED';
     712                                    $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
     713                                }
     714                                $Taxa=($Taxa/100)+1;
     715                                //$UnitPrice=(float)($UnitPrice/$Taxa);
     716                            }else{
     717                                $TaxCode='ISE';
     718                                $ExemptionReasonCode='17';
     719                            }
    701720               
    702721                            $field_S02_1_1_11_1 = $field_S02_1_1_11->addChild('ProductLine');
     
    733752                            $ProductInventoryType='M';
    734753                            $ExemptionReasonCode='';
    735                             $TaxCode='NOR';
    736                            
    737                             $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
    738                             $Taxa=($Taxa/100)+1;
    739                             //$UnitPrice=(float)($UnitPrice/$Taxa);
     754                           
     755                            if($TaxStatus=='taxable' && $TaxClass!='zero-rate' && $VATType != 'I'){
     756                                if($TaxClass==''){
     757                                    $TaxCode='NOR';
     758                                    $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
     759                                }
     760                                if($TaxClass=='reduced-rate'){
     761                                    $TaxCode='RED';
     762                                    $Taxa=$MasterwayRequest->get_tax_percentage($CompanyCode, $DocumentDate, $TaxCode, $TaxRegion);
     763                                }
     764                                $Taxa=($Taxa/100)+1;
     765                                //$UnitPrice=(float)($UnitPrice/$Taxa);
     766                            }else{
     767                                $TaxCode='ISE';
     768                                $ExemptionReasonCode='17';
     769                            }
    740770                           
    741771                           
Note: See TracChangeset for help on using the changeset viewer.