clamp installment at total+1 as RecoReco plan-complete tombstone (v1.1.1)
This commit is contained in:
@@ -190,9 +190,12 @@ class FinancePersistence extends Base
|
||||
}
|
||||
|
||||
/**
|
||||
* Advance a task's current installment by one, in place. A finite plan clamps at the total
|
||||
* (p10/10 stays p10/10); an open-ended one (no total) increments unbounded (p2 -> p3). Cards
|
||||
* with no numeric current installment are left alone.
|
||||
* Advance a task's current installment by one, in place. A finite plan clamps at total+1, one
|
||||
* past the last installment: that overflow is the "plan complete" tombstone (p4/3) that RecoReco
|
||||
* reads to stop a following recurrence, and it caps runaway when nothing follows. Clones still
|
||||
* read p1/total .. pTotal/total because a clone snapshots current BEFORE this advance. An
|
||||
* open-ended plan (no total) increments unbounded (p2 -> p3); cards with no numeric current
|
||||
* installment are left alone.
|
||||
*/
|
||||
private function advanceInstallment($task_id)
|
||||
{
|
||||
@@ -205,8 +208,8 @@ class FinancePersistence extends Base
|
||||
$total = $this->taskMetadataModel->get($task_id, FinanceHelper::INSTALLMENT_TOTAL_KEY, '');
|
||||
$next = (int) $current + 1;
|
||||
|
||||
if ($total !== '' && ctype_digit((string) $total) && $next > (int) $total) {
|
||||
$next = (int) $total;
|
||||
if ($total !== '' && ctype_digit((string) $total) && $next > (int) $total + 1) {
|
||||
$next = (int) $total + 1;
|
||||
}
|
||||
|
||||
$this->taskMetadataModel->save($task_id, array(
|
||||
|
||||
@@ -77,7 +77,7 @@ class Plugin extends Base
|
||||
|
||||
public function getPluginVersion()
|
||||
{
|
||||
return '1.0.5';
|
||||
return '1.1.1';
|
||||
}
|
||||
|
||||
public function getPluginHomepage()
|
||||
|
||||
26
README.md
26
README.md
@@ -51,6 +51,15 @@ Each column header shows a **`Total:`** of its cards -- credits positive, debits
|
||||
net): red when negative (what you owe), green when positive, gray at zero. It is shown for every
|
||||
column, including `Total: R$0,00`.
|
||||
|
||||
### Installments and recurrence
|
||||
|
||||
FinanceBuddy carries the money across copies. Kanboard's built-in recurrence and RecoReco's
|
||||
calendar recurrence advance the installment on the next occurrence (`p2/10 -> p3/10`); a manual
|
||||
duplicate copies it as-is. When a RecoReco-followed plan finishes, the parked template is left one
|
||||
past the last installment (`p3/3 -> p4/3`) as a "plan complete" marker that RecoReco reads to stop
|
||||
recurring; the copies themselves still read `p1/3 .. p3/3`. Open-ended plans (blank total) keep
|
||||
counting.
|
||||
|
||||
## Money format
|
||||
|
||||
Amounts show in R$ with a comma decimal and no thousand separator (for example `R$1234,56`).
|
||||
@@ -78,3 +87,20 @@ Settings -> Integrations and tick "Enable FinanceBuddy on this board".
|
||||
## License
|
||||
|
||||
AGPL-3.0. See LICENSE.
|
||||
|
||||
## More Kanboard plugins by Ruben (drbeco)
|
||||
|
||||
All free and AGPL-3.0, at [code.beco.cc](https://code.beco.cc/beco):
|
||||
|
||||
- **[RecoReco](https://code.beco.cc/beco/RecoReco)** -- calendar-scheduled recurring cards (yearly,
|
||||
monthly, weekly, daily), driven by the card due date. Pairs directly with FinanceBuddy: recurring
|
||||
bills spawn on schedule and their installments count down until the plan is paid off.
|
||||
- **[OrganonTweaks](https://code.beco.cc/beco/OrganonTweaks)** -- an umbrella of small
|
||||
quality-of-life board tweaks: remove an empty column, always show the comment icon, emphasize due
|
||||
dates, extra search keywords and shared board filters, and more.
|
||||
- **[BulkMoveTasks](https://code.beco.cc/beco/BulkMoveTasks)** -- move every task from one board
|
||||
column to another in a single action.
|
||||
- **[ShrinkVertically](https://code.beco.cc/beco/ShrinkVertically)** -- shrink vertically-collapsed
|
||||
board columns so the horizontal scrollbar stays within reach.
|
||||
- **[TweakDrag](https://code.beco.cc/beco/TweakDrag)** -- board drag and touch niceties:
|
||||
drag-to-scroll, a wider column gap, and smoother card dragging.
|
||||
|
||||
Reference in New Issue
Block a user