Removalls and offers revenues
This commit is contained in:
@@ -80,6 +80,8 @@ class Project extends BaseModel {
|
||||
|
||||
public static function removeProject( $projectID )
|
||||
{
|
||||
Offer::whereProjectId( $projectID )->update( ['project_id' => NULL] );
|
||||
|
||||
Project::whereId( $projectID )->delete();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class Qinvoiceoverview {
|
||||
$sql = "
|
||||
SELECT PRJ.id, PRJ.projectnumber,
|
||||
PRJ.projectname,
|
||||
(own_revenue + other_revenue ) AS revenues,
|
||||
(own_revenue + other_revenue + OFF.costs ) AS revenues,
|
||||
CUS.name AS customername,
|
||||
SUM(IF( YEAR(invoicedate) = {$year}, invoiceamount* ((100 + VTS.vatrate)/100), 0)) AS currentyear,
|
||||
SUM(IF( YEAR(invoicedate) != {$year}, invoiceamount * ((100 + VTS.vatrate)/100), 0)) AS otheryear,
|
||||
|
||||
Reference in New Issue
Block a user