Plugin Directory

Changeset 3179273


Ignore:
Timestamp:
10/31/2024 08:11:03 AM (16 months ago)
Author:
matrixaddons
Message:

Update to version 1.1.3 from GitHub

Location:
easy-invoice
Files:
12 added
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-invoice/tags/1.1.3/changelog.txt

    r3038017 r3179273  
     1= 1.1.2 - 2024-02-19 =
     2* Fixed - Readme update
     3
    14= 1.1.1 - 2024-02-17 =
    25* Fixed - Astra Compatibility fixed
  • easy-invoice/tags/1.1.3/easy-invoice.php

    r3038017 r3179273  
    66 * Author: MatrixAddons
    77 * Author URI: https://profiles.wordpress.org/matrixaddons
    8  * Version: 1.1.2
     8 * Version: 1.1.3
    99 * License: GPL2+
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
  • easy-invoice/tags/1.1.3/includes/Admin/FieldItems/Editor.php

    r2801615 r3179273  
    2424            );
    2525            $editor_id = $field_name . '_id';
     26
     27            $value = $value == null ? "" : $value;
    2628
    2729            wp_editor($value, $editor_id, $settings);
  • easy-invoice/tags/1.1.3/includes/Admin/Settings/InvoiceSettings.php

    r3024036 r3179273  
    8989            ),
    9090
    91 
     91            array(
     92                'title' => __('Last Invoice Number', 'easy-invoice'),
     93                'id' => 'easy_invoice_invoice_number',
     94                'type' => 'number',
     95                'default' => 0
     96            ),
    9297            array(
    9398                'title' => __('Show/Hide Adjust Field', 'easy-invoice'),
  • easy-invoice/tags/1.1.3/includes/Admin/Settings/QuoteSettings.php

    r3024036 r3179273  
    8888                'default' => 'EIQN_'
    8989            ),
    90 
     90            array(
     91                'title' => __('Last Quote Number', 'easy-invoice'),
     92                'id' => 'easy_invoice_quote_number',
     93                'type' => 'number',
     94                'default' => 0
     95            ),
    9196
    9297            array(
  • easy-invoice/tags/1.1.3/includes/Helpers/invoice.php

    r3024036 r3179273  
    8989        $prefix = get_option('easy_invoice_number_prefix', 'EIN_');
    9090
    91         update_option('easy_invoice_invoice_number', absint($invoice_number));
     91        //update_option('easy_invoice_invoice_number', absint($invoice_number));
    9292
    9393        if (is_string($prefix)) {
  • easy-invoice/tags/1.1.3/includes/Helpers/quote.php

    r3024036 r3179273  
    4747        $prefix = get_option('easy_invoice_quote_number_prefix', 'EIQN_');
    4848
    49         update_option('easy_invoice_quote_number', absint($quote_number));
     49        //update_option('easy_invoice_quote_number', absint($quote_number));
    5050
    5151        if (is_string($prefix)) {
  • easy-invoice/tags/1.1.3/includes/Helpers/template.php

    r3037063 r3179273  
    117117        $today = current_time('timestamp');
    118118
    119         $due_and_valid_date = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_due_date() : $quote->get_valid_until();
    120 
    121         $due_amount = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_due_amount() : $quote->get_due_amount();
    122 
    123         $client_name = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_client_name() : $quote->get_client_name();
     119        $due_and_valid_date = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_due_date() : $quote->get_valid_until();
     120
     121        $due_amount = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_due_amount() : $quote->get_due_amount();
     122
     123        $client_name = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_client_name() : $quote->get_client_name();
    124124
    125125        $due_date = $due_and_valid_date !== '' ? strtotime($due_and_valid_date) : 0;
  • easy-invoice/tags/1.1.3/includes/Main.php

    r3024036 r3179273  
    7474        Hooker::init();
    7575        Email::init();
     76        Cron::init();
     77        Background::init();
    7678        PaymentGatewayLoader::instance()->init();
    7779
  • easy-invoice/tags/1.1.3/includes/Meta/Invoice.php

    r3037063 r3179273  
    234234    }
    235235
     236    public function first_publish($new, $old, $post)
     237    {
     238        if ($post->post_type != Constant::INVOICE_POST_TYPE) {
     239            return;
     240        }
     241        if ($new == 'publish' && $old != 'publish' && isset($post->post_type)) {
     242
     243            $invoice_number = absint(get_option('easy_invoice_invoice_number', 0));
     244
     245            $invoice_number = $invoice_number + 1;
     246
     247            $invoice_number = $invoice_number < 1 ? 1 : $invoice_number;
     248
     249            update_option('easy_invoice_invoice_number', absint($invoice_number));
     250
     251        }
     252
     253    }
     254
    236255    public static function init()
    237256    {
     
    242261        add_action('admin_enqueue_scripts', array($self, 'scripts'), 10);
    243262        add_action('do_meta_boxes', array($self, 'remove_metabox'), 1, 3);
     263        add_action('transition_post_status', array($self, 'first_publish'), 10, 3);
     264
    244265    }
    245266
  • easy-invoice/tags/1.1.3/includes/Meta/Quote.php

    r3037063 r3179273  
    260260    }
    261261
     262    public function first_publish($new, $old, $post)
     263    {
     264        if ($post->post_type != Constant::QUOTE_POST_TYPE) {
     265            return;
     266        }
     267        if ($new == 'publish' && $old != 'publish' && isset($post->post_type)) {
     268
     269            $quote_number = absint(get_option('easy_invoice_quote_number', 0));
     270
     271            $quote_number = $quote_number + 1;
     272
     273            $quote_number = $quote_number < 1 ? 1 : $quote_number;
     274
     275            update_option('easy_invoice_quote_number', absint($quote_number));
     276
     277        }
     278
     279    }
     280
    262281    public static function init()
    263282    {
     
    268287        add_action('admin_enqueue_scripts', array($self, 'scripts'), 10);
    269288        add_action('do_meta_boxes', array($self, 'remove_metabox'), 1, 3);
     289        add_action('transition_post_status', array($self, 'first_publish'), 10, 3);
     290
    270291    }
    271292
  • easy-invoice/tags/1.1.3/readme.txt

    r3038017 r3179273  
    33Tags: invoice, pdf invoice, quotes, WordPress invoice
    44Requires at least: 5.4
    5 Tested up to: 6.4
     5Tested up to: 6.7
    66Requires PHP: 5.6
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88License: GPLv3
    99License URI: https://opensource.org/licenses/GPL-3.0
     
    102102== Changelog ==
    103103
    104 = 1.1.2 - 2024-02-19 =
    105 * Fixed - Readme update
     104= 1.1.3 - 2024-10-31 =
     105* Fixed - Email issue fixed
     106* fixed - version compatibility
  • easy-invoice/trunk/changelog.txt

    r3038017 r3179273  
     1= 1.1.2 - 2024-02-19 =
     2* Fixed - Readme update
     3
    14= 1.1.1 - 2024-02-17 =
    25* Fixed - Astra Compatibility fixed
  • easy-invoice/trunk/easy-invoice.php

    r3038017 r3179273  
    66 * Author: MatrixAddons
    77 * Author URI: https://profiles.wordpress.org/matrixaddons
    8  * Version: 1.1.2
     8 * Version: 1.1.3
    99 * License: GPL2+
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
  • easy-invoice/trunk/includes/Admin/FieldItems/Editor.php

    r2801615 r3179273  
    2424            );
    2525            $editor_id = $field_name . '_id';
     26
     27            $value = $value == null ? "" : $value;
    2628
    2729            wp_editor($value, $editor_id, $settings);
  • easy-invoice/trunk/includes/Admin/Settings/InvoiceSettings.php

    r3024036 r3179273  
    8989            ),
    9090
    91 
     91            array(
     92                'title' => __('Last Invoice Number', 'easy-invoice'),
     93                'id' => 'easy_invoice_invoice_number',
     94                'type' => 'number',
     95                'default' => 0
     96            ),
    9297            array(
    9398                'title' => __('Show/Hide Adjust Field', 'easy-invoice'),
  • easy-invoice/trunk/includes/Admin/Settings/QuoteSettings.php

    r3024036 r3179273  
    8888                'default' => 'EIQN_'
    8989            ),
    90 
     90            array(
     91                'title' => __('Last Quote Number', 'easy-invoice'),
     92                'id' => 'easy_invoice_quote_number',
     93                'type' => 'number',
     94                'default' => 0
     95            ),
    9196
    9297            array(
  • easy-invoice/trunk/includes/Helpers/invoice.php

    r3024036 r3179273  
    8989        $prefix = get_option('easy_invoice_number_prefix', 'EIN_');
    9090
    91         update_option('easy_invoice_invoice_number', absint($invoice_number));
     91        //update_option('easy_invoice_invoice_number', absint($invoice_number));
    9292
    9393        if (is_string($prefix)) {
  • easy-invoice/trunk/includes/Helpers/quote.php

    r3024036 r3179273  
    4747        $prefix = get_option('easy_invoice_quote_number_prefix', 'EIQN_');
    4848
    49         update_option('easy_invoice_quote_number', absint($quote_number));
     49        //update_option('easy_invoice_quote_number', absint($quote_number));
    5050
    5151        if (is_string($prefix)) {
  • easy-invoice/trunk/includes/Helpers/template.php

    r3037063 r3179273  
    117117        $today = current_time('timestamp');
    118118
    119         $due_and_valid_date = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_due_date() : $quote->get_valid_until();
    120 
    121         $due_amount = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_due_amount() : $quote->get_due_amount();
    122 
    123         $client_name = get_post_type($object_id) == Constant::QUOTE_POST_TYPE ? $invoice->get_client_name() : $quote->get_client_name();
     119        $due_and_valid_date = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_due_date() : $quote->get_valid_until();
     120
     121        $due_amount = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_due_amount() : $quote->get_due_amount();
     122
     123        $client_name = get_post_type($object_id) != Constant::QUOTE_POST_TYPE ? $invoice->get_client_name() : $quote->get_client_name();
    124124
    125125        $due_date = $due_and_valid_date !== '' ? strtotime($due_and_valid_date) : 0;
  • easy-invoice/trunk/includes/Main.php

    r3024036 r3179273  
    7474        Hooker::init();
    7575        Email::init();
     76        Cron::init();
     77        Background::init();
    7678        PaymentGatewayLoader::instance()->init();
    7779
  • easy-invoice/trunk/includes/Meta/Invoice.php

    r3037063 r3179273  
    234234    }
    235235
     236    public function first_publish($new, $old, $post)
     237    {
     238        if ($post->post_type != Constant::INVOICE_POST_TYPE) {
     239            return;
     240        }
     241        if ($new == 'publish' && $old != 'publish' && isset($post->post_type)) {
     242
     243            $invoice_number = absint(get_option('easy_invoice_invoice_number', 0));
     244
     245            $invoice_number = $invoice_number + 1;
     246
     247            $invoice_number = $invoice_number < 1 ? 1 : $invoice_number;
     248
     249            update_option('easy_invoice_invoice_number', absint($invoice_number));
     250
     251        }
     252
     253    }
     254
    236255    public static function init()
    237256    {
     
    242261        add_action('admin_enqueue_scripts', array($self, 'scripts'), 10);
    243262        add_action('do_meta_boxes', array($self, 'remove_metabox'), 1, 3);
     263        add_action('transition_post_status', array($self, 'first_publish'), 10, 3);
     264
    244265    }
    245266
  • easy-invoice/trunk/includes/Meta/Quote.php

    r3037063 r3179273  
    260260    }
    261261
     262    public function first_publish($new, $old, $post)
     263    {
     264        if ($post->post_type != Constant::QUOTE_POST_TYPE) {
     265            return;
     266        }
     267        if ($new == 'publish' && $old != 'publish' && isset($post->post_type)) {
     268
     269            $quote_number = absint(get_option('easy_invoice_quote_number', 0));
     270
     271            $quote_number = $quote_number + 1;
     272
     273            $quote_number = $quote_number < 1 ? 1 : $quote_number;
     274
     275            update_option('easy_invoice_quote_number', absint($quote_number));
     276
     277        }
     278
     279    }
     280
    262281    public static function init()
    263282    {
     
    268287        add_action('admin_enqueue_scripts', array($self, 'scripts'), 10);
    269288        add_action('do_meta_boxes', array($self, 'remove_metabox'), 1, 3);
     289        add_action('transition_post_status', array($self, 'first_publish'), 10, 3);
     290
    270291    }
    271292
  • easy-invoice/trunk/readme.txt

    r3038017 r3179273  
    33Tags: invoice, pdf invoice, quotes, WordPress invoice
    44Requires at least: 5.4
    5 Tested up to: 6.4
     5Tested up to: 6.7
    66Requires PHP: 5.6
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88License: GPLv3
    99License URI: https://opensource.org/licenses/GPL-3.0
     
    102102== Changelog ==
    103103
    104 = 1.1.2 - 2024-02-19 =
    105 * Fixed - Readme update
     104= 1.1.3 - 2024-10-31 =
     105* Fixed - Email issue fixed
     106* fixed - version compatibility
Note: See TracChangeset for help on using the changeset viewer.