Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
296e04022f
@ -335,7 +335,7 @@ $tabrowid[29]= "";
|
||||
|
||||
// Condition to show dictionary in setup page
|
||||
$tabcond=array();
|
||||
$tabcond[1] = true;
|
||||
$tabcond[1] = (! empty($conf->societe->enabled));
|
||||
$tabcond[2] = true;
|
||||
$tabcond[3] = true;
|
||||
$tabcond[4] = true;
|
||||
@ -345,7 +345,7 @@ $tabcond[7] = ! empty($conf->tax->enabled);
|
||||
$tabcond[8] = ! empty($conf->societe->enabled);
|
||||
$tabcond[9] = true;
|
||||
$tabcond[10]= true;
|
||||
$tabcond[11]= true;
|
||||
$tabcond[11]= (! empty($conf->societe->enabled));
|
||||
$tabcond[12]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled));
|
||||
$tabcond[13]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled));
|
||||
$tabcond[14]= (! empty($conf->product->enabled) && ! empty($conf->ecotax->enabled));
|
||||
|
||||
@ -76,7 +76,7 @@ if ($action == 'addprinter' && $user->admin)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), $parameter);
|
||||
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter);
|
||||
if ($result > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
@ -132,7 +132,7 @@ if ($action == 'updateprinter' && $user->admin)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), $parameter, $printerid);
|
||||
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid);
|
||||
if ($result > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
@ -235,6 +235,7 @@ if ($mode == 'config' && $user->admin)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$langs->trans("Name").'</th>';
|
||||
print '<th>'.$langs->trans("Type").'</th>';
|
||||
print '<th>'.$langs->trans("Profile").'</th>';
|
||||
print '<th>'.$langs->trans("Parameters").'</th>';
|
||||
print '<th></th>';
|
||||
print '<th></th>';
|
||||
@ -252,6 +253,8 @@ if ($mode == 'config' && $user->admin)
|
||||
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
|
||||
$ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']);
|
||||
print '<td>'.$printer->resprint.'</td>';
|
||||
$ret = $printer->selectProfilePrinter($printer->listprinters[$line]['fk_profile']);
|
||||
print '<td>'.$printer->profileresprint.'</td>';
|
||||
print '<td><input size="60" type="text" name="parameter" value="'.$printer->listprinters[$line]['parameter'].'"></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
@ -259,27 +262,8 @@ if ($mode == 'config' && $user->admin)
|
||||
print '</tr>';
|
||||
} else {
|
||||
print '<td>'.$printer->listprinters[$line]['name'].'</td>';
|
||||
switch ($printer->listprinters[$line]['fk_type']) {
|
||||
case 1:
|
||||
$connector = 'CONNECTOR_DUMMY';
|
||||
break;
|
||||
case 2:
|
||||
$connector = 'CONNECTOR_FILE_PRINT';
|
||||
break;
|
||||
case 3:
|
||||
$connector = 'CONNECTOR_NETWORK_PRINT';
|
||||
break;
|
||||
case 4:
|
||||
$connector = 'CONNECTOR_WINDOWS_PRINT';
|
||||
break;
|
||||
case 5:
|
||||
$connector = 'CONNECTOR_JAVA';
|
||||
break;
|
||||
default:
|
||||
$connector = 'CONNECTOR_UNKNOWN';
|
||||
break;
|
||||
}
|
||||
print '<td>'.$langs->trans($connector).'</td>';
|
||||
print '<td>'.$langs->trans($printer->listprinters[$line]['fk_type_name']).'</td>';
|
||||
print '<td>'.$langs->trans($printer->listprinters[$line]['fk_profile_name']).'</td>';
|
||||
print '<td>'.$printer->listprinters[$line]['parameter'].'</td>';
|
||||
// edit icon
|
||||
print '<td><a href="'.$_SERVER['PHP_SELF'].'?mode=config&action=editprinter&printerid='.$printer->listprinters[$line]['rowid'].'">';
|
||||
@ -302,6 +286,7 @@ if ($mode == 'config' && $user->admin)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$langs->trans("Name").'</th>';
|
||||
print '<th>'.$langs->trans("Type").'</th>';
|
||||
print '<th>'.$langs->trans("Profile").'</th>';
|
||||
print '<th>'.$langs->trans("Parameters").'</th>';
|
||||
print '<th></th>';
|
||||
print '<th></th>';
|
||||
@ -311,6 +296,8 @@ if ($mode == 'config' && $user->admin)
|
||||
print '<td><input size="50" type="text" name="printername"></td>';
|
||||
$ret = $printer->selectTypePrinter();
|
||||
print '<td>'.$printer->resprint.'</td>';
|
||||
$ret = $printer->selectProfilePrinter();
|
||||
print '<td>'.$printer->profileresprint.'</td>';
|
||||
print '<td><input size="60" type="text" name="parameter"></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
@ -329,13 +316,24 @@ if ($mode == 'config' && $user->admin)
|
||||
|
||||
print '<div><p></div>';
|
||||
dol_fiche_head();
|
||||
print $langs->trans("ReceiptPrinterTypeDesc")."<br><br>\n";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
$var=true;
|
||||
print '<tr><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>';
|
||||
print '<td>'.$langs->trans("CONNECTOR_NETWORK_PRINT").':</td><td>'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'</td></tr>';
|
||||
print '<td>'.$langs->trans("CONNECTOR_FILE_PRINT").':</td><td>'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'</td></tr>';
|
||||
print '<td>'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':</td><td>'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'</td></tr>';
|
||||
//print '<td>'.$langs->trans("CONNECTOR_JAVA").':</td><td>'.$langs->trans("CONNECTOR_JAVA_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[1].'><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[0].'><td>'.$langs->trans("CONNECTOR_NETWORK_PRINT").':</td><td>'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[1].'><td>'.$langs->trans("CONNECTOR_FILE_PRINT").':</td><td>'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[0].'><td>'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':</td><td>'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'</td></tr>';
|
||||
//print '<tr '.$bc[1].'><td>'.$langs->trans("CONNECTOR_JAVA").':</td><td>'.$langs->trans("CONNECTOR_JAVA_HELP").'</td></tr>';
|
||||
print '</table>';
|
||||
dol_fiche_end();
|
||||
print '<div><p></div>';
|
||||
dol_fiche_head();
|
||||
print $langs->trans("ReceiptPrinterProfileDesc")."<br><br>\n";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr '.$bc[1].'><td>'.$langs->trans("PROFILE_DEFAULT").':</td><td>'.$langs->trans("PROFILE_DEFAULT_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[0].'><td>'.$langs->trans("PROFILE_SIMPLE").':</td><td>'.$langs->trans("PROFILE_SIMPLE_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[1].'><td>'.$langs->trans("PROFILE_EPOSTEP").':</td><td>'.$langs->trans("PROFILE_EPOSTEP_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[0].'><td>'.$langs->trans("PROFILE_P822D").':</td><td>'.$langs->trans("PROFILE_P822D_HELP").'</td></tr>';
|
||||
print '<tr '.$bc[1].'><td>'.$langs->trans("PROFILE_STAR").':</td><td>'.$langs->trans("PROFILE_STAR_HELP").'</td></tr>';
|
||||
print '</table>';
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
@ -719,8 +719,15 @@ if ($action == 'create')
|
||||
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
}
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent(($action=='create'?'add':'update'), 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, 'AND u.statut != 0');
|
||||
if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.(((! isset($_GET['transparency']) && ! isset($_POST['transparency'])) || GETPOST('transparency'))?' checked':'').'> '.$langs->trans("Busy");
|
||||
print '</div>';
|
||||
if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.(((! isset($_GET['transparency']) && ! isset($_POST['transparency'])) || GETPOST('transparency'))?' checked':'').'> '.$langs->trans("Busy");
|
||||
print '</div>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
@ -1052,8 +1059,16 @@ if ($id > 0)
|
||||
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
}
|
||||
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent(($action=='create'?'add':'update'), 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, 'AND u.statut != 0');
|
||||
if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.($listofuserid[$user->id]['transparency']?' checked':'').'>'.$langs->trans("Busy");
|
||||
print '</div>';
|
||||
if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.($listofuserid[$user->id]['transparency']?' checked':'').'>'.$langs->trans("Busy");
|
||||
print '</div>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
@ -1231,8 +1246,15 @@ if ($id > 0)
|
||||
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
}
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent('view','assignedtouser',1);
|
||||
if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
}
|
||||
print ' </td></tr>';
|
||||
|
||||
// Done by
|
||||
|
||||
@ -195,8 +195,15 @@ if ($object->id > 0)
|
||||
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
}
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent('view','assignedtouser',1);
|
||||
if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
}
|
||||
print ' </td></tr>';
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
* <dol_print_customer_skype> Print customer skype
|
||||
* <dol_print_customer_tax_number> Print customer VAT number
|
||||
* <dol_print_customer_account_balance> Print customer account balance
|
||||
* <dol_print_vendor_last_name> Print vendor name
|
||||
* <dol_print_vendor_first_name> Print vendor firstname
|
||||
* <dol_print_vendor_lastname> Print vendor name
|
||||
* <dol_print_vendor_firstname> Print vendor firstname
|
||||
* <dol_print_vendor_mail> Print vendor mail
|
||||
* <dol_print_customer_points> Print customer points
|
||||
* <dol_print_order_points> Print number of points for this order
|
||||
@ -204,14 +204,52 @@ class dolReceiptPrinter extends Escpos
|
||||
global $conf;
|
||||
$error = 0;
|
||||
$line = 0;
|
||||
$sql = 'SELECT rowid, name, fk_type, parameter';
|
||||
$sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
|
||||
$sql.= ' WHERE entity = '.$conf->entity;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
while ($line < $num) {
|
||||
$obj[] = $this->db->fetch_array($resql);
|
||||
$row = $this->db->fetch_array($resql);
|
||||
switch ($row['fk_type']) {
|
||||
case 1:
|
||||
$row['fk_type_name'] = 'CONNECTOR_DUMMY';
|
||||
break;
|
||||
case 2:
|
||||
$row['fk_type_name'] = 'CONNECTOR_FILE_PRINT';
|
||||
break;
|
||||
case 3:
|
||||
$row['fk_type_name'] = 'CONNECTOR_NETWORK_PRINT';
|
||||
break;
|
||||
case 4:
|
||||
$row['fk_type_name'] = 'CONNECTOR_WINDOWS_PRINT';
|
||||
break;
|
||||
case 5:
|
||||
$row['fk_type_name'] = 'CONNECTOR_JAVA';
|
||||
break;
|
||||
default:
|
||||
$row['fk_type_name'] = 'CONNECTOR_UNKNOWN';
|
||||
break;
|
||||
}
|
||||
switch ($row['fk_profile']) {
|
||||
case 0:
|
||||
$row['fk_profile_name'] = 'PROFILE_DEFAULT';
|
||||
break;
|
||||
case 1:
|
||||
$row['fk_profile_name'] = 'PROFILE_SIMPLE';
|
||||
break;
|
||||
case 2:
|
||||
$row['fk_profile_name'] = 'PROFILE_EPOSTEP';
|
||||
break;
|
||||
case 3:
|
||||
$row['fk_profile_name'] = 'PROFILE_P822D';
|
||||
break;
|
||||
default:
|
||||
$row['fk_profile_name'] = 'PROFILE_STAR';
|
||||
break;
|
||||
}
|
||||
$obj[] = $row;
|
||||
$line++;
|
||||
}
|
||||
} else {
|
||||
@ -275,21 +313,47 @@ class dolReceiptPrinter extends Escpos
|
||||
return $error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Form to Select Profile printer
|
||||
*
|
||||
* @param string $selected Id printer profile pre-selected
|
||||
* @param string $htmlname select html name
|
||||
* @return int 0 if OK; >0 if KO
|
||||
*/
|
||||
function selectProfilePrinter($selected='', $htmlname='printerprofileid')
|
||||
{
|
||||
global $langs;
|
||||
$error = 0;
|
||||
$html = '<select class="flat" name="'.$htmlname.'">';
|
||||
$html.= '<option value="0" '.($selected==0?'selected="selected"':'').'>'.$langs->trans('PROFILE_DEFAULT').'</option>';
|
||||
$html.= '<option value="1" '.($selected==1?'selected="selected"':'').'>'.$langs->trans('PROFILE_SIMPLE').'</option>';
|
||||
$html.= '<option value="2" '.($selected==2?'selected="selected"':'').'>'.$langs->trans('PROFILE_EPOSTEP').'</option>';
|
||||
$html.= '<option value="3" '.($selected==3?'selected="selected"':'').'>'.$langs->trans('PROFILE_P822D').'</option>';
|
||||
$html.= '<option value="4" '.($selected==4?'selected="selected"':'').'>'.$langs->trans('PROFILE_STAR').'</option>';
|
||||
$html.= '</select>';
|
||||
|
||||
$this->profileresprint = $html;
|
||||
return $error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to Add a printer in db
|
||||
*
|
||||
* @param string $name Printer name
|
||||
* @param int $type Printer type
|
||||
* @param int $profile Printer profile
|
||||
* @param string $parameter Printer parameter
|
||||
* @return int 0 if OK; >0 if KO
|
||||
*/
|
||||
function AddPrinter($name, $type, $parameter)
|
||||
function AddPrinter($name, $type, $profile, $parameter)
|
||||
{
|
||||
global $conf;
|
||||
$error = 0;
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt';
|
||||
$sql.= ' (name, fk_type, parameter, entity)';
|
||||
$sql.= ' VALUES ("'.$this->db->escape($name).'", '.$type.', "'.$this->db->escape($parameter).'", '.$conf->entity.')';
|
||||
$sql.= ' (name, fk_type, fk_profile, parameter, entity)';
|
||||
$sql.= ' VALUES ("'.$this->db->escape($name).'", '.$type.', '.$profile.', "'.$this->db->escape($parameter).'", '.$conf->entity.')';
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) {
|
||||
$error++;
|
||||
@ -303,17 +367,19 @@ class dolReceiptPrinter extends Escpos
|
||||
*
|
||||
* @param string $name Printer name
|
||||
* @param int $type Printer type
|
||||
* @param int $profile Printer profile
|
||||
* @param string $parameter Printer parameter
|
||||
* @param int $printerid Printer id
|
||||
* @return int 0 if OK; >0 if KO
|
||||
*/
|
||||
function UpdatePrinter($name, $type, $parameter, $printerid)
|
||||
function UpdatePrinter($name, $type, $profile, $parameter, $printerid)
|
||||
{
|
||||
global $conf;
|
||||
$error = 0;
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt';
|
||||
$sql.= ' SET name="'.$this->db->escape($name).'"';
|
||||
$sql.= ', fk_type='.$type;
|
||||
$sql.= ', fk_profile='.$profile;
|
||||
$sql.= ', parameter="'.$this->db->escape($parameter).'"';
|
||||
$sql.= ' WHERE rowid='.$printerid;
|
||||
$resql = $this->db->query($sql);
|
||||
@ -427,9 +493,20 @@ class dolReceiptPrinter extends Escpos
|
||||
$this->template = str_replace('<dol_print_customer_skype>', $object->customer_skype, $this->template);
|
||||
$this->template = str_replace('<dol_print_customer_tax_number>', $object->customer_tax_number, $this->template);
|
||||
$this->template = str_replace('<dol_print_customer_account_balance>', $object->customer_account_balance, $this->template);
|
||||
$this->template = str_replace('<dol_print_customer_points>', $object->customer_points, $this->template);
|
||||
$this->template = str_replace('<dol_print_order_points>', $object->order_points, $this->template);
|
||||
$this->template = str_replace('<dol_print_vendor_firstname>', $object->vendor_firstname, $this->template);
|
||||
$this->template = str_replace('<dol_print_vendor_lastname>', $object->vendor_lastname, $this->template);
|
||||
$this->template = str_replace('<dol_print_vendor_mail>', $object->vendor_mail, $this->template);
|
||||
$this->template = str_replace('<dol_print_date>', $object->date, $this->template);
|
||||
$this->template = str_replace('<dol_print_date_time>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_year>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_month_letters>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_month>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_day>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_day_letters>', $object->date_time, $this->template);
|
||||
$this->template = str_replace('<dol_print_table>', $object->table, $this->template);
|
||||
$this->template = str_replace('<dol_print_cutlery>', $object->cutlery, $this->template);
|
||||
|
||||
// parse template
|
||||
$p = xml_parser_create();
|
||||
@ -463,10 +540,18 @@ class dolReceiptPrinter extends Escpos
|
||||
$this->printer->pulse();
|
||||
$html.= ' ϟ'.nl2br($vals[$line]['value']);
|
||||
break;
|
||||
case 'DOL_ACTIVATE_BUZZER':
|
||||
//$this->printer->buzzer();
|
||||
$html.= ' ♫'.nl2br($vals[$line]['value']);
|
||||
break;
|
||||
case 'DOL_PRINT_BARCODE':
|
||||
// $vals[$line]['value'] -> barcode($content, $type)
|
||||
$this->printer->barcode($object->barcode);
|
||||
break;
|
||||
case 'DOL_PRINT_BARCODE_CUSTOMER_ID':
|
||||
// $vals[$line]['value'] -> barcode($content, $type)
|
||||
$this->printer->barcode($object->customer_id);
|
||||
break;
|
||||
case 'DOL_PRINT_QRCODE':
|
||||
// $vals[$line]['value'] -> qrCode($content, $ec, $size, $model)
|
||||
$this->printer->qrcode($vals[$line]['value']);
|
||||
@ -553,7 +638,7 @@ class dolReceiptPrinter extends Escpos
|
||||
{
|
||||
global $conf;
|
||||
$error=0;
|
||||
$sql = 'SELECT rowid, name, fk_type, parameter';
|
||||
$sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
|
||||
$sql.= ' WHERE rowid = '.$printerid;
|
||||
$sql.= ' AND entity = '.$conf->entity;
|
||||
@ -573,7 +658,7 @@ class dolReceiptPrinter extends Escpos
|
||||
try {
|
||||
switch ($obj['fk_type']) {
|
||||
case 1:
|
||||
require_once DOL_DOCUMENT_ROOT .'/includes/escpos/src/DummyPrintConnector.php';
|
||||
require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/src/DummyPrintConnector.php';
|
||||
$this->connector = new DummyPrintConnector();
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@ -240,14 +240,14 @@ class FormActions
|
||||
|
||||
|
||||
/**
|
||||
* Output list of type of event
|
||||
* Output html select list of type of event
|
||||
*
|
||||
* @param string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx')
|
||||
* @param string $htmlname Nom champ formulaire
|
||||
* @param string $excludetype Type to exclude
|
||||
* @param string $onlyautoornot Group list by auto events or not: We keep only the 2 generic lines (AC_OTH and AC_OTH_AUTO)
|
||||
* @param int $hideinfohelp 1=Do not show info help
|
||||
* @param int $multiselect 1=Allow multiselect of action type for filter or search
|
||||
* @param int $hideinfohelp 1=Do not show info help
|
||||
* @param int $multiselect 1=Allow multiselect of action type for filter or search
|
||||
* @return void
|
||||
*/
|
||||
function select_type_actions($selected='',$htmlname='actioncode',$excludetype='',$onlyautoornot=0, $hideinfohelp=0, $multiselect=0)
|
||||
@ -270,9 +270,10 @@ class FormActions
|
||||
|
||||
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']);
|
||||
|
||||
if($multiselect==1) {
|
||||
if ($multiselect==1)
|
||||
{
|
||||
if(!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
|
||||
print $form->multiselectarray($htmlname, $arraylist,$selected,0, 0, '', 0, 200);
|
||||
print $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, '', 0, 0);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@ -82,14 +82,16 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||
$formactions=new FormActions($db);
|
||||
|
||||
// Type
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("Type");
|
||||
print ' </td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
//select_type_actions($selected='',$htmlname='actioncode',$excludetype='',$onlyautoornot=0, $hideinfohelp=0, $multiselect=true)
|
||||
print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0), 0, 1);
|
||||
print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), 0, (empty($conf->global->AGENDA_USE_EVENT_TYPE)?0:1));
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("Status");
|
||||
|
||||
@ -137,7 +137,7 @@ class modReceiptPrinter extends DolibarrModules
|
||||
// Clean before activation
|
||||
$this->remove($options);
|
||||
$sql = array(
|
||||
"CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), fk_type int(11), parameter varchar(128), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
"CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), fk_type int(11), fk_profile int(11), parameter varchar(128), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
"CREATE TABLE IF NOT EXISTS llx_printer_receipt_template (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), template text, entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
);
|
||||
return $this->_init($sql,$options);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -153,10 +154,6 @@ class modResource extends DolibarrModules
|
||||
// 'categories_x' to add a tab in category view
|
||||
// (reresource 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||
|
||||
$this->tabs = array(
|
||||
// 'thirdparty:+resources:Resources:resource:$user->rights->resource->read:/resource/element_resource.php?element=societe&element_id=__ID__'
|
||||
);
|
||||
|
||||
// Boxes
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
$this->boxes = array(); // Boxes list
|
||||
@ -250,6 +247,21 @@ class modResource extends DolibarrModules
|
||||
'user'=> 0
|
||||
);
|
||||
|
||||
$this->menu[$r++]=array(
|
||||
'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=resource', //On utilise les ancres définis dans le menu parent déclaré au dessus
|
||||
'type'=> 'left', // Toujours un menu gauche
|
||||
'titre'=> 'List',
|
||||
'mainmenu'=> 'tools',
|
||||
'leftmenu'=> '', // On n'indique rien ici car on ne souhaite pas intégrer de sous-menus à ce menu
|
||||
'url'=> '/resource/list.php',
|
||||
'langs'=> 'resource',
|
||||
'position'=> 102,
|
||||
'enabled'=> '1',
|
||||
'perms'=> '$user->rights->resource->read',
|
||||
'target'=> '',
|
||||
'user'=> 0
|
||||
);
|
||||
|
||||
// Exports
|
||||
$r = 1;
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<!-- BEGIN TEMPLATE resource_add.tpl.php -->
|
||||
<?php
|
||||
|
||||
// BEGIN TPL RESOURCE_ADD.TPL.PHP
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
||||
|
||||
$form = new Form($db);
|
||||
@ -23,8 +22,8 @@ $events=array();
|
||||
$out .= $formresources->select_resource_list('','fk_resource','',1,1,0,$events,'',2);
|
||||
$out .= '</div>';
|
||||
|
||||
$out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'</div>';
|
||||
$out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'</div>';
|
||||
$out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy',(isset($_POST['busy'])?$_POST['busy']:1),1).'</div>';
|
||||
$out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory',(isset($_POST['mandatory'])?$_POST['mandatory']:0),1).'</div>';
|
||||
|
||||
$out .= '<div class="tagtd" align="right">';
|
||||
$out .='<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>';
|
||||
@ -33,8 +32,8 @@ $out .= '</div>';
|
||||
$out .='</form>';
|
||||
|
||||
$out .= '</div>';
|
||||
$out .= '<br />';
|
||||
$out .= '<br>';
|
||||
|
||||
print $out;
|
||||
|
||||
// END BEGIN TPL RESOURCE_ADD.TPL.PHP
|
||||
?>
|
||||
<!-- END TEMPLATE resource_add.tpl.php -->
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- BEGIN TEMPLATE resource_view.tpl.php -->
|
||||
<?php
|
||||
//var_dump($linked_resources);
|
||||
|
||||
@ -8,30 +9,27 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
{
|
||||
$var=true;
|
||||
|
||||
// TODO: DEBUT DU TPL
|
||||
print '<div class="tagtable centpercent noborder allwidth">';
|
||||
|
||||
if($mode == 'edit' )
|
||||
{
|
||||
print '<div class="tagtable centpercent noborder allwidth">';
|
||||
{
|
||||
print '<form class="tagtr liste_titre">';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd"></div>';
|
||||
print '</form>';
|
||||
//print '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="tagtable centpercent noborder allwidth">';
|
||||
print '<form class="tagtr liste_titre">';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd"></div>';
|
||||
print '</form>';
|
||||
//print '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -49,11 +47,11 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
print '<input type="hidden" name="resource_type" value="'.$resource_type.'" />';
|
||||
print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />';
|
||||
|
||||
print '<div class="tagtd">'.$object_resource->type_label.'</div>';
|
||||
print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>';
|
||||
print '<div class="tagtd">'.$object_resource->type_label.'</div>';
|
||||
print '<div class="tagtd" align="center">'.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'</div>';
|
||||
print '<div class="tagtd">'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'</div>';
|
||||
print '<div class="tagtd"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
||||
print '<div class="tagtd" align="center">'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'</div>';
|
||||
print '<div class="tagtd" align="right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
@ -65,14 +63,14 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
|
||||
print '<div class="tagtr '.($var==true?"pair":"impair").'" '.$style.'>';
|
||||
|
||||
print '<div class="tagtd">';
|
||||
print $object_resource->type_label;
|
||||
print '</div>';
|
||||
|
||||
print '<div class="tagtd">';
|
||||
print $object_resource->getNomUrl(1);
|
||||
print '</div class="tagtd">';
|
||||
|
||||
print '<div class="tagtd">';
|
||||
print $object_resource->type_label;
|
||||
print '</div>';
|
||||
|
||||
print '<div class="tagtd" align="center">';
|
||||
print yn($linked_resource['busy']);
|
||||
print '</div>';
|
||||
@ -96,14 +94,12 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
|
||||
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
print '<div class="warning">'.$langs->trans('NoResourceLinked').'</div>';
|
||||
|
||||
}
|
||||
// FIN DU TPL
|
||||
?>
|
||||
<!-- END TEMPLATE resource_view.tpl.php -->
|
||||
|
||||
@ -30,7 +30,7 @@ include_once 'inc.php';
|
||||
|
||||
$err = 0;
|
||||
$allowinstall = 0;
|
||||
$allowupgrade = 0;
|
||||
$allowupgrade = false;
|
||||
$checksok = 1;
|
||||
|
||||
$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):$langs->getDefaultLang();
|
||||
@ -181,11 +181,11 @@ if (is_readable($conffile) && filesize($conffile) > 8)
|
||||
if ($databaseok)
|
||||
{
|
||||
// Already installed for all parts (config and database). We can propose upgrade.
|
||||
$allowupgrade=1;
|
||||
$allowupgrade=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowupgrade=0;
|
||||
$allowupgrade=false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -216,7 +216,7 @@ else
|
||||
}
|
||||
|
||||
// First install, we can't upgrade
|
||||
$allowupgrade=0;
|
||||
$allowupgrade=false;
|
||||
}
|
||||
|
||||
|
||||
@ -382,6 +382,7 @@ else
|
||||
$allowupgrade=false;
|
||||
}
|
||||
if (defined("MAIN_NOT_INSTALLED")) $allowupgrade=false;
|
||||
if (GETPOST('allowupgrade')) $allowupgrade=true;
|
||||
$migrationscript=array( array('from'=>'3.0.0', 'to'=>'3.1.0'),
|
||||
array('from'=>'3.1.0', 'to'=>'3.2.0'),
|
||||
array('from'=>'3.2.0', 'to'=>'3.3.0'),
|
||||
|
||||
@ -21,6 +21,8 @@
|
||||
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_fk_pcg_version (fk_pcg_version);
|
||||
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_account_number (account_number);
|
||||
|
||||
ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
||||
--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_account_number FOREIGN KEY (fk_account_number) REFERENCES llx_accounting_account (account_number);
|
||||
|
||||
--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_account_number FOREIGN KEY (fk_account_number) REFERENCES llx_accounting_account (account_number);
|
||||
|
||||
-- This keys are created into foreign table after creation of foreign index
|
||||
--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
||||
|
||||
@ -20,3 +20,5 @@
|
||||
|
||||
ALTER TABLE llx_accounting_system ADD UNIQUE INDEX uk_accounting_system_pcg_version (pcg_version);
|
||||
|
||||
-- This key is for another table but created here because must be done after foreign key index is created
|
||||
ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
||||
|
||||
@ -167,6 +167,17 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
|
||||
// Create user
|
||||
include_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php';
|
||||
|
||||
// Set default encryption to yes if there is no user yet into database
|
||||
$sql = "SELECT u.rowid, u.pass, u.pass_crypted";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
//$sql.= " WHERE u.pass IS NOT NULL AND LENGTH(u.pass) < 32"; // Not a MD5 value
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$numrows=$db->num_rows($resql);
|
||||
if ($numrows == 0) dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1",'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
$createuser=new User($db);
|
||||
$createuser->id=0;
|
||||
|
||||
|
||||
@ -1673,7 +1673,7 @@ SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade desc
|
||||
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature.
|
||||
ConfFileMuseContainCustom=Installing an external module from application save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to have option<br>- <strong>$dolibarr_main_url_root_alt</strong> enabled to value <strong>$dolibarr_main_url_root_alt="/custom"</strong><br>- <strong>$dolibarr_main_document_root_alt</strong> enabled to value <strong>"%s/custom"</strong>
|
||||
HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
|
||||
HighlightLinesColor=Color of highlight line when mouse move passes over (keep empty for no highlight)
|
||||
HighlightLinesColor=Highlight color of the line when the mouse passes over (keep empty for no highlight)
|
||||
LinkColor=Color of links
|
||||
PressF5AfterChangingThis=Press F5 on keyboard after changing this value to have it effective
|
||||
NotSupportedByAllThemes=Will works with eldy theme but is not supported by all themes
|
||||
|
||||
@ -3,6 +3,12 @@ PrinterAdded=Printer %s added
|
||||
PrinterUpdated=Printer %s updated
|
||||
PrinterDeleted=Printer %s deleted
|
||||
TestSentToPrinter=Test Sent To Printer %s
|
||||
ReceiptPrinterDesc=Setup of printers
|
||||
ReceiptPrinterTemplateDesc=Setup of Templates
|
||||
ReceiptPrinterTypeDesc=Description of Receipt Printer's type
|
||||
ReceiptPrinterProfileDesc=Description of Receipt Printer's Profile
|
||||
ListPrinters=List of Printers
|
||||
SetupReceiptTemplate=Template Setup
|
||||
CONNECTOR_DUMMY=Dummy Printer
|
||||
CONNECTOR_NETWORK_PRINT=Network Printer
|
||||
CONNECTOR_FILE_PRINT=Local Printer
|
||||
@ -11,6 +17,16 @@ CONNECTOR_DUMMY_HELP=Fake Printer for test, does nothing
|
||||
CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100
|
||||
CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1
|
||||
CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer
|
||||
PROFILE_DEFAULT=Default Profile
|
||||
PROFILE_SIMPLE=Simple Profile
|
||||
PROFILE_EPOSTEP=Epos Tep Profile
|
||||
PROFILE_P822D=P822D Profile
|
||||
PROFILE_STAR=Star Profile
|
||||
PROFILE_DEFAULT_HELP=Default Profile suitable for Epson printers
|
||||
PROFILE_SIMPLE_HELP=Simple Profile No Graphics
|
||||
PROFILE_EPOSTEP_HELP=Epos Tep Profile Help
|
||||
PROFILE_P822D_HELP=P822D Profile No Graphics
|
||||
PROFILE_STAR_HELP=Star Profile
|
||||
DOL_ALIGN_LEFT=Left align text
|
||||
DOL_ALIGN_CENTER=Center text
|
||||
DOL_ALIGN_RIGHT=Right align text
|
||||
|
||||
@ -17,6 +17,7 @@ ResourceFormLabel_description=Resource description
|
||||
|
||||
ResourcesLinkedToElement=Resources linked to element
|
||||
|
||||
ShowResource=Show resource
|
||||
ShowResourcePlanning=Show resource planning
|
||||
GotoDate=Go to date
|
||||
|
||||
|
||||
@ -1655,15 +1655,16 @@ SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise
|
||||
InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe depuis l'application a été désactivé par l'administrator. Vous devez lui demander de supprimer le fichier <strong>%s</strong> pour permettre cette fonctionnalité.
|
||||
ConfFileMuseContainCustom=Installé un module externe pour l'application enregistre les fichiers de module dans le répertoire <strong>%s</strong>. Pour avoir ce répertoire vu par Dolibarr, vous devez configurer votre <strong>conf/conf.php</strong> d'avoir l'option <br> - <strong>$dolibarr_main_url_root_alt</strong> activé à la valeur <strong>$dolibarr_main_url_root_alt="/custom"</strong><br> - <strong>$dolibarr_main_document_root_alt</strong> activé à la valeur <strong>"%s/custom"</strong>
|
||||
HighlightLinesOnMouseHover=Mettez en surbrillance les lignes de la table lorsque la souris passe au-dessus
|
||||
HighlightLinesColor=Color of highlight line when mouse move passes over (keep empty for no highlight)
|
||||
HighlightLinesColor=Couleur de surbrillance de la ligne quand la souris passe au dessus (garder vide pour ne pas avoir de surbrillance)
|
||||
LinkColor=Couleur des liens
|
||||
PressF5AfterChangingThis=Appuyez sur F5 sur le clavier après avoir modifié cette valeur pour que le changement soit effectif
|
||||
NotSupportedByAllThemes=Fonctionne avec le thème eldy mais n'est pas pris en charge par tous les thèmes
|
||||
BackgroundColor=Couleur de fond
|
||||
TopMenuBackgroundColor=Couleur de fond pour le menu Gauche
|
||||
TopMenuBackgroundColor=Couleur de fond pour le menu Haut
|
||||
LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche
|
||||
BackgroundTableTitleColor=Background color for Table title line
|
||||
BackgroundTableTitleColor=Couleur de fond pour la ligne de titre des tables
|
||||
BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables
|
||||
BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales
|
||||
BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tables
|
||||
MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai)
|
||||
NbAddedAutomatically=Nombre de jours ajoutés aux compteurs des utilisateurs (automatiquement) chaque mois
|
||||
EnterAnyCode=Ce champ contient une référence pour identifier le champ. Entrez une valeur de votre choix, mais sans caractères spéciaux.
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -111,9 +112,9 @@ if ($action == 'confirm_add_resource')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
@ -146,7 +147,7 @@ if (! $action)
|
||||
// Type
|
||||
print '<tr><td width="20%">'.$langs->trans("ResourceType").'</td>';
|
||||
print '<td>';
|
||||
$ret = $formresource->select_types_resource($object->fk_code_type_resource,'fk_code_type_resource','',2);
|
||||
$ret = $formresource->select_types_resource($object->fk_code_type_resource, 'fk_code_type_resource', '', 2, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
@ -168,7 +169,7 @@ if (! $action)
|
||||
|
||||
echo '<div align="center">',
|
||||
'<input type="submit" class="button" name="add" value="'.$langs->trans('Save').'" />',
|
||||
' ',
|
||||
' ',
|
||||
'<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'" />',
|
||||
'</div>';
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ class Resource extends CommonObject
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
|
||||
|
||||
$sql.= " entity,";
|
||||
$sql.= "entity,";
|
||||
$sql.= "ref,";
|
||||
$sql.= "description,";
|
||||
$sql.= "fk_code_type_resource,";
|
||||
|
||||
@ -2606,6 +2606,7 @@ div.ok {
|
||||
color: #114466;
|
||||
}
|
||||
|
||||
/* Warning message */
|
||||
div.warning {
|
||||
color: #302020;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
@ -2618,14 +2619,7 @@ div.warning {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
div.error {
|
||||
color: #550000; font-weight: bold;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #DC9CAB;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
/* Error message */
|
||||
background: #EFCFCF;
|
||||
}
|
||||
|
||||
@ -2642,6 +2636,9 @@ div.info {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
div.warning a, div.info a, div.error a {
|
||||
color: rgb(<?php echo $colortext; ?>);
|
||||
}
|
||||
|
||||
/*
|
||||
* Liens Payes/Non payes
|
||||
|
||||
@ -2464,6 +2464,7 @@ div.ok {
|
||||
color: #114466;
|
||||
}
|
||||
|
||||
/* Warning message */
|
||||
div.warning {
|
||||
color: #302020;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
@ -2476,6 +2477,7 @@ div.warning {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
/* Error message */
|
||||
div.error {
|
||||
color: #550000; font-weight: bold;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
@ -2500,6 +2502,9 @@ div.info {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
div.warning a, div.info a, div.error a {
|
||||
color: rgb(<?php echo $colortext; ?>);
|
||||
}
|
||||
|
||||
/*
|
||||
* Liens Payes/Non payes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user