Plugin Directory

Changeset 2415367


Ignore:
Timestamp:
11/09/2020 06:34:10 PM (5 years ago)
Author:
jank404
Message:

v1.1.13

Location:
apollo/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apollo/trunk/apollo.php

    r2414415 r2415367  
    44 * Plugin URI:        https://wordpress.org/plugins/apollo
    55 * Description:       Manually or automatically generate invoices and send PDFs as attachments for WooCommerce orders.
    6  * Version:           1.1.12
     6 * Version:           1.1.13
    77 * Author:            Studio404
    88 * Text Domain:       apollo
     
    1414defined( 'ABSPATH' ) or exit;
    1515
    16 define( 'APOLLO_VERSION', '1.1.12' );
     16define( 'APOLLO_VERSION', '1.1.13' );
    1717
    1818function apollo_load_plugin() {
  • apollo/trunk/includes/admin/invoice.php

    r2414415 r2415367  
    7979       
    8080        if($tax_amount > 0) {
    81           $taxes = $item_data->get_taxes();
    82           $tax_rate_id = key($taxes['subtotal']) ?? false;
     81          $taxes = $item_data->get_taxes() ?? [];
     82          $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false;
    8383          $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false;
    8484 
     
    9696
    9797        $sku = $productData->get_sku();
     98        // error_log( print_r($sku, TRUE) );
    9899
    99100        // add SKU code if item has one
     
    132133
    133134        if($tax_amount > 0) {
    134           $taxes = $item_shipping->get_taxes();
    135           $tax_rate_id = key($taxes['subtotal']) ?? false;
     135          $taxes = $item_shipping->get_taxes() ?? [];
     136          $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false;
    136137          $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false;
    137138 
     
    161162
    162163        if($tax_amount > 0) {
    163           $taxes = $item_fee->get_taxes();
    164           $tax_rate_id = key($taxes['subtotal']) ?? false;
     164          $taxes = $item_fee->get_taxes() ?? [];
     165          $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false;
    165166          $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false;
    166167 
     
    211212      }
    212213
     214      // error_log( print_r($order_data, TRUE) );
    213215      // if fiscalization is enabled and we making invoice, add the fiscalization data
    214216      if ($fiscalization && $type === 'invoice') {
  • apollo/trunk/readme.txt

    r2414415 r2415367  
    8585
    8686== Changelog ==
     87= 1.1.13 - November 9, 2020 =
     88
     89- Fixed: Shipping tax rate calculation
     90
    8791= 1.1.12 - November 7, 2020 =
    8892
Note: See TracChangeset for help on using the changeset viewer.