-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from zhang-accounting/278-app-panic-on-txn-wi…
…th-one-or-more-posting-without-amount fix: skip the process for those invalid txn
- Loading branch information
Showing
22 changed files
with
222 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
option "title" "My Accounting" | ||
option "operating_currency" "CNY" | ||
|
||
|
||
2023-12-02 "KFC" "VME50 Package" | ||
Assets:BankCard | ||
|
||
2023-12-02 "KFC" "VME50 Package" | ||
Assets:BankCard | ||
Assets:BankCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ | ||
{ | ||
"uri": "/api/store", | ||
"validations": [ | ||
[ | ||
"$.data.errors.length()", | ||
2 | ||
], | ||
[ | ||
"$.data.errors[0].error_type", | ||
"TransactionCannotInferTradeAmount" | ||
], | ||
[ | ||
"$.data.errors[1].error_type", | ||
"TransactionHasMultipleImplicitPosting" | ||
], | ||
[ | ||
"$.data.transactions", | ||
{} | ||
] | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
#[derive(Debug)] | ||
use serde::Serialize; | ||
use strum::Display; | ||
|
||
#[derive(Debug, Display, Clone, PartialEq, Eq, Serialize)] | ||
pub enum ErrorKind { | ||
TransactionHasMultipleImplicitPosting, | ||
UnbalancedTransaction, | ||
TransactionCannotInferTradeAmount, | ||
TransactionHasMultipleImplicitPosting, | ||
TransactionExplicitPostingHaveMultipleCommodity, | ||
InvalidFlag, | ||
|
||
AccountBalanceCheckError, | ||
AccountDoesNotExist, | ||
AccountClosed, | ||
TransactionDoesNotBalance, | ||
CommodityDoesNotDefine, | ||
CloseNonZeroAccount, | ||
|
||
BudgetDoesNotExist, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.