Beispiel #1
0
 private static function getTenderMods($right)
 {
     $ret = array('TenderModule');
     /**
       Get a tender-specific module if
       one has been configured
     */
     $map = CoreLocal::get("TenderMap");
     $dbc = Database::pDataConnect();
     /**
       Fetch module mapping from the database
       if the schema supports it
       16Mar2015
     */
     $tender_table = $dbc->table_definition('tenders');
     if (isset($tender_table['TenderModule'])) {
         $tender_model = new \COREPOS\pos\lib\models\op\TendersModel($dbc);
         $map = $tender_model->getMap();
     }
     if (is_array($map) && isset($map[$right])) {
         $class = $map[$right];
         if ($class != 'TenderModule') {
             $ret[] = $class;
         }
     }
     return $ret;
 }
Beispiel #2
0
    </td>
</tr>
<tr><td>
<b>Tender Mapping</b>:<br />
<p>Map custom tenders to IS4Cs expected tenders Tender Rpt. column: Include the checked tenders 
    in the Tender Report (available via Mgrs. Menu [MG])</p></td><td>
<?php 
$settings = CoreLocal::get("TenderMap");
$db = Database::pDataConnect();
$tender_table = $db->table_definition('tenders');
/**
  Load tender map from database if
  the schema supports it
*/
if (isset($tender_table['TenderModule'])) {
    $model = new \COREPOS\pos\lib\models\op\TendersModel($db);
    $settings = $model->getMap();
}
if (!is_array($settings)) {
    $settings = array();
}
if (isset($_REQUEST['TenderMapping'])) {
    $settings = array();
    foreach ($_REQUEST['TenderMapping'] as $tm) {
        if ($tm == "") {
            continue;
        }
        list($code, $mod) = explode(":", $tm);
        $settings[$code] = $mod;
    }
    if (!isset($tender_table['TenderModule'])) {