售后金额

This commit is contained in:
liu
2026-08-29 13:54:06 +08:00
parent c3ec416a77
commit d0ce897a0f
25 changed files with 175 additions and 58 deletions
@@ -49,6 +49,7 @@ return new class extends Migration
$table->string('product_spec', 100)->default('')->comment('规格/包规');
$table->string('unit', 20)->default('斤')->comment('计价单位(斤/件/箱等)');
$table->decimal('price', 10, 2)->default(0)->comment('单价');
$table->string('price_unit', 20)->default('')->comment('单价单位');
$table->string('image_ids', 255)->default('')->comment('商品图片');
$table->text('content')->comment('商品图文详情');
$table->integer('shelf_life')->default(0)->comment('保质期');
@@ -28,7 +28,7 @@ return new class extends Migration
$table->decimal('box_price', 10, 2)->default(0)->comment('周转筐单价(生成时快照)');
$table->decimal('tray_price', 10, 2)->default(0)->comment('周转托盘单价(生成时快照)');
$table->decimal('added_amount', 10, 2)->default(0)->comment('附加金额(周转筐/托盘金额)');
$table->decimal('total_amount', 10, 2)->default(0)->comment('账单总金额 = 商品金额 + 配送费 + 附加金额');
$table->decimal('total_amount', 10, 2)->default(0)->comment('账单总金额 = 商品金额 + 配送费 + 附加金额 + 售后金额');
$table->integer('status')->default(0)->comment('支付状态(0未支付 1已支付)');
$table->integer('payment_id')->default(0)->comment('关联支付记录ID0=未发起支付)');
$table->timestamp('paid_at')->nullable()->comment('付款时间(线下收款手动登记)');
@@ -36,7 +36,7 @@ return new class extends Migration
$table->integer('paid_operator_id')->default(0)->comment('收款操作人(后台系统用户ID)');
$table->integer('operator_id')->default(0)->comment('生成人(后台系统用户ID');
$table->string('remark', 255)->nullable()->default('')->comment('备注(生成账单时按门店填写)');
$table->string('after_sale', 255)->nullable()->default('')->comment('售后说明(生成账单时按门店填写)');
$table->decimal('after_sale', 10, 2)->default(0)->comment('售后金额(生成账单时按门店填写,可正负,计入总金额');
$table->timestamps();
$table->unique(['purchase_id', 'store_id'], 'bill_purchase_store_unique');
$table->index(['store_id', 'bill_date'], 'bill_store_date_index');