fix(zarin): post rial wallet docs as cash via payment, not pooli buy-fi
Zarin kind=payment creates type 55 cash-only rows; it needs zarin_idbank as the counterpart account. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* کد حساب بانک/صندوق زرین برای سند وجه نقد (kind=payment).
|
||||
* value ردیف موجود را تغییر نمیدهد.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$key = 'zarin_idbank';
|
||||
$meta = [
|
||||
'title_fa' => 'کد حساب بانک زرین',
|
||||
'description' => 'کد حساب بانک یا صندوق در زرین (idbank) برای واریز/برداشت ریالی کیف. سند نوع وجه نقد است، نه خرید فی. از لیست حسابهای زرین همان کد عددی را بگذارید.',
|
||||
'type' => 'number',
|
||||
];
|
||||
|
||||
$exists = DB::table('settings')->where('key', $key)->exists();
|
||||
if (! $exists) {
|
||||
DB::table('settings')->insert([
|
||||
'key' => $key,
|
||||
'value' => '',
|
||||
'title_fa' => $meta['title_fa'],
|
||||
'can_edit' => 0,
|
||||
'is_active' => 1,
|
||||
'description' => $meta['description'],
|
||||
'type' => $meta['type'],
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
DB::table('settings')->where('key', $key)->update([
|
||||
'title_fa' => $meta['title_fa'],
|
||||
'description' => $meta['description'],
|
||||
'type' => $meta['type'],
|
||||
'can_edit' => 0,
|
||||
'is_active' => 1,
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// کلید را حذف نمیکنیم
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user