Browse Source

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

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
7e1e726997
3 changed files with 33 additions and 3 deletions
  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 View File

$str .= '<li>'.Producer::$billingFrequencyArray[$model->option_billing_frequency].'</li>'; $str .= '<li>'.Producer::$billingFrequencyArray[$model->option_billing_frequency].'</li>';


if($model->option_billing_permanent_transfer) { 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>'; $str .= '</ul>';

+ 6
- 2
common/logic/Producer/Producer/Model/Producer.php View File

'option_online_payment_minimum_amount', 'option_online_payment_minimum_amount',
'option_document_price_decimals', 'option_document_price_decimals',
'option_billing_reduction_percentage', 'option_billing_reduction_percentage',
'option_billing_permanent_transfer_amount',
], ],
'integer' 'integer'
], ],
'string', 'string',
'max' => 255 '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', 'free_price',
'compare', 'compare',

+ 26
- 0
console/migrations/m230524_091204_update_field_producer_option_billing_permanent_transfer_amount.php View File

<?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…
Cancel
Save