add feature payout_later
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<b>Felhasználó:</b> <?php echo $model->username ;?><br>
|
||||
<b>Idő:</b> <?php echo \Yii::$app->formatter->asDatetime(time());?><br>
|
||||
<?php
|
||||
if ( isset($geoip->city)){
|
||||
if ( isset($geoip) && isset($geoip->city)){
|
||||
?>
|
||||
<b>Ip cím:</b> <?php echo $geoip->ip?><br>
|
||||
<b>Város:</b> <?php echo $geoip->city?><br>
|
||||
|
||||
@@ -960,7 +960,7 @@ class Transfer extends \common\models\BaseFitnessActiveRecord {
|
||||
ShoppingCart::deleteAll(['id_transfer' => $this->id_transfer]);
|
||||
UserSoldItem::deleteAll(['id_transfer' => $this->id_transfer]);
|
||||
}
|
||||
public function payout() {
|
||||
public function payout($id_account = null) {
|
||||
|
||||
if ($this->status != Transfer::STATUS_NOT_PAID) {
|
||||
return false;
|
||||
@@ -970,14 +970,18 @@ class Transfer extends \common\models\BaseFitnessActiveRecord {
|
||||
$this->paid_at = Helper::getDateTimeString ();
|
||||
$this->paid_by = \Yii::$app->user->id;
|
||||
|
||||
if( Helper::isUserCartVisibilityAll() ){
|
||||
$this->id_account = Account::readDefault();
|
||||
if ( isset($id_account)){
|
||||
$this->id_account = $id_account;
|
||||
}else{
|
||||
if( Helper::isUserCartVisibilityAll() ){
|
||||
$this->id_account = Account::readDefault();
|
||||
}
|
||||
}
|
||||
|
||||
ShoppingCart::deleteAll ( [ 'id_transfer' => $this->id_transfer ] );
|
||||
UserSoldItem::deleteAll ( [ 'id_transfer' => $this->id_transfer
|
||||
] );
|
||||
return $this->save ();
|
||||
return $this->save (false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,18 +23,24 @@
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( count($model->moneyMovements ) == 0 ) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="7" style="text-align: right; padding: 3px;">
|
||||
Nincs találat
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($model->moneyMovements ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<?php if ( count($model->moneyMovements ) > 0 ) {
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo \Yii::$app->formatter->asInteger( $model->moneyMovementMoneis); ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user