Skip to content

Commit

Permalink
fix broken custom payment history #448
Browse files Browse the repository at this point in the history
  • Loading branch information
beesaferoot committed Dec 22, 2024
1 parent 2be002a commit 3d7ecea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/app/Models/PaymentHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function transaction(): BelongsTo {
public function getFlow(string $payer_type, int $payer_id, string $period, $limit = null, string $order = 'ASC') {
$sql = 'SELECT sum(amount) as amount, payment_type, CONCAT_WS("/", '.$period.') as aperiod from'.
' payment_histories where payer_id=:payer_id and payer_type=:payer_type '.
'GROUP by concat( '.$period.'), payment_type ORDER BY created_at '.$order;
'GROUP by aperiod, payment_type ORDER BY aperiod '.$order;

if ($limit !== null) {
$sql .= ' limit '.(int) $limit;
Expand Down

0 comments on commit 3d7ecea

Please sign in to comment.