payment step - bank transfer
This commit is contained in:
parent
2c0246cc98
commit
1f8ef61275
|
|
@ -311,12 +311,14 @@ class OfferForm extends ComponentBase
|
|||
DB::transaction(function() use ($draft_offers, $newPaymentId) {
|
||||
foreach($draft_offers as $df) {
|
||||
$df->payment_id = $newPaymentId;
|
||||
$draft_offers->status = 'new';
|
||||
$df->status = 'new';
|
||||
$df->save();
|
||||
}
|
||||
});
|
||||
|
||||
// attach file to payment
|
||||
$newPayment->bank_file = Input::file('bank_file');
|
||||
$newPayment->save();
|
||||
|
||||
return [
|
||||
'#form-steps' => $this->renderPartial('@message')
|
||||
|
|
|
|||
|
|
@ -33,4 +33,8 @@ class Payment extends Model
|
|||
public $belongsTo = [
|
||||
'user' => 'RainLab\User\Models\User'
|
||||
];
|
||||
|
||||
public $attachOne = [
|
||||
'bank_file' => 'System\Models\File'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,3 +37,12 @@ fields:
|
|||
size: ''
|
||||
span: auto
|
||||
type: textarea
|
||||
bank_file:
|
||||
label: 'Bank file'
|
||||
mode: file
|
||||
useCaption: true
|
||||
thumbOptions:
|
||||
mode: crop
|
||||
extension: auto
|
||||
span: auto
|
||||
type: fileupload
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace TPS\Birzha\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsBirzhaPayments2 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_birzha_payments', function($table)
|
||||
{
|
||||
$table->text('bank_file')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_birzha_payments', function($table)
|
||||
{
|
||||
$table->dropColumn('bank_file');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -152,3 +152,6 @@
|
|||
1.0.52:
|
||||
- 'Updated table tps_birzha_messages'
|
||||
- builder_table_update_tps_birzha_messages_2.php
|
||||
1.0.53:
|
||||
- 'Updated table tps_birzha_payments'
|
||||
- builder_table_update_tps_birzha_payments_2.php
|
||||
|
|
|
|||
Loading…
Reference in New Issue