Fix a bug in multi month operation : description was updated but not saved with new value

This commit is contained in:
Grégory Soutadé 2018-09-15 17:13:14 +02:00
parent e39de711c6
commit cb67de5ba5

View File

@ -112,8 +112,6 @@ int KissCount::CalcAccountAmount(int id, int month, int year, bool* had_values)
void KissCount::UpdateOperation(Operation& op, bool checkTransfert) void KissCount::UpdateOperation(Operation& op, bool checkTransfert)
{ {
if(!op.meta)
// Unlink // Unlink
if (checkTransfert) if (checkTransfert)
{ {
@ -316,6 +314,7 @@ int KissCount::CopyGeneratedOperation(int monthTo, int yearTo, Operation& opOrig
opDest.description = opOrig.description.left(match.capturedStart(1)); opDest.description = opOrig.description.left(match.capturedStart(1));
opDest.description += QString::number(first) + QString("/") + QString::number(second); opDest.description += QString::number(first) + QString("/") + QString::number(second);
opDest.description += opOrig.description.right(opOrig.description.length()-match.capturedEnd(2)); opDest.description += opOrig.description.right(opOrig.description.length()-match.capturedEnd(2));
UpdateOperation(opDest, false);
} }
} }
} }