소스 검색

[Administration] Producteurs : montant virement permanent à passer en float #884

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
7e1e726997
3개의 변경된 파일33개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      backend/views/producer-admin/index.php
  2. +6
    -2
      common/logic/Producer/Producer/Model/Producer.php
  3. +26
    -0
      console/migrations/m230524_091204_update_field_producer_option_billing_permanent_transfer_amount.php

+ 1
- 1
backend/views/producer-admin/index.php 파일 보기

@@ -192,7 +192,7 @@ $this->addButton(['label' => 'Nouveau producteur <span class="glyphicon glyphico
$str .= '<li>'.Producer::$billingFrequencyArray[$model->option_billing_frequency].'</li>';

if($model->option_billing_permanent_transfer) {
$str .= '<li>Virement permanent : <strong>'.Price::format($model->option_billing_permanent_transfer_amount, 0).'</strong></li>';
$str .= '<li>Virement permanent : <strong>'.Price::format($model->option_billing_permanent_transfer_amount).'</strong></li>';
}

$str .= '</ul>';

+ 6
- 2
common/logic/Producer/Producer/Model/Producer.php 파일 보기

@@ -151,7 +151,6 @@ class Producer extends ActiveRecordCommon
'option_online_payment_minimum_amount',
'option_document_price_decimals',
'option_billing_reduction_percentage',
'option_billing_permanent_transfer_amount',
],
'integer'
],
@@ -279,7 +278,12 @@ class Producer extends ActiveRecordCommon
'string',
'max' => 255
],
[['free_price', 'credit_limit_reminder', 'credit_limit'], 'double'],
[[
'free_price',
'credit_limit_reminder',
'credit_limit',
'option_billing_permanent_transfer_amount'
], 'double'],
[
'free_price',
'compare',

+ 26
- 0
console/migrations/m230524_091204_update_field_producer_option_billing_permanent_transfer_amount.php 파일 보기

@@ -0,0 +1,26 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m230524_091204_update_field_producer_option_billing_permanent_transfer_amount
*/
class m230524_091204_update_field_producer_option_billing_permanent_transfer_amount extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->alterColumn('producer', 'option_billing_permanent_transfer_amount', Schema::TYPE_DOUBLE);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->alterColumn('producer', 'option_billing_permanent_transfer_amount', Schema::TYPE_INTEGER);
}
}

Loading…
취소
저장