|
@@ -23,11 +23,11 @@ class ProjectKosztorysCennik {
|
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
|
- -- and o.A_STATUS not in ('DELETED')
|
|
|
|
|
|
|
+ and (o.A_STATUS is null or o.A_STATUS not in ('DELETED'))
|
|
|
and o.ID_PROJECT = :id_project
|
|
and o.ID_PROJECT = :id_project
|
|
|
and o.COMPANIES_ID = :id_company
|
|
and o.COMPANIES_ID = :id_company
|
|
|
and o.RESOURCE_UNIT_TYPE != 'ROBOCIZNA'
|
|
and o.RESOURCE_UNIT_TYPE != 'ROBOCIZNA'
|
|
|
- and o.OFFER_PRICE_PER_RESOURCE_UNIT > 0
|
|
|
|
|
|
|
+ and o.OFFER_PRICE_PER_RESOURCE_UNIT >= 0
|
|
|
");
|
|
");
|
|
|
$sth->bindValue(':id_project', $idProject, PDO::PARAM_INT);
|
|
$sth->bindValue(':id_project', $idProject, PDO::PARAM_INT);
|
|
|
$sth->bindValue(':id_company', $idCompany, PDO::PARAM_INT);
|
|
$sth->bindValue(':id_company', $idCompany, PDO::PARAM_INT);
|
|
@@ -61,11 +61,11 @@ class ProjectKosztorysCennik {
|
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
|
- -- and o.A_STATUS not in ('DELETED')
|
|
|
|
|
|
|
+ and (o.A_STATUS is null or o.A_STATUS not in ('DELETED'))
|
|
|
and o.ID_PROJECT = :id_project
|
|
and o.ID_PROJECT = :id_project
|
|
|
and o.COMPANIES_ID = :id_company
|
|
and o.COMPANIES_ID = :id_company
|
|
|
and o.RESOURCE_UNIT_TYPE = 'ROBOCIZNA'
|
|
and o.RESOURCE_UNIT_TYPE = 'ROBOCIZNA'
|
|
|
- and o.OFFER_PRICE_PER_RESOURCE_UNIT > 0
|
|
|
|
|
|
|
+ and o.OFFER_PRICE_PER_RESOURCE_UNIT >= 0
|
|
|
");
|
|
");
|
|
|
$sth->bindValue(':id_project', $idProject, PDO::PARAM_INT);
|
|
$sth->bindValue(':id_project', $idProject, PDO::PARAM_INT);
|
|
|
$sth->bindValue(':id_company', $idCompany, PDO::PARAM_INT);
|
|
$sth->bindValue(':id_company', $idCompany, PDO::PARAM_INT);
|
|
@@ -99,7 +99,7 @@ class ProjectKosztorysCennik {
|
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
, o.REQUIRED_RESOURCE_UNITS as quantity
|
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
where o.CRM_LISTA_ZASOBOW_ID in({$sqlTypeIdList})
|
|
|
- -- and o.A_STATUS not in ('DELETED')
|
|
|
|
|
|
|
+ and (o.A_STATUS is null or o.A_STATUS not in ('DELETED'))
|
|
|
and o.ID_PROJECT = 0
|
|
and o.ID_PROJECT = 0
|
|
|
and o.COMPANIES_ID = :id_company
|
|
and o.COMPANIES_ID = :id_company
|
|
|
");
|
|
");
|
|
@@ -219,7 +219,7 @@ class ProjectKosztorysCennik {
|
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
from CRM_LISTA_ZASOBOW_OFFERS o
|
|
|
where o.CRM_LISTA_ZASOBOW_ID = {$sqlIdType}
|
|
where o.CRM_LISTA_ZASOBOW_ID = {$sqlIdType}
|
|
|
and (o.A_STATUS is null or o.A_STATUS not in ('DELETED'))
|
|
and (o.A_STATUS is null or o.A_STATUS not in ('DELETED'))
|
|
|
- and o.OFFER_PRICE_PER_RESOURCE_UNIT > 0
|
|
|
|
|
|
|
+ and o.OFFER_PRICE_PER_RESOURCE_UNIT >= 0
|
|
|
{$sqlFiltrProject}
|
|
{$sqlFiltrProject}
|
|
|
");
|
|
");
|
|
|
DBG::_('DBG', '>1', 'cennikRaw', $cennikRaw, __CLASS__, __FUNCTION__, __LINE__);
|
|
DBG::_('DBG', '>1', 'cennikRaw', $cennikRaw, __CLASS__, __FUNCTION__, __LINE__);
|