|
@@ -1044,6 +1044,28 @@ body {font:11px helvetica, arial;}
|
|
|
$active_deals_by_id = PokazOfertyHelper::get_deals_active_by_user($user->ID_BILLING_USERS, false);
|
|
$active_deals_by_id = PokazOfertyHelper::get_deals_active_by_user($user->ID_BILLING_USERS, false);
|
|
|
if(V::get('DBG',0,$_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;display:none">active_deals_by_id (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($active_deals_by_id);echo'</pre>';}
|
|
if(V::get('DBG',0,$_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;display:none">active_deals_by_id (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($active_deals_by_id);echo'</pre>';}
|
|
|
|
|
|
|
|
|
|
+ foreach ($active_deals_by_id as $v_deal_ind => $v_deal) {
|
|
|
|
|
+ $esrv_rows = array();
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $sql_srv_ids = array();
|
|
|
|
|
+ if (!empty($v_deal->services_by_id)) {
|
|
|
|
|
+ $sql_srv_ids = array_keys($v_deal->services_by_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!empty($sql_srv_ids)) {
|
|
|
|
|
+ $sql_srv_ids = implode(",", $sql_srv_ids);
|
|
|
|
|
+ $sql = "select e.`ID`, e.`ID_SERVICES`, e.`E_SERVICE`, e.`E_S_V`
|
|
|
|
|
+ from `EXTRA_SERVICES` as e
|
|
|
|
|
+ where e.`ID_SERVICES` in({$sql_srv_ids})
|
|
|
|
|
+ ";
|
|
|
|
|
+ $res = $db->query($sql);
|
|
|
|
|
+ while ($r = $db->fetch($res)) {
|
|
|
|
|
+ $esrv_rows[$r->ID_SERVICES][] = $r;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $active_deals_by_id[$v_deal_ind]->extra_services = $esrv_rows;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(V::get('DBG',0,$_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left">active_deals_by_id (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($active_deals_by_id);echo'</pre>';}
|
|
|
|
|
+
|
|
|
$pokaz_oferty_view = new PokazOfertyView();
|
|
$pokaz_oferty_view = new PokazOfertyView();
|
|
|
echo $pokaz_oferty_view->print_css();
|
|
echo $pokaz_oferty_view->print_css();
|
|
|
$pokaz_oferty_view->user_with_services($user, $active_deals_by_id);
|
|
$pokaz_oferty_view->user_with_services($user, $active_deals_by_id);
|