modif validate field OrderDetail

This commit is contained in:
Marion Muszynski 2016-05-18 11:17:41 +02:00
parent 0759d17ae2
commit 13b20adb20
2 changed files with 37 additions and 2 deletions

View File

@ -0,0 +1,35 @@
<?php
class OrderDetail extends OrderDetailCore
{
/**
* @Override
* @var 'product_ean13' => 'isEan13'
*/
protected $fieldsValidate = array (
'id_order' => 'isUnsignedId',
'product_id' => 'isUnsignedId',
'product_attribute_id' => 'isUnsignedId',
'product_name' => 'isGenericName',
'product_quantity' => 'isInt',
'product_quantity_in_stock' => 'isInt',
'product_quantity_return' => 'isUnsignedInt',
'product_quantity_refunded' => 'isUnsignedInt',
'product_quantity_reinjected' => 'isUnsignedInt',
'product_price' => 'isPrice',
'reduction_percent' => 'isFloat',
'reduction_amount' => 'isPrice',
'group_reduction' => 'isFloat',
'product_quantity_discount' => 'isFloat',
'product_ean13' => 'isReference',
'product_upc' => 'isUpc',
'product_reference' => 'isReference',
'product_supplier_reference' => 'isReference',
'product_weight' => 'isFloat',
'tax_name' => 'isGenericName',
'tax_rate' => 'isFloat',
'ecotax' => 'isFloat',
'ecotax_tax_rate' => 'isFloat',
'download_nb' => 'isInt',
);
}

View File

@ -164,8 +164,8 @@ class ParentOrderController extends ParentOrderControllerCore {
// distinction "at home" et "out of home"
$carriers_ah = array();
$carriers_ooh = array();
$config_carrier_ooh = array(88,89); // prod
// $config_carrier_ooh = array(47,48); // dev
// $config_carrier_ooh = array(88,89); // prod
$config_carrier_ooh = array(47,48); // dev
// $config_carrier_ooh = array(40,45); // local
foreach ($carriers as $carrier) {
if (in_array($carrier['id_carrier'], $config_carrier_ooh) ){