Diverse wijzigingen nav word document

This commit is contained in:
2019-10-25 16:47:46 +02:00
parent 6f21ab10de
commit d0069061ba
24 changed files with 2203 additions and 2028 deletions
+12 -1
View File
@@ -28,6 +28,17 @@ class Payment extends BaseModel {
return $projectPayment->payment;
}
public static function getProjectsWithPayments($year)
{
$projects = self::selectRaw('INV.project_id')
->distinct()
->join('invoices AS INV', 'INV.id', '=', 'payments.invoice_id')
->whereRaw('DATE_FORMAT(INV.invoicedate, "%Y") = "'. $year.'"')
->lists('project_id');
return $projects->toArray();
}
public static function savePayment( $paymentID, $payment )
{
$payment = (array) $payment;
@@ -50,4 +61,4 @@ class Payment extends BaseModel {
Payment::whereId( $paymentID )->delete();
}
}
}