Plugin Directory

Changeset 3365371


Ignore:
Timestamp:
09/21/2025 05:53:25 PM (6 months ago)
Author:
tulipwork
Message:

Mise à jour d'OrderStock vers la version 1.8

Location:
orderstock/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orderstock/trunk/includes/order-page.php

    r3295841 r3365371  
    127127    $suppliers = get_posts(['post_type' => 'tulipwork_supplier', 'posts_per_page' => -1]);
    128128    $selected_supplier = isset($_GET['supplier_filter']) ? sanitize_text_field(wp_unslash($_GET['supplier_filter'])) : '';
    129     $transient_key = 'tulipwork_orders_' . get_current_user_id();
     129    $transient_key = 'tulipwork_orders_' . get_current_user_id() . '_' . $selected_store;
    130130    $manual_orders = isset($_POST['order']) ? array_map('floatval', wp_unslash($_POST['order'])) : (get_transient($transient_key) ?: []);
    131131    $trend_score = isset($_POST['trend_score']) ? floatval($_POST['trend_score']) : 1;
     
    184184                $quantity_to_order_raw = (($replenishment_period * $daily_sales) * $trend_score) - $stock;
    185185            } else {
    186                 $quantity_to_order_raw = ($stock < $critical_threshold) ? ($target_stock * $trend_score) - $stock : 0;
     186                $quantity_to_order_raw = ($stock <= $critical_threshold) ? ($target_stock * $trend_score) - $stock : 0;
    187187            }
    188188            $measured_units = ['kg', 'l'];
     
    586586                    'file' => $pdf_file,
    587587                    'filename' => $pdf_filename,
    588                     'expires' => time() + 259200
     588                    'expires' => time() + (7 * DAY_IN_SECONDS)
    589589                ];
    590590                update_option('tulipwork_orderstock_pdf_tokens', $pdf_tokens);
     
    780780                                        $quantity_to_order_raw = (($replenishment_period * $daily_sales) * $trend_score) - $stock;
    781781                                    } else {
    782                                         $quantity_to_order_raw = ($stock < $critical_threshold) ? ($target_stock * $trend_score) - $stock : 0;
     782                                        $quantity_to_order_raw = ($stock <= $critical_threshold) ? ($target_stock * $trend_score) - $stock : 0;
    783783                                    }
    784784                                    if ($quantity_to_order_raw < 0) $quantity_to_order_raw = 0;
     
    817817                                            <div class="quantity-container">
    818818                                                <input type="number" name="order[<?php echo esc_attr($product->ID); ?>]" value="<?php echo esc_attr($display_manual_quantity); ?>" step="any" min="0" class="order-quantity"
    819                                                     data-calc="<?php echo esc_attr($effective_mode === 'forecast' ? "(($replenishment_period * $daily_sales) * $trend_score) - $stock" : "($stock < $critical_threshold ? ($target_stock * $trend_score) - $stock : 0)"); ?>"
     819                                                    data-calc="<?php echo esc_attr($effective_mode === 'forecast' ? "(($replenishment_period * $daily_sales) * $trend_score) - $stock" : "($stock <= $critical_threshold ? ($target_stock * $trend_score) - $stock : 0)"); ?>"
    820820                                                    data-packaging="<?php echo esc_attr($packaging_quantity); ?>"
    821821                                                    data-max="<?php echo esc_attr($max_quantity); ?>" />
  • orderstock/trunk/readme.txt

    r3296880 r3365371  
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 1.7
     7Stable tag: 1.8
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    2323
    2424Ideal for restaurants, retailers, caterers—or anyone who craves simplicity with power. Crafted by **[Tulipe Media](https://tulipemedia.com/en/product/orderstock-pro/)** to fuel your success.
     25
     26### Watch the quick video introduction 📺
     27[youtube https://www.youtube.com/watch?v=Zys3ucOLULM]
    2528
    2629### Pro Features – Level Up Your Workflow! ✨
     
    101104
    102105== Changelog ==
     106= 1.8 =
     107* Fixed: Trend Score values no longer carry over when switching between stores in multistore mode.
     108* Improved: System now automatically triggers orders when stock equals the critical threshold.
     109
    103110= 1.7 =
    104111* Improved: Removed unnecessary minimum order threshold warning after order confirmation for a smoother user experience.
     
    141148
    142149== Upgrade Notice ==
     150= 1.8 =
     151Minor optimizations and improvements for a better user experience. Update to benefit from these enhancements.
     152
    143153= 1.7 =
    144154Minor optimizations and improvements for a better user experience. Update to benefit from these enhancements.
Note: See TracChangeset for help on using the changeset viewer.