This commit is contained in:
Illya Marchenko 2024-03-27 20:14:22 +02:00
parent 4f592feb02
commit 4df406563d
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F

@ -135,12 +135,17 @@ func handleWebhook(w http.ResponseWriter, r *http.Request) {
firefly3Transaction.SourceId = Firefy3AccountsConfig["Wallet cash (UAH)"] firefly3Transaction.SourceId = Firefy3AccountsConfig["Wallet cash (UAH)"]
firefly3Transaction.DestinationId = firefly3Transaction.SourceId firefly3Transaction.DestinationId = firefly3Transaction.SourceId
firefly3Transactions = append(firefly3Transactions, firefly3Transaction) firefly3Transactions = append(firefly3Transactions, firefly3Transaction)
} else if slices.Contains([]string{"Банкомат DN00", "Термінал EasyPay", "City24", "Термінал City24"}, transaction.Data.StatementItem.Description) { } else if slices.Contains([]string{"Термінал EasyPay", "City24", "Термінал City24"}, transaction.Data.StatementItem.Description) {
firefly3Transaction.Type_ = &transactionTypeTransfer firefly3Transaction.Type_ = &transactionTypeTransfer
firefly3Transaction.Description = "Transfer between accounts" firefly3Transaction.Description = "Transfer between accounts"
firefly3Transaction.SourceId = Firefy3AccountsConfig["Wallet cash (UAH)"] // test firefly3Transaction.SourceId = Firefy3AccountsConfig["Wallet cash (UAH)"] // test
firefly3Transaction.DestinationId = account.Id // test firefly3Transaction.DestinationId = account.Id // test
firefly3Transactions = append(firefly3Transactions, firefly3Transaction) firefly3Transactions = append(firefly3Transactions, firefly3Transaction)
} else if slices.Contains([]string{"Банкомат DN00"}, transaction.Data.StatementItem.Description) {
firefly3Transaction.Type_ = &transactionTypeTransfer
firefly3Transaction.Description = "Transfer between accounts"
firefly3Transaction.DestinationId = Firefy3AccountsConfig["Wallet cash (UAH)"] // test
firefly3Transactions = append(firefly3Transactions, firefly3Transaction)
} else { } else {
for _, row := range ShopConfig { for _, row := range ShopConfig {
if slices.Contains(row.Names, transaction.Data.StatementItem.Description) || slices.Contains(row.MCCCodes, transaction.Data.StatementItem.Mcc) { if slices.Contains(row.Names, transaction.Data.StatementItem.Description) || slices.Contains(row.MCCCodes, transaction.Data.StatementItem.Mcc) {