Overview
Comment:Fix amount left to pay when there are no payments done yet
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk | stable
Files: files | file ages | folders
SHA3-256: 9e2377730da7a440e437fe84482660c7e7c502da099254e7d12cf91cb705aef7
User & Date: bohwaz on 2022-08-15 21:39:07
Other Links: manifest | tags
Context
2022-08-15
21:39
Fix amount left to pay when there are no payments done yet Leaf check-in: 9e2377730d user: bohwaz tags: trunk, stable
21:38
Fix disabling of accounting when creating a service for a user check-in: c2737395b8 user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Services/Services_User.php from [403bcb312a] to [30214b3c69].

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
			],
			'paid' => [
				'label' => 'Payé',
				'select' => 'su.paid',
			],
			'amount' => [
				'label' => 'Reste à régler',
				'select' => 'expected_amount - SUM(tl.debit)',
			],
		];

		$tables = 'services_users su
			INNER JOIN services s ON s.id = su.id_service
			LEFT JOIN services_fees sf ON sf.id = su.id_fee
			LEFT JOIN acc_transactions_users tu ON tu.id_service_user = su.id







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
			],
			'paid' => [
				'label' => 'Payé',
				'select' => 'su.paid',
			],
			'amount' => [
				'label' => 'Reste à régler',
				'select' => 'expected_amount - IFNULL(SUM(tl.debit), 0)',
			],
		];

		$tables = 'services_users su
			INNER JOIN services s ON s.id = su.id_service
			LEFT JOIN services_fees sf ON sf.id = su.id_fee
			LEFT JOIN acc_transactions_users tu ON tu.id_service_user = su.id