/html.php
PHP | 1729 lines | 1496 code | 170 blank | 63 comment | 109 complexity | a87a270e071aac4140a3457bc006c73a MD5 | raw file
- <?php
- //-------------------------------------------------------
- function taulaResumComanda() //llista cac
- {
- global $mPars,$rutaStr,$mParametres;
-
- if($mPars['grup_id']==0)
- {
- echo "
- <p style='font-size:10px;'>* Resum del total reservat segons el % MS dels productors:
- <br>
- (s'apliquen els filtres seleccionats)
- </p>
- ";
- }
- else
- {
- echo "
- <p style='font-size:10px;'>* Resum del total de la comanda segons el % MS dels productors:
- <br>
- (no s'apliquen els filtres seleccionats)</p>
- ";
- }
-
- echo "
- <table border='0' cellspacing='1' cellpadding='1' align='center' style='width:400px;'>
- <tr>
- <th align='right' bgcolor='#D1FABB' style='width:50%; '>
- </th>
- <th align='right' bgcolor='#D1FABB' style='width:10%; '>
- <p></p>
- </th>
- <th align='right' bgcolor='#D1FABB' style='width:13%; '>
- <p>ums</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' style='width:13%; '>
- <p>Ecos</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' style='width:13%;'>
- <p>Euros</p>
- </th>
- </tr>
-
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Cost Transport Extern per kg sobre el producte\"><p style='font-size:11px;'> (CTEK)</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right'>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtekUnitats'>
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtekEcos' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtekEuros' >
- <p>0</p>
- </td>
- </tr>
-
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Cost Transport Extern Repartit\"><p style='font-size:11px;'> (CTER)</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' >
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalCterUnitats' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCterEcos' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCterEuros' >
- <p>0</p>
- </td>
- </tr>
-
-
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Cost Transport Intern per kg sobre el producte\"><p style='font-size:11px;'> (CTIK)</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' style='width:10%;'>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikUnitats' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikEcos'>
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikEuros'>
- <p>0</p>
- </td>
- </tr>
-
-
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Cost Transport Intern Repartit\"><p style='font-size:11px;'> (CTIR)</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' style='width:10%;'>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtirUnitats'>
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtirEcos' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtirEuros'>
- <p>0</p>
- </td>
- </tr>
-
- <tr>
- <td bgcolor='#D1FABB' align='left'>
- <a title=\"Total Cost Transport Productes CAC\"><p style='font-size:11px;'> Total Cost Transport (CAC)</p></a>
- </td>
- <td bgcolor='#D1FABB' align='right' style='width:10%;'>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportUnitats'>
- <p>0</p>
- </th>
-
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportEcos'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportEuros'>
- <p>0</p>
- </th>
- </tr>
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Total kg\"><p style='font-size:11px;'> Total kg</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalQuantitat' >
- <p>0</p>
- </td>
- <td bgcolor='#EDF8E6' >
- </td>
-
-
- <td bgcolor='#EDF8E6' align='right'>
- </td>
-
- <td bgcolor='#EDF8E6' align='right'>
- </td>
- </tr>
- <tr>
- <td bgcolor='#D1FABB' align='left'>
- <a title=\"Preu productes CAC\"><p style='font-size:11px;'> <b>Preu productes CAC</b></p></a>
- </td>
- <td bgcolor='#D1FABB' align='right'>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalUnitats'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalEcos'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalEuros'>
- <p>0</p>
- </th>
- </tr>
-
- <tr>
- <td bgcolor='#C0FAF8' align='left'>
- <a title=\"Fons Despeses CAC (".$mParametres['FDCpp']['valor']."% sobre preus, ".$mParametres['msFDCpp']['valor']."% MS)\"><p style='font-size:11px;'> <b>Fons despeses CAC</b></p></a>
- </td>
- <td bgcolor='#C0FAF8' align='right'>
- </td>
- <th bgcolor='#C0FAF8' align='right' id='td_totalUnitatsFDC'>
- <p>0</p>
- </th>
-
- <th bgcolor='#C0FAF8' align='right' id='td_totalEcosFDC'>
- <p>0</p>
- </th>
-
- <th bgcolor='#C0FAF8' align='right' id='td_totalEurosFDC'>
- <p>0</p>
- </th>
- </tr>
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Total kg Intercanvis entre Rebosts\"><p style='font-size:11px;'> <b>kg Inter-Rebosts</b></p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalKgIntercanvisRebosts'>
- <p>0</p>
- </td>
- <td bgcolor='#EDF8E6' align='right' style='width:10%;'>
- </td>
- <td bgcolor='#EDF8E6' align='right'><p> </p></td>
-
- <td bgcolor='#EDF8E6' align='right' ><p> </p></td>
- </tr>
- <tr>
- <th bgcolor='#D1FABB' align='left'>
- <a title=\"Cost transport Intercanvis entre Rebosts\"><p style='font-size:11px;'> <b>Cost Transp. Inter-Rebosts</b></p></a>
- </th>
-
- <th bgcolor='#D1FABB' align='right' style='width:10%;'>
- </th>
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportIntercanvisRebostsUnitats'><p> </p></th>
-
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportIntercanvisRebostsEcos'><p> </p></th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportIntercanvisRebostsEuros'><p> </p></th>
- </tr>
- <tr>
- <th bgcolor='#D1FABB' align='right'>
- <a title=\"Import Total\"><p style='font-size:11px;'> <b>Import Total</b></p></a>
- </th>
- <td bgcolor='#D1FABB' align='right' ' >
- <p></p>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaUnitats' >
- </th>
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaEcos' >
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaEuros' >
- </th>
- </tr>
- <tr>
- <td bgcolor='#D1FABB' align='right' id='td_pcMs'>
- <a title=\"% moneda social de la comanda, segons la moneda social dels productes demanats\"><p style='font-size:11px;'> </p></a>
- </td>
- <td bgcolor='#D1FABB' align='right' >
- </td>
-
- <td bgcolor='#D1FABB' align='right' style='width:10%;' >
- </td>
-
- <td bgcolor='#D1FABB' >
- </td>
-
- <td bgcolor='#D1FABB' >
- </td>
- </tr>
- </table>
- ";
- return;
- }
- //-------------------------------------------------------
- function taulaResumComandaLocal()
- {
- global $rutaStr,$mPropietatsPeriodeLocal;
-
- echo "
- <p> Resum de la comanda segons el % MS dels productors:</p>
- <table border='0' cellspacing='1' cellpadding='1' align='center' style='width:400px;'>
- <tr>
- <th align='right' bgcolor='#D1FABB' style='width:50%; '>
- </th>
- <th align='right' bgcolor='#D1FABB' style='width:10%; '>
- <p></p>
- </th>
- <th align='right' bgcolor='#D1FABB' style='width:13%; '>
- <p>ums</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' style='width:13%; '>
- <p>Ecos</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' style='width:13%;'>
- <p>Euros</p>
- </th>
- </tr>
-
- ";
- /*
- echo "
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Cost Transport Intern per kg sobre el producte\"><p style='font-size:11px;'> (CTIK)</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' style='width:10%;'>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikUnitats' >
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikEcos'>
- <p>0</p>
- </td>
-
- <td bgcolor='#EDF8E6' align='right' id='td_totalCtikEuros'>
- <p>0</p>
- </td>
- </tr>
- ";
- */
- echo "
- <tr>
- <td bgcolor='#D1FABB' align='left'>
- <a title=\"Total Cost Transport Productes\"><p style='font-size:11px;'> Total Cost Transport</p></a>
- </td>
- <td bgcolor='#D1FABB' align='right' style='width:10%;'>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportUnitats'>
- <p>0</p>
- </th>
-
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportEcos'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalCostTransportEuros'>
- <p>0</p>
- </th>
- </tr>
- <tr>
- <td bgcolor='#EDF8E6' align='left'>
- <a title=\"Total kg\"><p style='font-size:11px;'> Total kg</p></a>
- </td>
- <td bgcolor='#EDF8E6' align='right' id='td_totalQuantitat' >
- <p>0</p>
- </td>
- <td bgcolor='#EDF8E6' >
- </td>
-
-
- <td bgcolor='#EDF8E6' align='right'>
- </td>
-
- <td bgcolor='#EDF8E6' align='right'>
- </td>
- </tr>
- <tr>
- <td bgcolor='#D1FABB' align='left'>
- <a title=\"Preu productes\"><p style='font-size:11px;'> <b>Preu productes</b></p></a>
- </td>
- <td bgcolor='#D1FABB' align='right'>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalUnitats'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalEcos'>
- <p>0</p>
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalEuros'>
- <p>0</p>
- </th>
- </tr>
-
- <tr>
- <td bgcolor='#C0FAF8' align='left'>
- <p style='font-size:11px;'> Fons despeses Grup:<br>
- (".$mPropietatsPeriodeLocal['fdLocal']."% sobre preus, ".$mPropietatsPeriodeLocal['ms_fdLocal']."% MS)</p>
- </td>
- <td bgcolor='#C0FAF8' align='right'>
- </td>
- <th bgcolor='#C0FAF8' align='right' id='td_totalUnitatsFDC'>
- <p>0</p>
- </th>
-
- <th bgcolor='#C0FAF8' align='right' id='td_totalEcosFDC'>
- <p>0</p>
- </th>
-
- <th bgcolor='#C0FAF8' align='right' id='td_totalEurosFDC'>
- <p>0</p>
- </th>
- </tr>
- <tr>
- <th bgcolor='#D1FABB' align='right'>
- <a title=\"Import Total\"><p style='font-size:11px;'> <b>Import Total</b></p></a>
- </th>
- <td bgcolor='#D1FABB' align='right' ' >
- <p></p>
- </td>
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaUnitats' >
- </th>
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaEcos' >
- </th>
-
- <th bgcolor='#D1FABB' align='right' id='td_totalFacturaEuros' >
- </th>
- </tr>
- <tr>
- <td bgcolor='#D1FABB' align='right' id='td_pcMs'>
- <a title=\"% moneda social de la comanda, segons la moneda social dels productes demanats\"><p style='font-size:11px;'> </p></a>
- </td>
- <td bgcolor='#D1FABB' align='right' >
- </td>
-
- <td bgcolor='#D1FABB' align='right' style='width:10%;' >
- </td>
-
- <td bgcolor='#D1FABB' >
- </td>
-
- <td bgcolor='#D1FABB' >
- </td>
- </tr>
- </table>
- ";
- return;
- }
- //------------------------------------------------------------------------------
- function taulaEinesGrups()
- {
- global $mAjuda,
- $mPars,
- $mRebost,
- $mProductors,
- $mCategories,
- $mSubCategories,
- $mEtiquetes,
- $mColors,
- $colorLlista;
-
-
- echo "
- <table style='width:100%;' align='center'>
- <tr>
- <td align='center' valign='bottom' style='width:16.66%;'>
- <table>
- <tr>
- <td><p>cercador 'id':</b>".(html_ajuda1('html.php',34))."</p>
- <input id='i_cercarProducteId' type='text' size='6' value='".$mPars['crPrId']."'>
- <input type='button' onClick=\"javascript:if(checkCercarProdId()){enviarFpars('comandes.php?crPrId='+cercarProdId,'_self');}\" value='cercar'>
- </td>
- </tr>
- </table>
- </td>
- <td align='center' valign='bottom' style='width:16.66%;'>
- <table>
- <tr>
- <td><p>cercador text:</b>".(html_ajuda1('html.php',35))."</p>
- ";
- if($mPars['crPrText']!='')
- {
- $bgcolor='orange';
- }
- else
- {
- $bgcolor='white';
- }
- echo "
- <input id='i_cercarProducteText' type='text' size='10' style='background-color:".$bgcolor."' value='".(urldecode($mPars['crPrText']))."'>
- <input type='button' onClick=\"javascript:if(checkCercarProdText()){enviarFpars('comandes.php?crPrText='+cercarProdText,'_self');}\" value='cercar'>
- </td>
- </tr>
- </table>
- </td>
-
- <td align='center' valign='bottom' style='width:16.66%;'>
- <table>
- <tr>
- <td>
- <select id='sel_vProductor' onChange=\"javascript: f_vistaProductor();\">
- ";
- $selected='';
- $selected2='selected';
- while(list($key,$mProductor)=each($mProductors))
- {
- //v37- condicio
- if($mPars['selLlistaId']==0)
- {
- if($mPars['vProductor']==$mProductor['id']){$selected='selected';$selected2='';}else{$selected='';}
- if($mProductor['estat']=='1')
- {
- echo "
- <option ".$selected." value='".$mProductor['id']."'>".(urldecode($mProductor['projecte']))."</option>
- ";
- }
- }
- else
- {
- if(@substr_count($mRebost['productors_associats'],','.$mProductor['id'].',')>0)
- {
- if($mPars['vProductor']==$mProductor['id']){$selected='selected';$selected2='';}else{$selected='';}
- if($mProductor['estat']=='1')
- {
- echo "
- <option ".$selected." value='".$mProductor['id']."'>".(urldecode($mProductor['projecte']))."</option>
- ";
- }
- }
- }
- }
- echo "
- <option ".$selected2." value='TOTS'>- tots els productors -</option>
- ";
- reset($mProductors);
- echo "
- </select>
- </td>
- <td>
- ".(html_ajuda1('html.php',1))."
- </td>
- </tr>
- </table>
- ";
- /*
- echo "
- <td align='center' valign='bottom' style='width:17%;'>
- <select id='sel_vCategoria' onChange=\"javascript: f_vistaCategoria();\">
- ";
- $selected='';
- $selected2='selected';
- while(list($key,$categoria)=each($mCategories))
- {
- if($mPars['vCategoria']==$categoria){$selected='selected';$selected2='';}else{$selected='';}
- echo "
- <option ".$selected." value='".$categoria."'>".$categoria."</option>
- ";
- }
- echo "
- <option ".$selected2." value='TOTS'>- totes les categories -</option>
- ";
- reset($mCategories);
- echo "
- </select>
- ".(html_ajuda1($mAjuda['html.php'][16]))."
- </td>
- ";
- */
- echo "
- <td align='center' valign='bottom' style='width:16.66;'>
- <table>
- <tr>
- <td>
- <select id='sel_vSubCategoria' onChange=\"javascript: f_vistaSubCategoria();\">
- ";
- $disabled='disabled';
- $selected='';
- $selected2='selected';
- while(list($key,$mSubCategoria)=each($mSubCategories))
- {
- if($mPars['vSubCategoria']==$mSubCategoria['categoria0'].'-'.$mSubCategoria['categoria10']){$selected='selected';$selected2='';}else{$selected='';}
- if($mSubCategoria['estoc_previst']>0){$disabled='';}else{$disabled='disabled';}
- echo "
- <option ".$selected." ".$disabled." value='".$mSubCategoria['categoria0'].'-'.$mSubCategoria['categoria10']."'>".$mSubCategoria['categoria0'].'-'.$mSubCategoria['categoria10']."</option>
- ";
- }
- echo "
- <option ".$selected2." value='TOTS'>- totes les SUB-categories -</option>
- ";
- reset($mSubCategories);
- echo "
- </select>
- </td>
- <td>
- ".(html_ajuda1('html.php',2))."
- </td>
- </tr>
- </table>
- </td>
- <td align='left' valign='bottom' style='width:16.66;'>
- <table>
- <tr>
- <td>
- <select id='sel_etiqueta' onChange=\"javascript: f_vistaEtiqueta();\">
- ";
- $selected='';
- $selected2='selected';
- while(list($key,$mEtiqueta)=each($mEtiquetes))
- {
- if($mPars['etiqueta']==$mEtiqueta['nom']){$selected='selected';$selected2='';}else{$selected='';}
- echo "
- <option style='color:".$mEtiqueta['color'].";' ".$selected." value='".$mEtiqueta['nom']."'>".$mEtiqueta['nom']."</option>
- ";
- }
- echo "
- <option ".$selected2." value='TOTS'>- cap etiqueta -</option>
- ";
- reset($mEtiquetes);
- echo "
- </select>
- </td>
- <td>
- ".(html_ajuda1('html.php',3))."
- </td>
- </tr>
- </table>
- </td>
- <td align='center' valign='bottom' style='width:16.66;'>
- <table>
- <tr>
- <td>
- <select id='sel_etiqueta2' onChange=\"javascript: f_vistaEtiqueta2();\">
- ";
- $selected='';
- $selected2='selected';
- while(list($key,$mEtiqueta)=each($mEtiquetes))
- {
- if($mPars['etiqueta2']==$mEtiqueta['nom']){$selected='selected';$selected2='';}else{$selected='';}
- echo "
- <option ".$selected." style='color:".$mEtiqueta['color'].";' value='".$mEtiqueta['nom']."'>".$mEtiqueta['nom']."</option>
- ";
- }
- echo "
- <option ".$selected2." value='CAP'>- cap etiqueta -</option>
- ";
- reset($mEtiquetes);
- echo "
- </select>
- </td>
- <td>
- ".(html_ajuda1('html.php',4))."
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- ";
- return;
- }
- //------------------------------------------------------------------------------
- function html_selectorUsuarisGrup()
- {
- global $mPars,$mUsuarisGrupRef,$mUsuarisRef,$mAnticsUsuarisGrupAmbComanda,$mAjuda;
-
- $styleComanda='';
-
- echo "
- <table align='left'>
- <tr>
- <td valign='bottom'>
- <table><tr><td><p>Membres actuals:</p></p></td><td> ".(html_ajuda1('html.php',5))."</td></tr></table>
- <select onChange=\"javascript:enviarFpars('comandes.php?sUid='+this.value,'_self');\">
- ";
- $selected0='';
- $selected1='selected';
-
- while(list($key,$mUsuari_)=each($mUsuarisGrupRef))
- {
- if($mUsuari_['usuari']['estat']=='actiu')
- {
- if($mUsuari_['usuari']['id']==$mPars['selUsuariId']){$selected0='selected';$selected1='';}
-
- if(array_key_exists($mPars['grup_id'],$mUsuari_['comanda']))
- {
- $styleComanda=" style='color:#007700;' ";
- }
- else
- {
- $styleComanda='';
- }
- echo "
- <option ".$selected0." ".$styleComanda." value='".$mUsuari_['usuari']['id']."'>".(urldecode($mUsuari_['usuari']['usuari']))." (".$mUsuari_['usuari']['email'].")</option>
- ";
- $selected0='';
- }
- }
- reset($mUsuarisGrupRef);
- echo "
- <option ".$selected1." value='0'>- GRUP -</option>
- </select>
- </p>
- </td>
- </tr>
- </table>
- ";
- if(count($mAnticsUsuarisGrupAmbComanda)>0)
- {
- $styleComanda=" style='color:#007700;' ";
- echo "
- <br>
- <table align='left'>
- <tr>
- <td valign='bottom'>
- <p>Membres anteriors amb comanda:
- <select onChange=\"javascript:val=this.value; if(val!=''){enviarFpars('comandes.php?sUid='+this.value,'_self');}\">
- ";
- $selected0='';
- $selected1='selected';
- $estat='';
- while(list($key,$mUsuari_)=each($mAnticsUsuarisGrupAmbComanda))
- {
- if($mUsuari_['usuari']['estat']=='inactiu'){$estat='[inactiu]';}else{$estat='';}
- if($mUsuari_['usuari']['id']==$mPars['selUsuariId']){$selected0='selected';$selected1='';}
-
- echo "
- <option ".$selected0." ".$styleComanda." value='".$mUsuari_['usuari']['id']."'>".(urldecode($mUsuari_['usuari']['usuari']))." (".$mUsuari_['usuari']['email'].")".$estat."</option>
- ";
- $selected0='';
- }
- reset($mAnticsUsuarisGrupAmbComanda);
- echo "
- <option ".$selected1." value='0'>- GRUP -</option>
- </select>
- </p>
- </td>
- </tr>
- </table>
- ";
-
- }
- return;
- }
- //------------------------------------------------------------------------------
- function html_triaGrup()
- {
- global $mGrupsUsuari,$mPars,$parsChain;
-
-
- echo "
- <form id='f_grup' name='f_grup' action='comandes.php' target='_blank' method='post'>
- <table align='center' width='100%'>
- <tr>
- <td align='left' valign='bottom' width='50%'>
- <p>Selecciona un dels teus grups:<br>
- <select name='sel_grupUsuari' onChange=\"javascript: document.getElementById('f_grup').submit();\">
- ";
- $selected1='';
- $selected2='selected';
- $selected3='';
- while(list($grupId,$mGrupUsuari)=each($mGrupsUsuari))
- {
- if($mPars['grup_id']!=0)
- {
- if($grupId==$mPars['grup_id']){$selected1='selected'; $selected2=''; $selected3='';}else{$selected1='';}
- }
-
- echo "
- <option ".$selected1." value='".$grupId."'>".(urldecode($mGrupUsuari['nom']))."</option>
- ";
- }
- reset($mGrupsUsuari);
- if($mPars['nivell']=='sadmin' OR $mPars['nivell']=='admin' OR $mPars['nivell']=='coord')
- {
- echo "
- <option ".$selected2." value='0'>CAC</option>
- ";
- }
- echo "
- </select>
- </p>
- </td>
- </tr>
- </table>
- <input type='hidden' name='i_pars' value='".$parsChain."'>
- </form>
- ";
- return;
- }
- //----------------------------------------
- function mostrarDadesRebost($db)
- {
- global
- $periodeBases,
- $colorLlista,
- $mAbonamentsCarrecs,
- $mAjuda,
- $mCategoriesGrup,
- $mColors,
- $mComandaPerProductors,
- $mIncidencies,
- $mGrupsUsuari,
- $mGrup,
- $mPars,
- $mPeticionsGrup,
- $mRebosts,
- $mUsuarisRef,
- $mUsuarisGrupRef,
- $mParametres,
- $mPropietatsUsuari,
- $mPropietatsUsuaris,
- $mReservesComandes,
- $mPropietatsPeriodeLocal,
- $mRuta;
-
-
- echo "
- <table width=100%' bgcolor='".$mColors['table']."'>
- <tr>
- <td id='td_missatgeAlerta' style=' width:100%;' align='center' valign='bottom'>
- </td>
- </tr>
- <tr>
- <td id='td_recordatoriGuardarComanda' align='center' width='100%' valign='bottom'>
- </td>
- </tr>
- </table>
-
- <table border='0' width='100%' bgcolor='".$mColors['table']."'>
- <tr>
- <td valign='middle' align='left' width='5%'>
- <table align='left'>
- <tr>
- <td>
- <a title='Inici'><img src='imatges/casap.jpeg' ALT=\"pāgina d'usuari\" style='cursor:pointer' onClick=\"javascript: enviarFpars('index.php?us=".$mPars['usuari_id']."&pasw=".$mPars['pasw']."','_self')\"></a>
- </td>
- <td>
- <a title='Sortir'><img src='imatges/out2p.jpg' ALT=\"sortir\" style='cursor:pointer' onClick=\"javascript: document.getElementById('i_pars').value='';enviarFpars('index.php','_self')\"></a>
- </td>
- </tr>
- </table>
- </td>
-
- <td valign='middle' align='left' width='15%'>
- <p class='compacte' >
- Usuari:<b> ".(urldecode($mPars['usuari']))."</b> (".$mPars['nivell'].")
- </p>
- ";
-
- if(isset($mPropietatsUsuari['comissio']) && $mPropietatsUsuari['comissio']!='')
- {
- echo "
- <p class='p_micro2' >Comissió/oficina: ";
- $mComissionsUsuari=explode(',',$mPropietatsUsuari['comissio']);
- while(list($key,$val)=each($mComissionsUsuari))
- {
- echo "<br>".$mPropietatsUsuaris['comissio'][$val];
- }
- echo "</p>
- ";
- }
- else
- {
- echo "
- <p class='compacte' >Comissió/oficina: - CAP -</p>
- ";
- }
- echo "
- </td>
-
- <td align='middle' width='50px'>
- ";
- $mostrar=0;
-
- $botoText="guardar pre-comanda";
- if
- (
- $mPars['grup_id']!=0
- &&
- $mPars['nivell']!='visitant'
- &&
- (
- $mPars['nivell']=='admin' || $mPars['nivell']=='sadmin'
- ||
- (
- !$mParametres['precomandaTancada']['valor']
- &&
- (
- (
- $mPars['selUsuariId']!='0'
- &&
- $mPars['selUsuariId']==$mPars['usuari_id']
- )
- ||
- (
- $mPars['selUsuariId']!='0'
- &&
- $mPars['usuari_id']==@$mGrup['usuari_id']
- )
- ||
- (
- $mPars['selUsuariId']=='0'
- &&
- $mPars['usuari_id']==@$mGrup['usuari_id']
- )
- )
- )
- )
- )
- {
- if($mPars['selUsuariId']==0)
- {
- $botoText='guardar forma pagament';
- }
- if(($mPars['nivell']=='sadmin' || $mPars['nivell']=='admin') && $mParametres['precomandaTancada']['valor'])
- {
- echo "<font style='color:#FC7202; font-size:12px;'>[".$mPars['nivell']."]</font><br>";
- }
- echo "
- <a title='".$botoText."'><img src='imatges/guardarpp.gif' style='cursor:pointer;' onClick=\"guardarComanda();\" value='".$botoText."'></a>
- ";
- }
- echo "
- </td>
- ";
-
- if(@$mPars['grup_id']!=0 && (($mPars['selUsuariId']==0 && (str_replace(',','',$mGrup['productors_associats'])!='')) || selUsuariEsProductorAssociatDelGrup($db)))
- {
- echo "
- <td valign='bottom' width='50px'>
- <a title=\"productes dels productors associats al grup que es troben a l'inventari de la CAC\">
- <img src='imatges/productesp.gif' style='cursor:pointer;' onClick=\"enviarFpars('inventariPerProductors.php?mRef=".$mGrup['id'].'-'.$mGrup['productors_associats']."&psw=".$mPars['pasw']."','_blank');\">
- </a>
- </td>
- ";
- }
- //*v36-3-12-15-condicional
- if(
- count($mRuta)==1
- &&
- (
- $mPars['grup_id']=='0'
- ||
- (
- substr_count($mGrup['categoria'],'magatzem')>0
- &&
- $mPars['selUsuariId']==0
- )
- )
- )
- {
- echo "
- <td width='5px'>
- <p> </p>
- </td>
-
- <td valign='bottom' width='50px'>
- <a title='gestió inventaris magatzem CAC local'>
- <img src='imatges/magatzemp.gif' style='cursor:pointer;' onClick=\"javascrit:enviarFpars('gestioMagatzems.php?mRef=".$mPars['grup_id']."','_blank');\">
- </a>
- </td>
-
- <td>
- <p> </p>
- </td>
-
- ";
- }
- echo "
- ";
- if($mPars['nivell']!='visitant')
- {
- echo "
- <td valign='bottom' align='right' width='60%'>
- <table width='100%'>
- <tr>
- <td align='left'>
- ";
- if($mPars['nivell']=='sadmin' || $mPars['nivell']=='admin' || $mPars['nivell']=='coord' || $mPars['usuari_id']==$mGrup['usuari_id'])
- {
- echo "
- ";
- if($mPars['grup_id']!='0')
- {
- html_selectorUsuarisGrup();
- }
- }
- echo "
- <td align='left'>
- ";
- mostrarSelectorRuta(1,'comandes.php');
- if
- (
- $mPars['grup_id']!=0
- &&
- (
- count($mRuta)==1 //no es llista especial
- ||
- $mRuta[0]=='grups' //es llista local
- )
- )
- {
- echo "
-
- ";
- if($mParametres['precomandaTancada']['valor']==1)
- {
- $imatgeSemafor='semafor_vermell.gif';
- $semaforText="Aquest periode de reserves a la llista de CAC estā TANCAT";
- }
- else
- {
- $imatgeSemafor='semafor_verd.gif';
- $semaforText="Aquest periode de reserves a la llista de la CAC estā OBERT";
- }
-
-
- echo "
- </td>
- <td align='left'>
- ";
- mostrarSelectorLlista('comandes.php');
- echo "
- </td>
- ";
- }
- echo "
- </tr>
- </table>
- </td>
- ";
- }
- echo "
-
- </tr>
- </table>
-
- <table bgcolor='".$mColors['comandes.php'][$colorLlista]['t2_bg']."' bordercolor='#A2CBCA' border='0' width='100%' align='center'>
- <tr>
- <td width='100%' valign='middle' align='left'>
- <table border='0' align='left' valign='top' style='width:100%;'>
- <tr>
- <td width='25%' align='left' valign='top'>
- <p class='compacte' style='font-size:16px;'>
- <b>GRUP: ".(urldecode($mGrup['nom']))." </b></p>
- <table width='100%'>
- <tr>
- <td>
- <a title='membres del grup'><img src='imatges/grup2p.gif'></a>
- </td>
- <td>
- ";
- if(isset($mPars['grup_id']) && $mPars['grup_id']!='0')
- {
- if(isset($mUsuarisGrupRef[$mGrup['usuari_id']]))
- {
- $mRespGrup=$mUsuarisGrupRef[$mGrup['usuari_id']]['usuari'];
- }
- else
- {
- $mRespGrup=$mUsuarisRef[$mGrup['usuari_id']];
- }
- echo "
- <p class='nota'>
- Responsable: ".(strtoupper(urldecode($mRespGrup['usuari'])))."
- <br>(".@$mRespGrup['email'].")
- </p>
- ";
- }
- echo "
- </td>
- </tr>
- </table>
- </td>
- <td width='25%' valign='top'>
- ";
- if($mPars['grup_id']==0)
- {
- echo "
- <p class='compacte' style='font-size:12px;'>
- <input type='checkbox' ";
- if($mPars['veureProductesDisponibles']==1)
- {
- echo " CHECKED ";
- }
- echo "
- id='ck_veureProductesDisponibles' onClick=\"f_veureProductesDisponibles();\" value='".$mPars['veureProductesDisponibles']."'>
- Veure només productes actius ".(html_ajuda1('html.php',21))."
- </p>
- ";
- }
- else if($mPars['selUsuariId']==0)
- {
- echo "
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('totals');\" style='cursor:pointer;'><u>Vista Albarā (totals)</u></p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('desglossat');\" style='cursor:pointer;'><u>Vista Albarā (desglossat)</u> ".(html_ajuda1('html.php',9))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('resumUsuaris');\" style='cursor:pointer;'><u>Resum Imports Usuaries</u> ".(html_ajuda1('html.php',10))."</p>
- ";
- if(substr_count($mGrup['categoria'],'rebost')>0 && $mPars['selRutaSufix']*1<=1503)
- {
- echo "
- <p class='compacte' style='color:#000000; cursor:pointer;' onClick=\"enviarFpars('tramsRuta.php','_blank');\"><u>Full de ruta CAC</u></p>
- ";
- }
- }
- else
- {
- echo "
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('');\" style='cursor:pointer;'><u>Albarā (usuari)</u> ".(html_ajuda1('html.php',11))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('desglossat');\" style='cursor:pointer;'><u>Albarā (grup)</u> ".(html_ajuda1('html.php',12))."</p>
- ";
- }
- echo "
- <p class='compacte' onClick=\"enviarFpars('db_llistaProductesCSV.php','_blank');\" style='color:#885500; cursor:pointer;'><u>vista productes segons filtre actual (CSV)</u> ".(html_ajuda1('html.php',13))."</p>
- ";
- $getP=selUsuariEsProductorAssociatDelGrup($db);
- if
- (
- @$mPars['grup_id']==0
- ||
- @$mPars['grup_id']!=0 &&
- (
- (
- $mPars['selUsuariId']==0
- &&
- (
- substr_count($mGrup['categoria'],',1-rebost')>0 || substr_count($mGrup['categoria'],',1-productorBasic')>0
- )
- )
- ||
- (
- $mPars['selUsuariId']!=0 && $getP!=false
- )
- )
- )
- {
- if($getP!=false)
- {
- echo "
- <p class='compacte' onClick=\"enviarFpars('distribucioGrups.php?getP=".$getP."','_blank');\" style='color:#000000; cursor:pointer;'><u><b>Quč t'estan demanant els altres GRUPS</b></u></p>
- ";
- }
- else
- {
- echo "
- <p class='compacte' onClick=\"enviarFpars('distribucioGrups.php?getP=".$getP."','_blank');\" style='color:#000000; cursor:pointer;'><u>Quč estan demanant els altres GRUPS</u></p>
- ";
- }
- }
- echo "
- </td>
-
- <td width='25%' align='left' valign='top'>
- ";
- if
- (
- (
- $mPars['nivell']=='sadmin'
- ||
- $mPars['nivell']=='admin'
- ||
- $mPars['nivell']=='coord'
- ||
- $mPars['usuari_id']==$mGrup['usuari_id']
- )
- &&
- $mPars['selUsuariId']==0
- )
- {
- if($mPars['grup_id']==0){$text1='Missatges a usuaries';}else{$text1='Missatges a membres del grup';}
- echo "
- <p class='compacte' onClick=\"javascript:enviarFpars('mail.php','_blank');\" style='cursor:pointer;'>
- <u>".$text1."</u> ".(html_ajuda1('html.php',7))."</p>
- ";
- if(substr_count($mGrup['categoria'],'magatzem')>0 || substr_count($mGrup['categoria'],'rebost')>0)
- {
- if(isset($mReservesComandes[$mPars['grup_id']]))
- {
- $recepcionsText="<font style='color:#ff0000;'><b>".(count($mReservesComandes[$mPars['grup_id']]))."</b></font>";
- }
- else
- {
- $recepcionsText="<font style='color:#000000;'><b>0</b></font>";
- }
- echo "
- <p class='compacte' style='cursor:pointer;' onClick=\"enviarFpars('vistaReservesSZ.php','_blank');\" >
- <u>Recepcions d'altres comandes</u> [".$recepcionsText."] ".(html_ajuda1('html.php',8))."
- </p>
- ";
- }
- if(count($mPeticionsGrup)>0){ $peticionsText="<font style='color:#ff0000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- else { $peticionsText="<font style='color:#000000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- if(count($mIncidencies)>0){ $incidenciesText="<font style='color:#ff0000;'><b>".(count($mIncidencies))."</b></font>";}
- else { $incidenciesText="<font style='color:#000000;'><b>".(count($mIncidencies))."</b></font>";}
- if(count($mAbonamentsCarrecs)>0){ $incidenciesAbcaText="<font style='color:#ff0000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- else { $incidenciesAbcaText="<font style='color:#000000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- //v37-condicio
- if(count($mRuta)==1 || $mPars['grup_id']==0) //no es ruta especial
- {
- echo "
- <p class='compacte' onClick=\"javascript: enviarFpars('gestioGrup.php?gRef=".$mPars['grup_id']."','_blank');\" style='color:#000000; cursor:pointer;'><u>Peticions d'usuaries</u> [".$peticionsText."]
- ";
- if($mPars['selUsuariId']==0){echo " ".(html_ajuda1('html.php',6));}
- }
-
-
-
- echo "</p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=incd&gRef=".$mPars['grup_id']."&vLlista=0','_blank');\" style='color:#000000; cursor:pointer;'><u>Incidčncies</u> [".$incidenciesText."]</p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=abCa&gRef=".$mPars['grup_id']."&vLlista=0','_blank');\" style='color:#000000; cursor:pointer;'><u>Abonaments/cārrecs</u> [".$incidenciesAbcaText."]</p>
- ";
-
- }
- else if($mPars['grup_id']!='0' && $mPars['selUsuariId']!='0')
- {
- if(count($mPeticionsGrup)>0){ $peticionsText="<font style='color:#ff0000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- else { $peticionsText="<font style='color:#000000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- if(count($mIncidencies)>0){ $incidenciesText="<font style='color:#ff0000;'><b>".(count($mIncidencies))."</b></font>";}
- else { $incidenciesText="<font style='color:#000000;'><b>".(count($mIncidencies))."</b></font>";}
- if(count($mAbonamentsCarrecs)>0){ $incidenciesAbcaText="<font style='color:#ff0000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- else { $incidenciesAbcaText="<font style='color:#000000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- echo "
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=incd&gRef=".$mPars['grup_id']."&vLlista=0','_blank');\" style='color:#000000; cursor:pointer;'><u>incidčncies</u> [".$incidenciesText."]</p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=abCa&gRef=".$mPars['grup_id']."&vLlista=0','_blank');\" style='color:#000000; cursor:pointer;'><u>abonaments/cārrecs</u> [".$incidenciesAbcaText."]</p>
- ";
- }
-
- echo "
- </td>
- <td width='25%' valign='top'>
- ";
- //<p class='compacte' onClick=\"javascript: enviarFpars('llistat_grups.php','_blank');\" style='color:#000000; cursor:pointer;'><u>Llistat de grups i equip cac</u></p>
- //<p class='compacte' onClick=\"javascript: enviarFpars('informacio_gestor.php','_blank');\" style='color:#000000; cursor:pointer;'><u>Info general sobre el gestor</u></p>
- echo "
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td width='100%'>
- <table width='100%'>
- <tr>
- <td align='left' valign='bottom' width='20%'>
- </td>
- <td align='left' valign='bottom' width='70%'>
- <table style='width:100%;'>
- <tr>
- <td align='left' width='100%' valign='bottom'>
- ";
- if($mPars['grup_id']!=0)
- {
- echo "
- <p style='font-size:11px;'>* A l'import total s'inclouen tots els productes de la comanda del GRUP o de l'usuari, independentment del filtre aplicat i de la pāgina mostrada.</p>
- <p style='font-size:11px;'>* Les reserves de productes especials es mostren pero no es comptabilitzen</p>
- ";
- }
- else
- {
- echo "
- <p style='font-size:11px;'>* A l'import total s'inclouen tots els productes de la comanda CAC seleccionats segons els filtres, independentment de la pāgina mostrada.</p>
- <p style='font-size:11px;'>* Es ressalten en verd tots els productes oferits per la CAC, excepte els productes especials</p>
- ";
- }
- echo "
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- ";
- return;
- }
- //----------------------------------------
- function mostrarDadesRebostGrup($db)
- {
- global
- $hiHaUnAltrePeriodeNoTancat,
- $hiHaAlgunPeriodeNoTancat,
- $mIncidencies,
- $mAbonamentsCarrecs,
- $mAjuda,
- $mDatesReservesLocals,
- $mPeticionsGrup,
- $mGrupsUsuari,
- $mGrup,
- $mGrupsRef,
- $mRebosts,
- $mPars,
- $mCategoriesGrup,
- $mColors,
- $colorLlista,
- $mComandaPerProductors,
- $mUsuarisRef,
- $mUsuarisGrupRef,
- $mParametres,
- $mReservesComandes,
- $periodeBases,
- $mPropietatsUsuari,
- $mPropietatsUsuaris,
- $mPropietatsGrupConfig,
- $mPropietatsGrup,
- $mPropietatsPeriodeLocalConfig,
- $mPropietatsPeriodeLocal,
- $mPropietatsPeriodesLocals,
- $mGrupsEsResponsable;
-
-
- echo "
- <table width=100%' bgcolor='".$mColors['table']."'>
- <tr>
- <td id='td_missatgeAlerta' style=' width:100%;' align='center' valign='bottom'>
- </td>
- </tr>
- <tr>
- <td id='td_recordatoriGuardarComanda' align='center' width='100%' valign='bottom'>
- </td>
- </tr>
- </table>
-
- <table border='0' width='100%' bgcolor='".$mColors['table']."'>
- <tr>
- <td valign='middle' align='left' width='5%'>
- <table align='left'>
- <tr>
- <td>
- <a title='Inici'><img src='imatges/casap.jpeg' ALT=\"pāgina d'usuari\" style='cursor:pointer' onClick=\"javascript: enviarFpars('index.php?us=".$mPars['usuari_id']."&pasw=".$mPars['pasw']."','_self')\"></a>
- </td>
- <td>
- <a title='Sortir'><img src='imatges/out2p.jpg' ALT=\"sortir\" style='cursor:pointer' onClick=\"javascript: document.getElementById('i_pars').value='';enviarFpars('index.php','_self')\"></a>
- </td>
- </tr>
- </table>
- </td>
-
- <td valign='middle' align='left' width='15%'>
- <p class='compacte' >
- Usuari:<b> ".(urldecode($mPars['usuari']))."</b> (".$mPars['nivell'].")
- </p>
- </td>
-
- <td width='10%' align='middle'>
- ";
- $mostrar=0;
-
- echo "
- </td>
-
-
- <td width='70%' valign='bottom'>
- <table align='right'>
- <tr>
- <td >
- ";
- if($mPars['nivell']=='sadmin' || $mPars['nivell']=='admin' || $mPars['nivell']=='coord' || $mPars['usuari_id']==$mGrup['usuari_id'])
- {
- echo "
- ";
- if($mPars['grup_id']!='0')
- {
- html_selectorUsuarisGrup();
- }
- }
- echo "
- </td>
- <td>
- ";
- if(isset($mPropietatsPeriodesLocals))
- {
- mostrarSelectorPeriodeLocal(1,'comandes.php');
- }
-
- echo " </td>
- ";
- if
- (
- $mPars['usuari_id']!='visitant'
- )
- {
- echo "
- <td>
-
- ";
- if(isset($mPropietatsPeriodeLocal['comandesLocalsTancades']) && $mPropietatsPeriodeLocal['comandesLocalsTancades']==1)
- {
- $imatgeSemafor='semafor_vermell.gif';
- $semaforText="Reserves a la llista LOCAL estā TANCAT";
- }
- else if(isset($mPropietatsPeriodeLocal['comandesLocalsTancades']) && $mPropietatsPeriodeLocal['comandesLocalsTancades']==-1)
- {
- $imatgeSemafor='semafor_verd.gif';
- $semaforText="Reserves a la llista LOCAL estā OBERT";
- }
- else if(isset($mPropietatsPeriodeLocal['comandesLocalsTancades']) && $mPropietatsPeriodeLocal['comandesLocalsTancades']==0)
- {
- $imatgeSemafor='semafor_vermell.gif';
- $semaforText="Reserves a la llista LOCAL estā TANCAT";
- }
- else
- {
- $imatgeSemafor='semafor_vermell.gif';
- $semaforText="No s'ha creat cap periode";
- }
-
- echo "
- <a title=\"".$semaforText."\"><img src='imatges/".$imatgeSemafor."'></a>
- </td>
-
- <td align='left' width='50px' >
- <p> </p>
- </td>
-
- <td align='left'>
- ";
- mostrarSelectorLlista('comandes.php');
- echo "
- </td>
- </tr>
- ";
- }
- echo "
- </table>
- </td>
- </tr>
- </table>
-
- <table bgcolor='".$mColors['comandes.php'][$colorLlista]['t2_bg']."' bordercolor='#A2CBCA' border='0' width='100%' align='center'>
- <tr>
- <td width='100%' valign='middle' align='left'>
- <table border='0' align='left' valign='top' style='width:100%;'>
- <tr>
- <td width='20%' align='left' valign='top'>
- <p class='compacte' style='font-size:16px;'>
- <b>GRUP: ".(urldecode($mGrup['nom']))." </b></p>
- <table width='100%'>
- <tr>
- <td>
- <a title='membres del grup'><img src='imatges/grup2p.gif'></a>
- </td>
- <td>
- ";
- if(isset($mPars['grup_id']) && $mPars['grup_id']!='0')
- {
- echo "
- <p class='nota'>
- Responsable: ".(strtoupper(urldecode($mUsuarisGrupRef[$mGrup['usuari_id']]['usuari']['usuari'])))."
- <br>(".@$mUsuarisGrupRef[$mGrup['usuari_id']]['usuari']['email'].")
- </p>
- ";
- }
- echo "
- </td>
- </tr>
- </table>
- </td>
- <td width='20%' valign='top'>
- ";
- if($mPars['grup_id']==0)
- {
- echo "
- <p class='compacte' style='font-size:12px;'>
- <input type='checkbox' ";
- if($mPars['veureProductesDisponibles']==1)
- {
- echo " CHECKED ";
- }
- echo "
- id='ck_veureProductesDisponibles' onClick=\"f_veureProductesDisponibles();\" value='".$mPars['veureProductesDisponibles']."'>
- Veure només productes actius ".(html_ajuda1('html.php',21))."
- </p>
- <p id='p_vistaAlbara' onClick=\"vistaAlbara('totals');\" style='cursor:pointer;'><u>Veure Vista Albarā</u></p>
- ";
- }
- else if($mPars['selUsuariId']==0)
- {
- if($mPars['selLlistaId']!=0) //local
- {
- echo "
- <p class='compacte' style='font-size:12px;'>
- <input type='checkbox'
- ";
- if($mPars['veureProductesDisponibles']==1)
- {
- echo " CHECKED ";
- }
- echo "
- id='ck_veureProductesDisponibles' onClick=\"f_veureProductesDisponibles();\" value='".$mPars['veureProductesDisponibles']."'>
- Veure només productes actius ".(html_ajuda1('html.php',21))."
- </p>
- ";
- }
- echo "
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('totals');\" style='cursor:pointer;'><u>Vista Albarā (totals)</u></p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('desglossat');\" style='cursor:pointer;'><u>Vista Albarā (desglossat)</u> ".(html_ajuda1('html.php',9))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('resumUsuaris');\" style='cursor:pointer;'><u>Resum Imports Usuaries</u> ".(html_ajuda1('html.php',10))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"enviarFpars('distribucioGrupsLocals.php?getP=TOTS','_blank');\" style='cursor:pointer;'><u>Resum reserves locals per productora</u> ".(html_ajuda1('html.php',22))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"enviarFpars('comptesGrupLocal.php?llId=".$mPars['selLlistaId']."','_blank');\" style='cursor:pointer;'><u>Resum balanįos d'intercanvi</u> ".(html_ajuda1('html.php',23))."</p>
- ";
- if(substr_count($mGrup['categoria'],'rebost')>0 && $mPars['selRutaSufix']*1<=1503)
- {
- echo "
- <p class='compacte' style='color:#000000; cursor:pointer;' onClick=\"enviarFpars('tramsRuta.php','_blank');\"><u>Full de ruta CAC</u></p>
- ";
- }
- }
- else
- {
- echo "
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('');\" style='cursor:pointer;'><u>Albarā (usuari)</u>".(html_ajuda1('html.php',11))."</p>
- <p class='compacte' id='p_vistaAlbara' onClick=\"vistaAlbara('desglossat');\" style='cursor:pointer;'><u>Albarā (grup)</u>".(html_ajuda1('html.php',12))."</p>
- ";
- }
- echo "
- <p class='compacte' onClick=\"enviarFpars('db_llistaProductesCSV.php','_blank');\" style='color:#885500; cursor:pointer;'><u>vista productes segons filtre actual (CSV)</u> ".(html_ajuda1('html.php',13))."</p>
- ";
- /*
- echo "
- <p class='compacte' onClick=\"enviarFpars('db_resumPeriodeLocalCSV.php','_blank');\" style='color:#885500; cursor:pointer;'><u>resum actual periode local seleccionat (CSV)</u></p>
- ";
- */
- echo "
- <br>
- ";
- $getP=selUsuariEsProductorAssociatDelGrup($db);
- if
- (
- (
- $mPars['nivell']=='sadmin'
- ||
- $mPars['nivell']=='admin'
- ||
- $mPars['nivell']=='coord'
- ||
- $mPars['usuari_id']==$mGrup['usuari_id']
- )
- &&
- $mPars['selUsuariId']==0
- )
- {
- echo "
- <p class='compacte' onClick=\"javascript:enviarFpars('mail.php','_blank');\" style='cursor:pointer;'>
- <u>Missatges a membres del grup</u> ".(html_ajuda1('html.php',7))."
- </p>
- ";
- if(count($mPeticionsGrup)>0){ $peticionsText="<font style='color:#ff0000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- else { $peticionsText="<font style='color:#000000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- if(count($mIncidencies)>0){ $incidenciesText="<font style='color:#ff0000;'><b>".(count($mIncidencies))."</b></font>";}
- else { $incidenciesText="<font style='color:#000000;'><b>".(count($mIncidencies))."</b></font>";}
- if(count($mAbonamentsCarrecs)>0){ $incidenciesAbcaText="<font style='color:#ff0000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- else { $incidenciesAbcaText="<font style='color:#000000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- echo "
- <p class='compacte' onClick=\"javascript: enviarFpars('gestioGrup.php?gRef=".$mPars['grup_id']."','_blank');\" style='color:#000000; cursor:pointer;'><u>Peticions d'usuaries</u> [".$peticionsText."] ".(html_ajuda1('html.php',6))."
- </p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=incd&gRef=".$mPars['grup_id']."&vLlista=".$mPars['selLlistaId']."','_blank');\" style='color:#000000; cursor:pointer;'><u>Incidčncies (llista productes local)</u> [".$incidenciesText."]</p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=abCa&gRef=".$mPars['grup_id']."&vLlista=".$mPars['selLlistaId']."','_blank');\" style='color:#000000; cursor:pointer;'><u>Abonaments/cārrecs (llista productes local)</u> [".$incidenciesAbcaText."]</p>
- ";
- }
- else if($mPars['grup_id']!='0' && $mPars['selUsuariId']!='0')
- {
- if(count($mPeticionsGrup)>0){ $peticionsText="<font style='color:#ff0000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- else { $peticionsText="<font style='color:#000000;'><b>".(count($mPeticionsGrup))."</b></font>";}
- if(count($mIncidencies)>0){ $incidenciesText="<font style='color:#ff0000;'><b>".(count($mIncidencies))."</b></font>";}
- else { $incidenciesText="<font style='color:#000000;'><b>".(count($mIncidencies))."</b></font>";}
- if(count($mAbonamentsCarrecs)>0){ $incidenciesAbcaText="<font style='color:#ff0000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- else { $incidenciesAbcaText="<font style='color:#000000;'><b>".(count($mAbonamentsCarrecs))."</b></font>";}
- echo "
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=incd&gRef=".$mPars['grup_id']."&vLlista=".$mPars['selLlistaId']."','_blank');\" style='color:#000000; cursor:pointer;'><u>incidčncies (llista productes local)</u> [".$incidenciesText."]</p>
- <p class='compacte' onClick=\"javascript: enviarFpars('incidencies.php?opt2=abCa&gRef=".$mPars['grup_id']."&vLlista=".$mPars['selLlistaId']."','_blank');\" style='color:#000000; cursor:pointer;'><u>abonaments/cārrecs (llista productes local)</u> [".$incidenciesAbcaText."]</p>
- ";
- }
-
- echo "
- </td>
- ";
- if
- (
- (
- $mPars['nivell']=='sadmin'
- ||
- $mPars['nivell']=='admin'
- ||
- $mPars['nivell']=='coord'
- ||
- $mPars['usuari_id']==$mGrup['usuari_id']
- )
- &&
- $mPars['selUsuariId']==0
- &&
- $mPars['selLlistaId']!=0
- )
- {
- echo "
- <td width='20%' valign='top'>
- <table align='left'>
- ";
- if
- (
- isset($mPropietatsPeriodeLocal['comandesLocalsTancades']) && $mPropietatsPeriodeLocal['comandesLocalsTancades']==0
- ||
- isset($mPropietatsPeriodeLocal['comandesLocalsTancades']) && $mPropietatsPeriodeLocal['comandesLocalsTancades']==-1
- )
- {
- echo "
- <tr>
- <td valign='top'>
- <p class='p_micro5' >Comandes Locals Tancades:</p>
- </td>
- <td valign='top'>
- <p class='p_micro5' ><input type='checkbox'
- ";
- if
- (
- $mPropietatsPeriodeLocal['comandesLocalsTancades']==0
- ||
- $mPropietatsPeriodeLocal['comandesLocalsTancades']==1
- )
- {
- echo " CHECKED ";
- }
- echo "
- id='ck_comandesLocalsTancades' onClick=\"f_comandesLocalsTancades();\" value='".$mPropietatsPeriodeLocal['comandesLocalsTancades']."'>
- ".(html_ajuda1('html.php',14))."
- </p>
- </td>
- </tr>
- ";
-
- if
- (
- $mPropietatsPeriodeLocal['comandesLocalsTancades']==0
- )
- {
- echo "
- <tr>
- <td valign='top'>
- <input class='i_micro' id='i_tancarPeriode' DISABLED type='button' onClick=\"tancarPeriodeLocal();\" value='tancar periode ".$mPars['sel_periode_comanda_local']."'>
- </td>
- <td valign='top'>
- <p class='p_micro5' ><input type='checkbox' id='ck_activarTancarPeriode' onClick=\"javascript: activarTancarPeriode();\" value='0'>
- ".(html_ajuda1('html.php',15))."
- </p>
- </td>
- </tr>
- ";
- }
- }
- if
- (
- isset($mPropietatsPeriodeLocal['comandesLocalsTancades'])
- &&
- @$mPropietatsPeriodeLocal['comandesLocalsTancades']!=1
- )
- {
- echo "
- <tr>
- <td valign='top'>
- <p class='p_micro5'>Cost Transport Local: ".(html_ajuda1('html.php',16))."</p>
- </td>
- <td valign='top'>
- <p class='p_micro5'><input class='i_micro' size='4' type='text' id='i_local_ctik' value='".$mPropietatsPeriodeLocal['ctikLocal']."'>
- <input class='i_micro' type=