ekmungai / eloquent-ifrs

Eloquent Double Entry Accounting with a focus on IFRS Compliant Reporting
MIT License
334 stars 68 forks source link

Assignment::create failed #115

Closed nasirkhan closed 2 years ago

nasirkhan commented 2 years ago

The following code throws an error. There is no column name in the query, where should i update to fix the issue?

select * from `assignments` where `assignments`.`` = 19 and `entity_id` = 1 and `assignments`.`deleted_at` is null limit 1
$assignment = Assignment::create([
    'transaction_id' => $clientReceipt->id,
    'cleared_id' => $clientInvoice->id,
    'cleared_type'=> $clientInvoice->getClearedType(),
    'amount' => 50,
]);
nasirkhan commented 2 years ago

found the solution in #70, it should be like:

$assignment = Assignment::create([
    'transaction_id' => $clientReceipt->id,
    'cleared_id' => $clientInvoice->id,
    'cleared_type'=> $clientInvoice->getClearedType(),
    'amount' => 50,
]);