update
This commit is contained in:
@@ -1,9 +1,69 @@
|
||||
<?php
|
||||
class Order extends OrderCore
|
||||
{
|
||||
|
||||
public $order_source;
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
public static $definition = array(
|
||||
'table' => 'orders',
|
||||
'primary' => 'id_order',
|
||||
'fields' => array(
|
||||
'id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_address_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'),
|
||||
'payment' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
|
||||
'module' => array('type' => self::TYPE_STRING, 'validate' => 'isModuleName', 'required' => true),
|
||||
'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'),
|
||||
'mobile_theme' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
'total_discounts' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_discounts_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_discounts_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_paid' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true),
|
||||
'total_paid_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_paid_real' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true),
|
||||
'total_products' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true),
|
||||
'total_products_wt' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true),
|
||||
'total_shipping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_shipping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_shipping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'carrier_tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
|
||||
'total_wrapping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_wrapping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'total_wrapping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'),
|
||||
'round_mode' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'round_type' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'shipping_number' => array('type' => self::TYPE_STRING, 'validate' => 'isTrackingNumber'),
|
||||
'conversion_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true),
|
||||
'invoice_number' => array('type' => self::TYPE_INT),
|
||||
'delivery_number' => array('type' => self::TYPE_INT),
|
||||
'invoice_date' => array('type' => self::TYPE_DATE),
|
||||
'delivery_date' => array('type' => self::TYPE_DATE),
|
||||
'valid' => array('type' => self::TYPE_BOOL),
|
||||
'reference' => array('type' => self::TYPE_STRING),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'order_source' => array('type' => self::TYPE_STRING),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* module: modrefchange
|
||||
* date: 2021-01-11 06:03:11
|
||||
* date: 2019-04-12 06:23:14
|
||||
* version: 1.5.5.1
|
||||
*/
|
||||
public function add($autodate = true, $null_values = true)
|
||||
@@ -16,7 +76,7 @@ class Order extends OrderCore
|
||||
}
|
||||
/*
|
||||
* module: modrefchange
|
||||
* date: 2021-01-11 06:03:11
|
||||
* date: 2019-04-12 06:23:14
|
||||
* version: 1.5.5.1
|
||||
*/
|
||||
public static function setLastInvoiceNumber($order_invoice_id, $id_shop)
|
||||
@@ -42,7 +102,7 @@ class Order extends OrderCore
|
||||
}
|
||||
/*
|
||||
* module: modrefchange
|
||||
* date: 2021-01-11 06:03:11
|
||||
* date: 2019-04-12 06:23:14
|
||||
* version: 1.5.5.1
|
||||
*/
|
||||
public function setDeliveryNumber($order_invoice_id, $id_shop)
|
||||
@@ -67,4 +127,4 @@ class Order extends OrderCore
|
||||
$sql .=' WHERE `id_order_invoice` = '.(int)$order_invoice_id;
|
||||
return Db::getInstance()->execute($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user