mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Pad out operators for rules
This commit is contained in:
parent
6ef21be16c
commit
dc6aca74b2
@ -33,7 +33,12 @@ class StoreBankTransactionRuleRequest extends Request
|
||||
{
|
||||
/* Ensure we have a client name, and that all emails are unique*/
|
||||
$rules = [
|
||||
'name' => 'bail|required|string'
|
||||
'name' => 'bail|required|string',
|
||||
'rules' => 'bail|array',
|
||||
'auto_convert' => 'bail|sometimes|bool',
|
||||
'matches_on_all' => 'bail|sometimes|bool',
|
||||
'applies_to' => 'bail|sometimes|bool',
|
||||
'record_as' => 'bail|sometimes|bool',
|
||||
];
|
||||
|
||||
if (isset($this->currency_id))
|
||||
|
@ -32,7 +32,12 @@ class UpdateBankTransactionRuleRequest extends Request
|
||||
{
|
||||
/* Ensure we have a client name, and that all emails are unique*/
|
||||
$rules = [
|
||||
'name' => 'bail|required|string'
|
||||
'name' => 'bail|required|string',
|
||||
'rules' => 'bail|array',
|
||||
'auto_convert' => 'bail|sometimes|bool',
|
||||
'matches_on_all' => 'bail|sometimes|bool',
|
||||
'applies_to' => 'bail|sometimes|bool',
|
||||
'record_as' => 'bail|sometimes|bool',
|
||||
];
|
||||
|
||||
if (isset($this->currency_id))
|
||||
|
@ -36,6 +36,32 @@ class BankTransactionRule extends BaseModel
|
||||
protected $dates = [
|
||||
];
|
||||
|
||||
/* Columns to search */
|
||||
protected array $search_keys = [
|
||||
'client_id' => 'client',
|
||||
'vendor_id' => 'vendor',
|
||||
'description' => 'description',
|
||||
'transaction_reference' => 'transaction_reference',
|
||||
'amount' => 'amount',
|
||||
];
|
||||
|
||||
/* Amount */
|
||||
protected array $number_operators = [
|
||||
'=',
|
||||
'>',
|
||||
'>=',
|
||||
'<',
|
||||
'<='
|
||||
];
|
||||
|
||||
/* Description, Client, Vendor, Reference Number */
|
||||
protected array $string_operators = [
|
||||
'is',
|
||||
'contains',
|
||||
'starts_with',
|
||||
'is_empty',
|
||||
];
|
||||
|
||||
public function getEntityType()
|
||||
{
|
||||
return self::class;
|
||||
|
Loading…
x
Reference in New Issue
Block a user