echo $PurchasesInvoice->total_amount; ?> </td> <td> <?php $balance += $PurchasesInvoice->total_amount; echo $balance; ?> </td> </tr> <?php } ?> <?php foreach (MoneyPaid::model()->findAll(array('order' => 'paid_date', 'condition' => 'supplier_id=:supplier', 'params' => array(':supplier' => $id))) as $receipt) { ?> <tr> <td> <?php echo CHtml::link('<button class="btn btn-default btn-sm"><span class="btn-label-style">Edit</span></button>', $this->createAbsoluteUrl('moneyPaid/update', array('id' => $receipt->id))); ?> </td> <td> </td> <td> <?php echo $receipt->paid_date; ?> </td>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return MoneyPaid the loaded model * @throws CHttpException */ public function loadModel($id) { $model = MoneyPaid::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
/** * Performs the AJAX validation. * @param SalesInvoices $model the model to be validated */ public function loadpaidModel($id) { $model = MoneyPaid::model()->find(array('condition' => 'purchases_invoice_id=:invoice AND status=:status', 'params' => array(':status' => 1, ':invoice' => $id))); return $model; }
<td colspan="8"><?php echo $purchasesInv->issue_date . '- ' . $purchasesInv->supplier->supplierName . '-PurchasesInvoice #' . $purchasesInv->id; ?> </td> <td></td> <td><?php $total_credit_payables += $purchasesInv->total_amount; echo $purchasesInv->total_amount; ?> </td> </tr> <?php } $total_debit_payables = 0; foreach (MoneyPaid::model()->findAll(array('order' => 'paid_date', 'condition' => 'paid_date>=:start_date AND paid_date<=:end_date', 'params' => array(':start_date' => $model->from_date, ':end_date' => $model->to_date))) as $receipt) { ?> <tr> <td colspan="8"><?php echo $receipt->paid_date . '- ' . $receipt->supplier->supplierName . '-Payment #' . $receipt->id; ?> </td> <td><?php $total_debit_payables += $receipt->amount; echo $receipt->amount; ?> </td> <td></td> </tr> <?php
?> </td> <td> <?php echo $PurchasesInvoice->total_amount; ?> </td> <td> <?php $balance = $PurchasesInvoice->total_amount; echo $balance; ?> </td> </tr> <?php foreach (MoneyPaid::model()->findAll(array('condition' => 'purchases_invoice_id=:invoice', 'params' => array(':invoice' => $id))) as $receipt) { ?> <tr> <td> <?php echo CHtml::link('<button class="btn btn-default btn-sm"><span class="btn-label-style">Edit</span></button>', $this->createAbsoluteUrl('moneyPaid/update', array('id' => $receipt->id))); ?> </td> <td> </td> <td> <?php echo $receipt->paid_date; ?> </td>