Plugin Directory

Changeset 3842701


Ignore:
Timestamp:
12/03/2026 02:58:25 PM (less than one hour ago)
Author:
futurebase
Message:

Release Simple Fatoora 4.34.1

Location:
simple-fatoora
Files:
1 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simple-fatoora/tags/4.34.1/includes/class-simpfa-order-financials.php

    r3786986 r3842701  
    199199    $has_zero = count(array_filter($lines, static function ($line) { return $line['rate'] === 0.0; })) > 0;
    200200    $policy = $registered && $has_zero ? self::policy($options, $environment) : null;
     201    $export = $policy && in_array($policy['reason_code'], ['VATEX-SA-32', 'VATEX-SA-33'], true);
     202    // Only new order invoices use the warning for a domestic delivery with
     203    // an inapplicable export default. The ledger passes the frozen invoice template.
     204    if ($export && !isset($template['source_financials']['version']) && $order->get_shipping_country() === 'SA') {
     205      $policy = null;
     206      $export = false;
     207    }
    201208    $payload['zero_vat_version'] = 1;
    202209    $payload['source_financials']['zero_vat'] = $policy;
    203     $export = $policy && in_array($policy['reason_code'], ['VATEX-SA-32', 'VATEX-SA-33'], true)
    204       && count(array_filter($lines, static function ($line) { return $line['rate'] === 0.0; })) > 0;
    205210    if ($export) {
    206211      $use_shipping = (string) $order->get_shipping_country() !== '';
  • simple-fatoora/tags/4.34.1/readme.txt

    r3821560 r3842701  
    44Tested up to: 6.9.4
    55Requires PHP: 7.4
    6 Stable tag: 4.34
     6Stable tag: 4.34.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    101101== Changelog ==
    102102
     103= 4.34.1 =
     104* Improve user experience.
     105
    103106= 4.34 =
    104107* Improve user experience.
  • simple-fatoora/tags/4.34.1/simple-fatoora.php

    r3821560 r3842701  
    55 * Plugin URI: https://simplefatoora.com/
    66 * Description: Adds ZATCA Phase 2 e-invoicing with QR codes to WooCommerce for B2C and B2B VAT invoices.
    7  * Version: 4.34
     7 * Version: 4.34.1
    88 * Author: Future Base
    99 * Author URI: https://futurebase.sa/
    … …  
    2626// -----------------------------------------------------------------------------
    2727if (!defined('SIMPFA_VERSION')) {
    28   define('SIMPFA_VERSION', '4.34');
     28  define('SIMPFA_VERSION', '4.34.1');
    2929}
    3030require_once __DIR__ . '/includes/class-simpfa-order-boundary.php';
  • simple-fatoora/trunk/includes/class-simpfa-order-financials.php

    r3786986 r3842701  
    199199    $has_zero = count(array_filter($lines, static function ($line) { return $line['rate'] === 0.0; })) > 0;
    200200    $policy = $registered && $has_zero ? self::policy($options, $environment) : null;
     201    $export = $policy && in_array($policy['reason_code'], ['VATEX-SA-32', 'VATEX-SA-33'], true);
     202    // Only new order invoices use the warning for a domestic delivery with
     203    // an inapplicable export default. The ledger passes the frozen invoice template.
     204    if ($export && !isset($template['source_financials']['version']) && $order->get_shipping_country() === 'SA') {
     205      $policy = null;
     206      $export = false;
     207    }
    201208    $payload['zero_vat_version'] = 1;
    202209    $payload['source_financials']['zero_vat'] = $policy;
    203     $export = $policy && in_array($policy['reason_code'], ['VATEX-SA-32', 'VATEX-SA-33'], true)
    204       && count(array_filter($lines, static function ($line) { return $line['rate'] === 0.0; })) > 0;
    205210    if ($export) {
    206211      $use_shipping = (string) $order->get_shipping_country() !== '';
  • simple-fatoora/trunk/readme.txt

    r3821560 r3842701  
    44Tested up to: 6.9.4
    55Requires PHP: 7.4
    6 Stable tag: 4.34
     6Stable tag: 4.34.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    101101== Changelog ==
    102102
     103= 4.34.1 =
     104* Improve user experience.
     105
    103106= 4.34 =
    104107* Improve user experience.
  • simple-fatoora/trunk/simple-fatoora.php

    r3821560 r3842701  
    55 * Plugin URI: https://simplefatoora.com/
    66 * Description: Adds ZATCA Phase 2 e-invoicing with QR codes to WooCommerce for B2C and B2B VAT invoices.
    7  * Version: 4.34
     7 * Version: 4.34.1
    88 * Author: Future Base
    99 * Author URI: https://futurebase.sa/
    … …  
    2626// -----------------------------------------------------------------------------
    2727if (!defined('SIMPFA_VERSION')) {
    28   define('SIMPFA_VERSION', '4.34');
     28  define('SIMPFA_VERSION', '4.34.1');
    2929}
    3030require_once __DIR__ . '/includes/class-simpfa-order-boundary.php';
Note: See TracChangeset for help on using the changeset viewer.