[-] BO : fixed bug on product addition
// clean code
This commit is contained in:
@@ -37,7 +37,7 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
public $delivery_number;
|
public $delivery_number;
|
||||||
|
|
||||||
/** @var integer */
|
/** @var integer */
|
||||||
public $delivery_date;
|
public $delivery_date = '0000-00-00 00:00:00';
|
||||||
|
|
||||||
/** @var float */
|
/** @var float */
|
||||||
public $total_discount_tax_excl;
|
public $total_discount_tax_excl;
|
||||||
@@ -88,7 +88,7 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||||
'number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
'number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||||
'delivery_number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
'delivery_number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||||
'delivery_date' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
'delivery_date' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'),
|
||||||
'total_discount_tax_excl' =>array('type' => self::TYPE_FLOAT),
|
'total_discount_tax_excl' =>array('type' => self::TYPE_FLOAT),
|
||||||
'total_discount_tax_incl' =>array('type' => self::TYPE_FLOAT),
|
'total_discount_tax_incl' =>array('type' => self::TYPE_FLOAT),
|
||||||
'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT),
|
'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT),
|
||||||
|
|||||||
@@ -539,23 +539,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
|
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||||
}
|
}
|
||||||
elseif (isset($_GET['messageReaded']))
|
elseif (isset($_GET['messageReaded']))
|
||||||
{
|
|
||||||
Message::markAsReaded($_GET['messageReaded'], $this->context->employee->id);
|
Message::markAsReaded($_GET['messageReaded'], $this->context->employee->id);
|
||||||
}
|
|
||||||
// TODO clean PaymentCC
|
|
||||||
else if (Tools::isSubmit('setTransactionId') && ((int)Tools::getValue('id_order')))
|
|
||||||
{
|
|
||||||
$order = new Order((int)(Tools::getValue('id_order')));
|
|
||||||
$pcc = new PaymentCC((int)Tools::getValue('id_payment_cc'));
|
|
||||||
|
|
||||||
$pcc->id_order = $order->id;
|
|
||||||
$pcc->transaction_id = (string)Tools::getValue('transaction_id');
|
|
||||||
$pcc->id_currency = $order->id_currency;
|
|
||||||
$pcc->amount = $order->total_paid;
|
|
||||||
$pcc->save();
|
|
||||||
|
|
||||||
unset($order, $pcc);
|
|
||||||
}
|
|
||||||
else if (Tools::isSubmit('submitAddPayment'))
|
else if (Tools::isSubmit('submitAddPayment'))
|
||||||
{
|
{
|
||||||
if ($this->tabAccess['edit'] === '1')
|
if ($this->tabAccess['edit'] === '1')
|
||||||
|
|||||||
Reference in New Issue
Block a user