@@ -318,10 +318,6 @@ class OrderController extends ProducerBaseController | |||
$amountRemaining = $order->getAmount(Order::AMOUNT_REMAINING) ; | |||
$credit = Yii::$app->user->identity->getCredit($distribution->id_producer); | |||
if ($amountRemaining > $credit) { | |||
$amountRemaining = $credit; | |||
} | |||
if ($amountRemaining > 0) { | |||
$order->saveCreditHistory( | |||
CreditHistory::TYPE_PAYMENT, |