Refactored transaction processing to include pending status updates and added logic to handle "Ожидающие обработки" transactions. Updated relevant scripts, XML resources, and database handling for improved transaction tracking and status accuracy.
36 lines
758 B
C++
36 lines
758 B
C++
#pragma once
|
|
#include "CommonScript.h"
|
|
|
|
class GetLastDaysHistoryScript final : public CommonScript {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
~GetLastDaysHistoryScript() override;
|
|
|
|
explicit GetLastDaysHistoryScript(
|
|
AccountInfo account,
|
|
QObject *parent = nullptr
|
|
);
|
|
|
|
protected:
|
|
void doStart() override;
|
|
|
|
private:
|
|
const AccountInfo m_account;
|
|
QString m_error;
|
|
|
|
bool saveAndPostNewTransactionData(
|
|
const AccountInfo &account,
|
|
const TransactionInfo &transaction,
|
|
const TransactionStatus &status
|
|
);
|
|
|
|
bool updateAndPostTransactionData(
|
|
const AccountInfo &account,
|
|
int transactionId,
|
|
TransactionStatus status,
|
|
const QString &oldDesc,
|
|
const QString &newDesc
|
|
);
|
|
};
|