add refund logic and fix books inventory logic
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class InventoryItemYearModel extends Model
|
||||
{
|
||||
protected $table = 'inventory_item_years';
|
||||
protected $primaryKey = 'id';
|
||||
protected $returnType = 'array';
|
||||
protected $useTimestamps = true;
|
||||
|
||||
protected $allowedFields = [
|
||||
'inventory_item_id',
|
||||
'school_year_id',
|
||||
'school_year',
|
||||
'opening_quantity',
|
||||
'charge_price_cents',
|
||||
'currency',
|
||||
'price_confirmed',
|
||||
'system_closing_quantity',
|
||||
'counted_closing_quantity',
|
||||
'variance_quantity',
|
||||
'status',
|
||||
'source_item_year_id',
|
||||
'closing_batch_id',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
protected $validationRules = [
|
||||
'inventory_item_id' => 'required|integer',
|
||||
'school_year' => 'required|string|max_length[16]',
|
||||
'opening_quantity' => 'required|integer',
|
||||
'charge_price_cents' => 'required|integer|greater_than_equal_to[0]',
|
||||
'currency' => 'required|alpha|max_length[3]',
|
||||
'price_confirmed' => 'required|in_list[0,1]',
|
||||
'status' => 'required|in_list[open,reconciled,carried,closed]',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user