This commit is contained in:
Daniel Camargo 2014-12-02 21:25:38 -02:00
parent 1f0bbbeb23
commit 39cde40990

View File

@ -2417,19 +2417,6 @@ class Crunchbutton_Order extends Crunchbutton_Order_Trackchange {
return false; return false;
} }
// Pexcard stuff - #3992
$pexcard = $admin->pexcard();
if( $pexcard->id_admin_pexcard ){
switch ( $status ) {
case Crunchbutton_Order_Action::DELIVERY_ACCEPTED:
$pexcard->addFundsOrderAccepeted( $id_order );
break;
case Crunchbutton_Order_Action::DELIVERY_REJECTED:
$pexcard->removeFundsOrderCancelled( $id_order );
break;
}
}
(new Order_Action([ (new Order_Action([
'id_order' => $this->id_order, 'id_order' => $this->id_order,
'id_admin' => $admin->id_admin, 'id_admin' => $admin->id_admin,
@ -2441,6 +2428,19 @@ class Crunchbutton_Order extends Crunchbutton_Order_Trackchange {
$this->textCustomerAboutDriver(); $this->textCustomerAboutDriver();
} }
// Pexcard stuff - #3992
$pexcard = $admin->pexcard();
if( $pexcard->id_admin_pexcard ){
switch ( $status ) {
case Crunchbutton_Order_Action::DELIVERY_ACCEPTED:
$pexcard->addFundsOrderAccepeted( $this->id_order );
break;
case Crunchbutton_Order_Action::DELIVERY_REJECTED:
$pexcard->removeFundsOrderCancelled( $this->id_order );
break;
}
}
return true; return true;
} }