Plugin Directory

Changeset 3034761


Ignore:
Timestamp:
02/12/2024 06:11:25 PM (2 years ago)
Author:
primersoftware
Message:

Update

Location:
primer-mydata
Files:
2154 added
4 edited

Legend:

Unmodified
Added
Removed
  • primer-mydata/trunk/README.txt

    r3025280 r3034761  
    33Tags: MyData, Primer, receipts, Greece, invoices, Primer MyData
    44Requires at least: 5.3
    5 Tested up to: 6.4.2
     5Tested up to: 6.4.3
    66Requires PHP: 7.4
    7 Stable tag: 4.1.3
     7Stable tag: 4.1.4
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7474== Changelog ==
    7575
    76 = 1.3.3 - 2022-01-31 =
    77 * First version.
    78 = 1.7.6 - 2022-03-17 =
    79 * New Invoice types: Credit Invoices. Now you can cancel your invoice with a credit invoice-receipt.
    80 * VAT validation in checkout: Now your customers can enter their vat number and the rest information will be autocompleted.
    81 * Big Performance upgrades in orders page
    82 * New Mail smtp type: Now you can use the wordpress default smtp to send emails from the plugin.
    83 * Accept other currencies (according to woocommerce currency)
    84 * Minor functionality fixes
    85 * Your customers can now see their invoices-receipts in my account page.
    86 = 1.7.7 - 2022-03-22 =
    87 * Minor Fixes
    88 = 1.9.0 - 2022-04-12 =
    89 * Major Performace Fixes
    90 * Now you can export by dates and show totals in the last row
    91 * Add Notes in Invoice comment section
    92 = 1.9.3 - 2022-05-19 =
    93 * Major Performace Fixes
    94 * Fix for plugin to be compatible with php version 8.0 and above
    95 * Fix for rounding issue with woocommerce orders
    96 * Added product metadata in the html product name
    97 = 1.9.4 - 2022-06-21 =
    98 * Fixed Minor Bugs during issueing receipts
    99 * Added feauture to Export for showing vat amount per tax rate
    100 * Fixed Minor Bugs for automation cron
    101 = 1.9.5 - 2022-07-07 =
    102 * Fixed Minor Bugs during issueing receipts
    103 * Informative Email when during automation when there is a major error
    104 * New feuture for mass searching Invoices through our website with a password in License and General Settings.
    105 = 1.9.8 - 2022-09-23 =
    106 * Fixed Minor Bugs during issueing receipts
    107 * Fixed search filters functionalities
    108 * Fixed issueing receipts automation bugs
    109 = 2.0.0 - 2022-09-23 =
    110 * Fixed Compatability with PHP 8.0 and PHP 8.1
    111 = 2.0.1 - 2022-10-27 =
    112 * Fixed minus sign for cancelled receipts in export-excel
    113 * Fixed thousand-decimal separators in export-excel
    114 = 2.0.2 - 2022-11-04 =
    115 * New search box in orders page for search by order id
    116 * Minus bug fixes
    117 = 2.0.3 - 2022-11-06 =
    118 * Minus bug fixes
     76= 4.1.4 - 2024-02-12 =
     77* Minor Bug Fixes
     78= 4.1.3 - 2024-01-19 =
     79* Minor Bug Fixes
     80= 4.1.2 - 2024-01-16 =
     81* Minor Bug Fixes
     82= 4.1.1 - 2023-12-12 =
     83* Minor Bug Fixes
     84= 4.1.0 - 2023-10-27 =
     85* Minor Bug Fixes
     86= 4.0.9 - 2023-10-17 =
     87* Minor Bug Fixes
     88= 4.0.8 - 2023-09-29 =
     89* Minor Bug Fixes
     90= 4.0.7 - 2023-08-02 =
     91* Minor Bug Fixes
     92= 4.0.6 - 2023-08-01 =
     93* Minor Bug Fixes
     94= 4.0.5 - 2023-07-28 =
     95* Minor Bug Fixes
     96= 4.0.4 - 2023-07-20 =
     97* Minor Bug Fixes
     98= 4.0.3 - 2023-07-17 =
     99* Minor Bug Fixes
     100= 4.0.0 - 2023-05-16 =
     101* New beta version
     102= 2.0.6 - 2022-11-23 =
     103* Minor Bug Fixes
     104= 2.0.5 - 2022-11-21 =
     105* Minor Bug Fixes
     106* Added a new feature that now you can select how many invoices will be issued foreach run of automation
     107* Added a new feature that now you can change only for one time your company details for foreign invoice template
    119108= 2.0.4 - 2022-11-10 =
    120109* Minor Bug Fixes
    121110* Added a new feature that now you can select how many products you want per page on the receipt to be shown
    122111* Added new error messages for orders with deleted products and clients that cannot be issued
    123 = 2.0.5 - 2022-11-21 =
    124 * Minor Bug Fixes
    125 * Added a new feature that now you can select how many invoices will be issued foreach run of automation
    126 * Added a new feature that now you can change only for one time your company details for foreign invoice template
    127 = 2.0.6 - 2022-11-23 =
    128 * Minor Bug Fixes
    129 = 4.0.0 - 2023-05-16 =
    130 * New beta version
    131 = 4.0.3 - 2023-07-17 =
    132 * Minor Bug Fixes
    133 = 4.0.4 - 2023-07-20 =
    134 * Minor Bug Fixes
    135 = 4.0.5 - 2023-07-28 =
    136 * Minor Bug Fixes
    137 = 4.0.6 - 2023-08-01 =
    138 * Minor Bug Fixes
    139 = 4.0.7 - 2023-08-02 =
    140 * Minor Bug Fixes
    141 = 4.0.8 - 2023-09-29 =
    142 * Minor Bug Fixes
    143 = 4.0.9 - 2023-10-17 =
    144 * Minor Bug Fixes
    145 = 4.1.0 - 2023-10-27 =
    146 * Minor Bug Fixes
    147 = 4.1.1 - 2023-12-12 =
    148 * Minor Bug Fixes
    149 = 4.1.2 - 2024-01-16 =
    150 * Minor Bug Fixes
    151 = 4.1.3 - 2024-01-19 =
    152 * Minor Bug Fixes
     112= 2.0.3 - 2022-11-06 =
     113* Minus bug fixes
     114= 2.0.2 - 2022-11-04 =
     115* Minus bug fixes
     116* New search box in orders page for search by order id
     117= 2.0.1 - 2022-10-27 =
     118* Fixed thousand-decimal separators in export-excel
     119* Fixed minus sign for cancelled receipts in export-excel
     120= 2.0.0 - 2022-09-23 =
     121* Fixed Compatability with PHP 8.0 and PHP 8.1
     122= 1.9.8 - 2022-09-23 =
     123* Fixed issueing receipts automation bugs
     124* Fixed search filters functionalities
     125* Fixed Minor Bugs during issueing receipts
     126= 1.9.5 - 2022-07-07 =
     127* New feuture for mass searching Invoices through our website with a password in License and General Settings.
     128* Informative Email when during automation when there is a major error
     129* Fixed Minor Bugs during issueing receipts
     130= 1.9.4 - 2022-06-21 =
     131* Fixed Minor Bugs for automation cron
     132* Added feauture to Export for showing vat amount per tax rate
     133* Fixed Minor Bugs during issueing receipts
     134= 1.9.3 - 2022-05-19 =
     135* Added product metadata in the html product name
     136* Fix for rounding issue with woocommerce orders
     137* Fix for plugin to be compatible with php version 8.0 and above
     138* Major Performace Fixes
     139= 1.9.0 - 2022-04-12 =
     140* Add Notes in Invoice comment section
     141* Now you can export by dates and show totals in the last row
     142* Major Performace Fixes
     143= 1.7.7 - 2022-03-22 =
     144* Minor Fixes
     145= 1.7.6 - 2022-03-17 =
     146* Your customers can now see their invoices-receipts in my account page.
     147* Minor functionality fixes
     148* Accept other currencies (according to woocommerce currency)
     149* New Mail smtp type: Now you can use the wordpress default smtp to send emails from the plugin.
     150* Big Performance upgrades in orders page
     151* VAT validation in checkout: Now your customers can enter their vat number and the rest information will be autocompleted.
     152* New Invoice types: Credit Invoices. Now you can cancel your invoice with a credit invoice-receipt.
     153= 1.3.3 - 2022-01-31 =
     154* First version.
  • primer-mydata/trunk/admin/includes/my_data_json.php

    r3025280 r3034761  
    402402
    403403        if ($currency != 'EUR' && in_array(18, $primer_license_data['wpModules'])) {
    404             $req_url = 'https://api.exchangerate.host/convert?from=' . $currency . '&to=EUR';
    405             $response_json = file_get_contents($req_url);
    406             if (false !== $response_json) {
     404            $req_url = 'https://api.freecurrencyapi.com/v1/latest?apikey=fca_live_utrfbGSzAGB1NZw4aDkHhUWDDBQ83JBr7tLjaCWM&base_currency=EUR&currencies='.$currency;
     405            $ch = curl_init();
     406            curl_setopt($ch, CURLOPT_URL, $req_url);
     407            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     408            $response_json = curl_exec($ch);
     409            $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
     410            curl_close($ch);
     411            if ($httpcode >= 200 && $httpcode < 300) {
    407412                $response = json_decode($response_json);
    408                 if ($response->success === true) {
    409                     $exchange_rate = $response->info->rate;
    410                     $exchange_rate = number_format((float)$exchange_rate, 5, '.', '');
    411                     $invoice_data['invoice'][0]['invoiceHeader']['exchangeRate'] = $exchange_rate;
     413                if ($response !== null && isset($response->data->$currency)) {
     414                    $exchange_rate = $response->data->$currency;
     415                    $exchange_rate_formatted = number_format((float)$exchange_rate, 5, '.', '');
     416                    $invoice_data['invoice'][0]['invoiceHeader']['exchangeRate'] = $exchange_rate_formatted;
    412417                }
    413418            }
     
    435440            $invoice_data['invoice'][0]['invoiceHeader']['correlatedInvoices'] = [$correlated_mark];
    436441        }
    437         //if ($callingFunction == 'primer_cancel_invoice_cron') {
    438         //    if (($order_invoice_type == 'primer_invoice' || $order_invoice_type == 'invoice') && $is_credit) {
    439         //        $correlated_mark = get_post_meta($get_mark_from_receipt, 'response_invoice_mark', true);
    440         //        $invoice_data['invoice'][0]['invoiceHeader']['correlatedInvoices'] = [$correlated_mark];
    441         //    }
    442         //}
    443442        $sum = 0;
    444443        $item_count = 0;
     
    574573                $order_vat_exemption_name = $classes_names[$product_tax_class];
    575574                $order_vat_exemption_name = str_replace(' ', '_', $order_vat_exemption_name);
    576                 if ($inside_tax_rate == "0" && ($order_country == 'GR' || ($order_invoice_type == 'receipt' && $order_country == 'GR')) && !empty($mydata_options['' . $order_vat_exemption_name . '']) && in_array(16, $primer_license_data['wpModules'])) {
     575                if (($inside_tax_rate == "0" || empty($inside_tax_rate)) && !empty($mydata_options['' . $order_vat_exemption_name . '']) && in_array(16, $primer_license_data['wpModules'])) {
    577576                    $order_vat_exemption_category = $mydata_options['' . $order_vat_exemption_name . ''];
    578577                }
     
    604603                    return "break"; // DEYTERO BREAK 2
    605604                }
    606                 if ($order_country != 'GR' && ($order_vat_exemption_category = '' || empty($order_vat_exemption_category) || $order_vat_exemption_category == 0)) {
     605                if ($order_country != 'GR' && ($order_vat_exemption_category == '' || empty($order_vat_exemption_category) || $order_vat_exemption_category == 0)) {
    607606                    $order_vat_exemption_category = 27;
    608607                }
  • primer-mydata/trunk/includes/template-tags/primer-tags-display-modules.php

    r3022529 r3034761  
    302302        $issuer_product_head .= '<td class="vat_head_td"><p> ΦΠΑ %</p></td>';
    303303        $issuer_product_head .= '<td class="pricenovat_head_td"><p> ΤΙΜΗ ΠΡΟ ΦΠΑ</p></td>';
     304        $issuer_product_head .= '<td class="pricenovat_head_td"><p> ΑΞΙΑ ΦΠΑ</p></td>';
    304305        $issuer_product_head .= '<td class="price_head_td"><p> ΤΕΛΙΚΗ ΑΞΙΑ</p></td>';
    305306    } else {
     
    311312        $issuer_product_head .= '<td class="vat_head_td"><p> VAT %</p></td>';
    312313        $issuer_product_head .= '<td class="pricenovat_head_td"><p> PRICE BEFORE TAXES</p></td>';
     314        $issuer_product_head .= '<td class="pricenovat_head_td"><p> VAT PRICE</p></td>';
    313315        $issuer_product_head .= '<td class="price_head_td"><p> TOTAL AMOUNT</p></td>';
    314316    }
     
    467469            $total_order_item = number_format((float)$total_order_item, 2);
    468470            $total_order_payment = number_format((float)$total_order_payment, 2);
    469 
    470471        $issuer_product .= '<td><span class="item_vat">'.$inside_tax_rate.'%</span></td>';
    471 
    472472        $issuer_product .= '<td><span class="item_price_novat">'.$total_order_payment.'</span></td>';
    473 
    474         $issuer_product .= '<td><span class="item_price_novat">'.$total_order_item.'</span></td>';
    475 
     473            $issuer_product .= '<td><span class="item_price_novat">' . number_format($item->get_total_tax(), 2) . '</span></td>';
     474        $issuer_product .= '<td><span class="item_price_novat">'.$total_order_item.'</span></td>';
    476475        $issuer_product .= '</tr>';
    477476    }}
     
    491490        $issuer_product .= '<tr class="products">';
    492491        $product_id = "EA";
    493         // $product_instance = wc_get_product($product_id);
    494492        $issuer_product .= '<td><span class="item_code">' . $product_id . '</span></td>';
    495         $sale_price = '0';
    496493        $issuer_product .= '<td><span class="item_name">' . $order_item_name . '</span></td>';
    497494        $quantity = 1;
     
    506503        $issuer_product .= '<td><span class="item_mu">' . $measure_unit . '</span></td>';
    507504        $issuer_product .= '<td><span class="item_unit_price">' . $shipping_method_total . '</span></td>';
    508 
    509       //  $issuer_product .= '<td><span class="item_discount">' . $sale_price . '</span></td>';
    510            // $inside_tax_rate_ship=WC_Shipping_Rate::get_shipping_tax($shipping_method_taxes);
    511 
    512505        $tax_arr = json_decode(json_encode($shipping_method_taxes), true);
    513506        $inside_tax_rate_ship = null;
     
    517510            }
    518511        }
    519 
    520512        $total_tax_total = $shipping_method_total + $shipping_method_total_tax;
    521            // $inside_tax_rate_ship = round($inside_tax_rate_ship);
    522513            $inside_tax_rate_ship=round($order->get_shipping_tax() / $order->get_total_shipping(), 2) * 100;
    523514            $inside_tax_rate_ship = number_format((float)$inside_tax_rate_ship, 2);
    524515            $total_tax_total = number_format((float)$total_tax_total, 2);
    525516        $issuer_product .= '<td><span class="item_vat">' . $inside_tax_rate_ship . '%</span></td>';
    526 
    527517        $issuer_product .= '<td><span class="item_price_novat">' . $shipping_method_total . '</span></td>';
    528 
     518        $issuer_product .= '<td><span class="item_price_novat">' . number_format($shipping_method_total_tax, 2) . '</span></td>';
    529519        $issuer_product .= '<td><span class="item_price_novat">' . $total_tax_total . '</span></td>';
    530 
    531520        $issuer_product .= '</tr>';
    532521    }}
     
    544533            $issuer_product .= '<tr class="products">';
    545534            $product_id = "ΔΕ";
    546             // $product_instance = wc_get_product($product_id);
    547535            $issuer_product .= '<td><span class="item_code">' . $product_id . '</span></td>';
    548             $sale_price = '0';
    549536            $issuer_product .= '<td><span class="item_name">ΔΙΑΦΟΡΑ ΕΞΟΔΑ</span></td>';
    550537            $quantity = 1;
     
    558545            $issuer_product .= '<td><span class="item_mu">' . $measure_unit . '</span></td>';
    559546            $issuer_product .= '<td><span class="item_unit_price">' . $fee_total . '</span></td>';
    560 
    561             //  $issuer_product .= '<td><span class="item_discount">' . $sale_price . '</span></td>';
    562             // $inside_tax_rate_ship=WC_Shipping_Rate::get_shipping_tax($shipping_method_taxes);
    563 
    564547            $total_tax_total_fee = $fee_total + $fee_total_tax;
    565             // $inside_tax_rate_ship = round($inside_tax_rate_ship);
    566548            $inside_tax_rate_fee=round($fee_total_tax / $fee_total, 2) * 100;
    567549            $inside_tax_rate_fee = number_format((float)$inside_tax_rate_fee, 2);
    568550            $total_tax_total_fee = number_format((float)$total_tax_total_fee, 2);
    569551            $issuer_product .= '<td><span class="item_vat">' . $inside_tax_rate_fee . '%</span></td>';
    570 
    571552            $issuer_product .= '<td><span class="item_price_novat">' . $fee_total . '</span></td>';
    572 
     553            $issuer_product .= '<td><span class="item_price_novat">' . number_format($fee_total_tax, 2) . '</span></td>';
    573554            $issuer_product .= '<td><span class="item_price_novat">' . $total_tax_total_fee . '</span></td>';
    574 
    575555            $issuer_product .= '</tr>';
    576 
    577         }
    578 
    579 
    580     }
    581 
     556        }
     557    }
    582558    $allowed_html = array(
    583559        'tr' => array(
  • primer-mydata/trunk/primer.php

    r3025280 r3034761  
    1818 * Plugin URI:        primer.gr/plugin/
    1919 * Description:      Issue receipts and invoices with woocommerce.
    20  * Version:           4.1.3
     20 * Version:           4.1.4
    2121 * Author:            Primer Software
    2222 * Author URI:        primer.gr
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'PRIMER_VERSION', '4.1.3');
     38define( 'PRIMER_VERSION', '4.1.4');
    3939define( 'PRIMER_NAME', 'Primer MyData' );
    4040
Note: See TracChangeset for help on using the changeset viewer.