Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/admin/facture_situation.php
	htdocs/core/class/html.formother.class.php
This commit is contained in:
Laurent Destailleur 2019-12-23 14:16:34 +01:00
commit 07c1a5717e
41 changed files with 327 additions and 203 deletions

View File

@ -74,7 +74,7 @@ $head = invoice_admin_prepare_head();
dol_fiche_head($head, 'situation', $langs->trans("InvoiceSituation"), -1, 'invoice');
print '<span class="opacitymedium">'.$langs->trans("SituationInvoiceDesc").'</span><br><br>';
print '<span class="opacitymedium">'.$langs->trans("InvoiceFirstSituationDesc").'</span><br><br>';
/*

View File

@ -82,7 +82,7 @@ $cancel != $langs->trans("Cancel") &&
// check parameters
$forcelangprod = GETPOST('forcelangprod', 'alpha');
$libelle = GETPOST('libelle', 'alpha');
$desc = GETPOST('desc');
$desc = GETPOST('desc', 'none');
if (empty($forcelangprod)) {
$error++;
@ -345,7 +345,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs);
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td>';
print '<td><input name="libelle" size="40" value="'.GETPOST('libelle', 'alpha').'"></td></tr>';
print '<td><input name="libelle" class="minwidth200 maxwidth300" value="'.GETPOST('libelle', 'alpha').'"></td></tr>';
print '<tr><td>'.$langs->trans('Description').'</td><td>';
$doleditor = new DolEditor('desc', GETPOST('desc', 'none'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();

View File

@ -256,7 +256,7 @@ if ($action == "create" || $action == "start")
$sql .= " WHERE fk_account = ".$bankid;
if ($syear && !$smonth) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'";
elseif ($syear && $smonth && !$sday) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'";
elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
else dol_print_error('', 'Year not defined');
$resql = $db->query($sql);
@ -296,7 +296,7 @@ if ($action == "create" || $action == "start")
}
if ($syear && !$smonth) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'";
elseif ($syear && $smonth && !$sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'";
elseif ($syear && $smonth && $sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
elseif ($syear && $smonth && $sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
else dol_print_error('', 'Year not defined');
$resql = $db->query($sql);
@ -330,7 +330,7 @@ if ($action == "create" || $action == "start")
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>';
print '<td>'.$langs->trans("CashDesk").' ID</td>';
print '<td>'.$langs->trans("Terminal").'</td>';
print '<td>'.$langs->trans("Year").'</td>';
print '<td>'.$langs->trans("Month").'</td>';
print '<td>'.$langs->trans("Day").'</td>';
@ -343,7 +343,11 @@ if ($action == "create" || $action == "start")
print '<tr class="oddeven">';
print '<td>'.$form->selectarray('posmodule', $arrayofposavailable, GETPOST('posmodule', 'alpha'), (count($arrayofposavailable) > 1 ? 1 : 0)).'</td>';
print '<td>';
$array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9");
$array = array();
for($i = 1; $i <= max(1, $conf->global->TAKEPOS_NUM_TERMINALS); $i++) {
$array[$i] = $i;
}
$selectedposnumber = 0; $showempty = 1;
if ($conf->global->TAKEPOS_NUM_TERMINALS == '1')
{
@ -502,92 +506,97 @@ if ($action == "create" || $action == "start")
if (empty($action) || $action == "view")
{
$object->fetch($id);
$result = $object->fetch($id);
llxHeader('', $langs->trans("CashControl"));
$head = array();
$head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
$head[0][1] = $langs->trans("Card");
$head[0][2] = 'cashcontrol';
dol_fiche_head($head, 'cashcontrol', $langs->trans("CashControl"), -1, 'cashcontrol');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">';
$morehtmlref .= '</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<tr><td class="titlefield nowrap">';
print $langs->trans("Ref");
print '</td><td>';
print $id;
print '</td></tr>';
print '<tr><td valign="middle">'.$langs->trans("Module").'</td><td>';
print $object->posmodule;
print "</td></tr>";
print '<tr><td valign="middle">'.$langs->trans("CashDesk").' ID</td><td>';
print $object->posnumber;
print "</td></tr>";
print '<tr><td class="nowrap">';
print $langs->trans("Period");
print '</td><td>';
print $object->year_close."-".$object->month_close."-".$object->day_close;
print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<tr><td class="titlefield nowrap">';
print $langs->trans("DateCreationShort");
print '</td><td>';
print dol_print_date($object->date_creation, 'dayhour');
print '</td></tr>';
print '<tr><td valign="middle">'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").'</td><td>';
print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
print "</td></tr>";
foreach ($arrayofpaymentmode as $key => $val)
{
print '<tr><td valign="middle">'.$langs->trans($val).'</td><td>';
print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency);
print "</td></tr>";
if ($result <= 0) {
print $langs->trans("ErrorRecordNotFound");
}
else {
$head = array();
$head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
$head[0][1] = $langs->trans("Card");
$head[0][2] = 'cashcontrol';
print "</table>\n";
print '</div>';
print '</div></div>';
print '<div style="clear:both"></div>';
dol_fiche_head($head, 'cashcontrol', $langs->trans("CashControl"), -1, 'cashcontrol');
dol_fiche_end();
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
print '<div class="tabsAction">';
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="report.php?id='.$id.'">'.$langs->trans('PrintTicket').'</a></div>';
if ($object->status == CashControl::STATUS_DRAFT)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=close">'.$langs->trans('ValidateAndClose').'</a></div>';
$morehtmlref = '<div class="refidno">';
$morehtmlref .= '</div>';
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=confirm_delete">'.$langs->trans('Delete').'</a></div>';
}
print '</div>';
print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<tr><td class="titlefield nowrap">';
print $langs->trans("Ref");
print '</td><td>';
print $id;
print '</td></tr>';
print '<tr><td valign="middle">'.$langs->trans("Module").'</td><td>';
print $object->posmodule;
print "</td></tr>";
print '<tr><td valign="middle">'.$langs->trans("CashDesk").' ID</td><td>';
print $object->posnumber;
print "</td></tr>";
print '<tr><td class="nowrap">';
print $langs->trans("Period");
print '</td><td>';
print $object->year_close."-".$object->month_close."-".$object->day_close;
print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<tr><td class="titlefield nowrap">';
print $langs->trans("DateCreationShort");
print '</td><td>';
print dol_print_date($object->date_creation, 'dayhour');
print '</td></tr>';
print '<tr><td valign="middle">'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").'</td><td>';
print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
print "</td></tr>";
foreach ($arrayofpaymentmode as $key => $val)
{
print '<tr><td valign="middle">'.$langs->trans($val).'</td><td>';
print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency);
print "</td></tr>";
}
print "</table>\n";
print '</div>';
print '</div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();
print '<div class="tabsAction">';
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="report.php?id='.$id.'">'.$langs->trans('PrintTicket').'</a></div>';
if ($object->status == CashControl::STATUS_DRAFT)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=close">'.$langs->trans('ValidateAndClose').'</a></div>';
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=confirm_delete">'.$langs->trans('Delete').'</a></div>';
}
print '</div>';
print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>';
}
}
// End of page

View File

@ -338,7 +338,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$permforcashfence = 1;
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit);

View File

@ -538,7 +538,6 @@ class Facture extends CommonInvoice
$sql .= ", ".(empty($this->retained_warranty) ? "0" : $this->db->escape($this->retained_warranty));
$sql .= ", ".(!empty($this->retained_warranty_date_limit) ? "'".$this->db->idate($this->retained_warranty_date_limit)."'" : 'NULL');
$sql .= ", ".(int) $this->retained_warranty_fk_cond_reglement;
$sql .= ")";
$resql = $this->db->query($sql);

View File

@ -328,7 +328,7 @@ if ($resql)
print_barre_liste($langs->trans("RepeatableInvoices"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
print $langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'<br><br>';
print '<span class="opacitymedium">'.$langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'</span><br><br>';
$i = 0;

View File

@ -148,13 +148,23 @@ if ($result)
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
print "</tr>\n";
$directdebitorder = new BonPrelevement($db);
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);
print '<tr class="oddeven"><td>';
$directdebitorder->id = $obj->rowid;
$directdebitorder->ref = $obj->ref;
$directdebitorder->datec = $obj->datec;
$directdebitorder->amount = $obj->amount;
$directdebitorder->statut = $obj->statut;
print '<a href="card.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
print '<tr class="oddeven">';
print '<td>';
print $directdebitorder->getNomUrl(1);
print "</td>\n";
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";

View File

@ -1020,7 +1020,7 @@ else
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
}
print $formcompany->select_state(GETPOSTISSET('state_id') ?GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id');
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id');
print '</td></tr>';
}

View File

@ -467,7 +467,7 @@ class CMailFile
} else {
$this->message->setBody($msg, 'text/plain');
// And optionally an alternative body
$this->message->addPart($msg, 'text/html');
$this->message->addPart(dol_nl2br($msg), 'text/html');
}
if ($this->atleastonefile)

View File

@ -4130,9 +4130,6 @@ class Form
// Now add questions
$more .= '<div class="tagtable paddingtopbottomonly centpercent noborderspacing">'."\n";
if (!empty($formquestion['text'])) {
$more .= '<div class="tagtr"><div class="tagtd">'.$formquestion['text'].'</div></div>'."\n";
}
foreach ($formquestion as $key => $input)
{
if (is_array($input) && !empty($input))
@ -4246,8 +4243,11 @@ class Form
}
// Show JQuery confirm box. Note that global var $useglobalvars is used inside this template
$formconfirm .= '<div id="'.$dialogconfirm.'" title="'.dol_escape_htmltag($title).'" style="display: none;">';
if (!empty($formquestion['text'])) {
$formconfirm .= '<div class="confirmtext">'.$formquestion['text'].'</div>'."\n";
}
if (!empty($more)) {
$formconfirm .= '<div class="confirmquestions">'.$more.'</div>';
$formconfirm .= '<div class="confirmquestions">'.$more.'</div>'."\n";
}
$formconfirm .= ($question ? '<div class="confirmmessage">'.img_help('', '').' '.$question.'</div>' : '');
$formconfirm .= '</div>'."\n";
@ -4339,6 +4339,11 @@ class Form
// Line title
$formconfirm .= '<tr class="validtitre"><td class="validtitre" colspan="3">'.img_picto('', 'recent').' '.$title.'</td></tr>'."\n";
// Line text
if (!empty($formquestion['text'])) {
$formconfirm .= '<tr class="valid"><td class="valid" colspan="3">'.$formquestion['text'].'</td></tr>'."\n";
}
// Line form fields
if ($more)
{

View File

@ -98,7 +98,11 @@ class FormMargin
$pv = $line->total_ht;
$pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
$pa = $line->qty * $pa_ht;
if ($object->type == Facture::TYPE_SITUATION) {
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
} else {
$pa = $line->qty * $pa_ht;
}
// calcul des marges
if (isset($line->fk_remise_except) && isset($conf->global->MARGIN_METHODE_FOR_DISCOUNT)) { // remise

View File

@ -71,7 +71,7 @@ class FormOther
public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null)
{
// phpcs:enable
global $conf;
global $conf, $langs, $user;
$sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
@ -81,7 +81,7 @@ class FormOther
$result = $this->db->query($sql);
if ($result)
{
print '<select class="flat minwidth200" name="'.$htmlname.'">';
print '<select class="flat minwidth200" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($useempty)
{
print '<option value="-1">&nbsp;</option>';
@ -92,24 +92,31 @@ class FormOther
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
$label = $obj->label;
if ($obj->fk_user == 0) {
$label .= ' <span class="opacitymedium">('.$langs->trans("Everybody").')</span>';
}
elseif (! empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
$tmpuser = new User($this->db);
$tmpuser->fetch($obj->fk_user);
$label .= ' <span class="opacitymedium">('.$tmpuser->getFullName($langs).')</span>';
}
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected>';
print '<option value="'.$obj->rowid.'" selected data-html="'.dol_escape_htmltag($label).'">';
}
else
{
print '<option value="'.$obj->rowid.'">';
}
print $obj->label;
if (! empty($conf->global->EXPORTS_SHARE_MODELS) && $fk_user == $obj->fk_user) {
$tmpuser = new User($this->db);
$tmpuser->fetch($fk_user);
print ' ('.$tmpuser->getFullName().')';
print '<option value="'.$obj->rowid.'" data-html="'.dol_escape_htmltag($label).'">';
}
print $label;
print '</option>';
$i++;
}
print "</select>";
print ajax_combobox($htmlname);
}
else {
dol_print_error($this->db);
@ -125,19 +132,23 @@ class FormOther
* @param string $htmlname Nom de la zone select
* @param string $type Type des modeles recherches
* @param int $useempty Affiche valeur vide dans liste
* @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on)
* @return void
*/
public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0)
public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null)
{
// phpcs:enable
$sql = "SELECT rowid, label";
global $conf, $langs, $user;
$sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."import_model";
$sql .= " WHERE type = '".$type."'";
$sql .= " WHERE type = '".$this->db->escape($type)."'";
if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
$sql .= " ORDER BY rowid";
$result = $this->db->query($sql);
if ($result)
{
print '<select class="flat minwidth200" name="'.$htmlname.'">';
print '<select class="flat minwidth200" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($useempty)
{
print '<option value="-1">&nbsp;</option>';
@ -148,19 +159,31 @@ class FormOther
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
$label = $obj->label;
if ($obj->fk_user == 0) {
$label .= ' <span class="opacitymedium">('.$langs->trans("Everybody").')</span>';
}
elseif (! empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
$tmpuser = new User($this->db);
$tmpuser->fetch($obj->fk_user);
$label .= ' <span class="opacitymedium">('.$tmpuser->getFullName($langs).')</span>';
}
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected>';
print '<option value="'.$obj->rowid.'" selected data-html="'.dol_escape_htmltag($label).'">';
}
else
{
print '<option value="'.$obj->rowid.'">';
print '<option value="'.$obj->rowid.'" data-html="'.dol_escape_htmltag($label).'">';
}
print $obj->label;
print $label;
print '</option>';
$i++;
}
print "</select>";
print ajax_combobox($htmlname);
}
else {
dol_print_error($this->db);

View File

@ -47,10 +47,12 @@ if (class_exists($keyforclass))
* break;
*/
}
$helpfield=preg_replace('/\(.*$/', '', $valuefield['help']);
if ($valuefield['enabled']) {
$this->export_fields_array[$r][$fieldname] = $fieldlabel;
$this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
$this->export_entities_array[$r][$fieldname] = $keyforelement;
$this->export_help_array[$r][$fieldname] = $helpfield;
}
}
}

View File

@ -3349,7 +3349,7 @@ function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0
*/
function img_action($titlealt, $numaction)
{
global $conf, $langs;
global $langs;
if (empty($titlealt) || $titlealt == 'default')
{
@ -3374,7 +3374,7 @@ function img_action($titlealt, $numaction)
*/
function img_pdf($titlealt = 'default', $size = 3)
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Show');
@ -3390,7 +3390,7 @@ function img_pdf($titlealt = 'default', $size = 3)
*/
function img_edit_add($titlealt = 'default', $other = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Add');
@ -3405,7 +3405,7 @@ function img_edit_add($titlealt = 'default', $other = '')
*/
function img_edit_remove($titlealt = 'default', $other = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Remove');
@ -3422,7 +3422,7 @@ function img_edit_remove($titlealt = 'default', $other = '')
*/
function img_edit($titlealt = 'default', $float = 0, $other = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Modify');
@ -3439,7 +3439,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '')
*/
function img_view($titlealt = 'default', $float = 0, $other = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('View');
@ -3457,7 +3457,7 @@ function img_view($titlealt = 'default', $float = 0, $other = '')
*/
function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Delete');
@ -3474,7 +3474,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
*/
function img_printer($titlealt = "default", $other = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == "default") $titlealt = $langs->trans("Print");
return img_picto($titlealt, 'printer.png', $other);
}
@ -3488,7 +3488,7 @@ function img_printer($titlealt = "default", $other = '')
*/
function img_split($titlealt = 'default', $other = 'class="pictosplit"')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Split');
@ -3504,7 +3504,7 @@ function img_split($titlealt = 'default', $other = 'class="pictosplit"')
*/
function img_help($usehelpcursor = 1, $usealttitle = 1)
{
global $conf, $langs;
global $langs;
if ($usealttitle)
{
@ -3523,7 +3523,7 @@ function img_help($usehelpcursor = 1, $usealttitle = 1)
*/
function img_info($titlealt = 'default')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Informations');
@ -3540,7 +3540,7 @@ function img_info($titlealt = 'default')
*/
function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarning')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
@ -3556,11 +3556,11 @@ function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarn
*/
function img_error($titlealt = 'default')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Error');
return img_picto($titlealt, 'error.png', 'class="valigntextbottom"');
return img_picto($titlealt, 'error.png');
}
/**
@ -3572,7 +3572,7 @@ function img_error($titlealt = 'default')
*/
function img_next($titlealt = 'default', $moreatt = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Next');
@ -3589,7 +3589,7 @@ function img_next($titlealt = 'default', $moreatt = '')
*/
function img_previous($titlealt = 'default', $moreatt = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Previous');
@ -3607,7 +3607,7 @@ function img_previous($titlealt = 'default', $moreatt = '')
*/
function img_down($titlealt = 'default', $selected = 0, $moreclass = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Down');
@ -3624,7 +3624,7 @@ function img_down($titlealt = 'default', $selected = 0, $moreclass = '')
*/
function img_up($titlealt = 'default', $selected = 0, $moreclass = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Up');
@ -3641,7 +3641,7 @@ function img_up($titlealt = 'default', $selected = 0, $moreclass = '')
*/
function img_left($titlealt = 'default', $selected = 0, $moreatt = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Left');
@ -3658,7 +3658,7 @@ function img_left($titlealt = 'default', $selected = 0, $moreatt = '')
*/
function img_right($titlealt = 'default', $selected = 0, $moreatt = '')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Right');
@ -3674,7 +3674,7 @@ function img_right($titlealt = 'default', $selected = 0, $moreatt = '')
*/
function img_allow($allow, $titlealt = 'default')
{
global $conf, $langs;
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Active');

View File

@ -216,7 +216,7 @@ class modFacture extends DolibarrModules
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaid", 'f.fk_statut'=>'InvoiceStatus',
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus',
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT",
@ -300,12 +300,13 @@ class modFacture extends DolibarrModules
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaid", 'f.fk_statut'=>'InvoiceStatus',
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'none.rest'=>'Rest', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus',
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
'p.amount'=>'AmountPayment', 'pf.amount'=>'AmountPaymentDistributedOnInvoice', 'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber',
'pt.code'=>'CodePaymentMode', 'pt.libelle'=>'LabelPaymentMode', 'p.note'=>'PaymentNote', 'p.fk_bank'=>'IdTransaction', 'ba.ref'=>'AccountRef'
);
$this->export_help_array[$r] = array('f.paye'=>'InvoicePaidCompletelyHelp');
if (! empty($conf->multicurrency->enabled))
{
$this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency';
@ -313,6 +314,7 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT';
$this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT';
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
$this->export_examplevalues_array[$r]['f.multicurrency_code'] = 'EUR';
}
if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS))
{

View File

@ -182,7 +182,7 @@ class modProduct extends DolibarrModules
'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",
'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic',
'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.length_units'=>"SizeUnits",
'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits",
'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits",
'p.duration'=>"Duration",
'p.finished' => 'Nature',
@ -389,13 +389,13 @@ class modProduct extends DolibarrModules
'p.weight' => "Weight",
'p.weight_units' => "WeightUnits",
'p.length' => "Length",
'p.length_units' => "LengthUnit",
'p.length_units' => "LengthUnits",
'p.width' => "Width",
'p.width_units' => "WidthUnits",
'p.height' => "Height",
'p.height_units' => "HeightUnit",
'p.height_units' => "HeightUnits",
'p.surface' => "Surface",
'p.surface_units' => "SurfaceUnit",
'p.surface_units' => "SurfaceUnits",
'p.volume' => "Volume",
'p.volume_units' => "VolumeUnits",
'p.duration' => "Duration", //duration of service

View File

@ -71,7 +71,7 @@ class modSociete extends DolibarrModules
$this->requiredby = array("modExpedition", "modFacture", "modFournisseur", "modFicheinter", "modPropale", "modContrat", "modCommande"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module
$this->langfiles = array("companies", 'bills');
$this->langfiles = array("companies", 'bills', "compta", "admin", "banks");
// Constants
$this->const = array();
@ -412,7 +412,7 @@ class modSociete extends DolibarrModules
's.address' => "Address",
's.zip' => "Zip",
's.town' => "Town",
's.fk_departement' => "StateId",
's.fk_departement' => "StateCode",
's.fk_pays' => "CountryCode",
's.phone' => "Phone",
's.fax' => "Fax",
@ -583,7 +583,7 @@ class modSociete extends DolibarrModules
's.address' => "Address",
's.zip' => "Zip",
's.town' => "Town",
's.fk_departement' => "StateId",
's.fk_departement' => "StateCode",
's.fk_pays' => "CountryCode",
's.birthday' => "BirthdayDate",
's.poste' => "Role",

View File

@ -69,7 +69,7 @@ class modUser extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("main","users","companies","members",'salaries');
$this->langfiles = array("main","users","companies","members","salaries","hrm");
$this->always_enabled = true; // Can't be disabled
// Constants
@ -225,7 +225,7 @@ class modUser extends DolibarrModules
'u.address'=>"Address",'u.zip'=>"Zip",'u.town'=>"Town",
'u.office_phone'=>'Phone','u.user_mobile'=>"Mobile",'u.office_fax'=>'Fax',
'u.email'=>"Email",'u.note'=>"Note",'u.signature'=>'Signature',
'u.fk_user'=>'Supervisor','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.fk_user'=>'HierarchicalResponsible','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey',
'u.birth'=>'BirthdayDate',
'u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",
@ -281,7 +281,7 @@ class modUser extends DolibarrModules
'u.fk_state'=>"StateId",'u.fk_country'=>"CountryCode",
'u.office_phone'=>"Phone",'u.user_mobile'=>"Mobile",'u.office_fax'=>"Fax",
'u.email'=>"Email",'u.note'=>"Note",'u.signature'=>'Signature',
'u.fk_user'=>'Supervisor','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.fk_user'=>'HierarchicalResponsible','u.thm'=>'THM','u.tjm'=>'TJM','u.weeklyhours'=>'WeeklyHours',
'u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey',
'u.birth'=>'BirthdayDate',
'u.datec'=>"DateCreation",

View File

@ -1980,6 +1980,12 @@ class Expedition extends CommonObject
$error = 0;
// Protection. This avoid to move stock later when we should not
if ($this->statut == self::STATUS_CLOSED)
{
return 0;
}
$this->db->begin();
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut='.self::STATUS_CLOSED;

View File

@ -43,12 +43,13 @@ class Export
public $array_export_sql_order=array(); // Tableau des "requetes sql"
public $array_export_fields=array(); // Tableau des listes de champ+libelle a exporter
public $array_export_TypeFields=array(); // Tableau des listes de champ+Type de filtre
public $array_export_FilterValue=array(); // Tableau des listes de champ+Valeur a filtrer
public $array_export_TypeFields=array(); // Tableau des listes de champ+Type de filtre
public $array_export_FilterValue=array(); // Tableau des listes de champ+Valeur a filtrer
public $array_export_entities=array(); // Tableau des listes de champ+alias a exporter
public $array_export_dependencies=array(); // array of list of entities that must take care of the DISTINCT if a field is added into export
public $array_export_special=array(); // Tableau des operations speciales sur champ
public $array_export_examplevalues=array(); // array with examples
public $array_export_special=array(); // array of special operations to do on field
public $array_export_examplevalues=array(); // array with examples for fields
public $array_export_help=array(); // array with tooltip help for fields
// To store export modules
public $hexa;
@ -186,6 +187,8 @@ class Export
$this->array_export_special[$i]=(! empty($module->export_special_array[$r])?$module->export_special_array[$r]:'');
// Array of examples
$this->array_export_examplevalues[$i]=$module->export_examplevalues_array[$r];
// Array of help tooltips
$this->array_export_help[$i]=(! empty($module->export_help_array[$r])?$module->export_help_array[$r]:'');
// Requete sql du dataset
$this->array_export_sql_start[$i]=$module->export_sql_start[$r];

View File

@ -543,8 +543,12 @@ if ($step == 2 && $datatoexport)
print '<input type="hidden" name="datatoexport" value="'.$datatoexport.'">';
print '<div class="valignmiddle marginbottomonly">';
print '<span class="opacitymedium">'.$langs->trans("SelectExportFields").'</span> ';
if (empty($conf->global->EXPORTS_SHARE_MODELS))$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
else $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1);
if (empty($conf->global->EXPORTS_SHARE_MODELS)) {
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
}
else {
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1);
}
print ' ';
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</div>';
@ -622,6 +626,10 @@ if ($step == 2 && $datatoexport)
{
$htmltext .= '<b>'.$langs->trans("Type").':</b> '.$objexport->array_export_TypeFields[0][$code].'<br>';
}
if (!empty($objexport->array_export_help[0][$code]))
{
$htmltext .= '<b>'.$langs->trans("Help").':</b> '.$langs->trans($objexport->array_export_help[0][$code]).'<br>';
}
if (isset($array_selected[$code]) && $array_selected[$code])
{
@ -808,11 +816,15 @@ if ($step == 3 && $datatoexport)
}
if (!empty($objexport->array_export_examplevalues[0][$code]))
{
$htmltext .= $langs->trans("SourceExample").': <b>'.$objexport->array_export_examplevalues[0][$code].'</b><br>';
$htmltext .= '<b>'.$langs->trans("SourceExample").':</b> '.$objexport->array_export_examplevalues[0][$code].'<br>';
}
if (!empty($objexport->array_export_TypeFields[0][$code]))
{
$htmltext .= $langs->trans("Type").': <b>'.$objexport->array_export_TypeFields[0][$code].'</b><br>';
$htmltext .= '<b>'.$langs->trans("Type").':</b> '.$objexport->array_export_TypeFields[0][$code].'<br>';
}
if (!empty($objexport->array_export_help[0][$code]))
{
$htmltext .= '<b>'.$langs->trans("Help").':</b> '.$langs->trans($objexport->array_export_help[0][$code]).'<br>';
}
print '<td>';
@ -999,11 +1011,15 @@ if ($step == 4 && $datatoexport)
}
if (!empty($objexport->array_export_examplevalues[0][$code]))
{
$htmltext .= $langs->trans("SourceExample").': <b>'.$objexport->array_export_examplevalues[0][$code].'</b><br>';
$htmltext .= '<b>'.$langs->trans("SourceExample").':</b> '.$objexport->array_export_examplevalues[0][$code].'<br>';
}
if (!empty($objexport->array_export_TypeFields[0][$code]))
{
$htmltext .= $langs->trans("Type").': <b>'.$objexport->array_export_TypeFields[0][$code].'</b><br>';
$htmltext .= '<b>'.$langs->trans("Type").':</b> '.$objexport->array_export_TypeFields[0][$code].'<br>';
}
if (!empty($objexport->array_export_help[0][$code]))
{
$htmltext .= '<b>'.$langs->trans("Help").':</b> '.$langs->trans($objexport->array_export_help[0][$code]).'<br>';
}
print '<td>';
@ -1047,7 +1063,10 @@ if ($step == 4 && $datatoexport)
if (count($array_selected))
{
print '<br>';
print $langs->trans("SaveExportModel");
print '<div class="marginbottomonly">';
print '<span class="opacitymedium">'.$langs->trans("SaveExportModel").'</span>';
print '</div>';
print '<form class="nocellnopadd" action="export.php" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';

View File

@ -943,8 +943,6 @@ class ProductFournisseur extends Product
*/
public function listProductFournisseurPriceLog($product_fourn_price_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0)
{
global $conf;
$sql = "SELECT";
$sql .= " pfpl.rowid, pfp.ref_fourn as supplier_ref, pfpl.datec, u.lastname,";
$sql .= " pfpl.price, pfpl.quantity";
@ -965,9 +963,17 @@ class ProductFournisseur extends Product
{
$retarray = array();
while ($record = $this->db->fetch_array($resql))
while ($obj = $this->db->fetch_object($resql))
{
$retarray[] = $record;
$tmparray = array();
$tmparray['rowid'] = $obj->rowid;
$tmparray['supplier_ref'] = $obj->supplier_ref;
$tmparray['datec'] = $this->db->jdate($obj->datec);
$tmparray['lastname'] = $obj->lastname;
$tmparray['price'] = $obj->price;
$tmparray['quantity'] = $obj->quantity;
$retarray[] = $tmparray;
}
$this->db->free($resql);
@ -995,7 +1001,7 @@ class ProductFournisseur extends Product
$langs->load("suppliers");
if (count($productFournLogList) > 0) {
$out .= '<table class="nobordernopadding" width="100%">';
$out .= '<tr><td class="liste_titre">'.$langs->trans("Date").'</td>';
$out .= '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Date").'</td>';
$out .= '<td class="liste_titre right">'.$langs->trans("Price").'</td>';
//$out .= '<td class="liste_titre right">'.$langs->trans("QtyMin").'</td>';
$out .= '<td class="liste_titre">'.$langs->trans("User").'</td></tr>';
@ -1036,7 +1042,7 @@ class ProductFournisseur extends Product
$logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here
if (is_array($logPrices) && count($logPrices) > 0) {
$label .= '<br>';
$label .= '<br><br>';
$label .= '<u>'.$langs->trans("History").'</u>';
$label .= $this->displayPriceProductFournisseurLog($logPrices);
}

View File

@ -519,14 +519,12 @@ if ($step == 3 && $datatoimport)
print '</table>';
print '</div>';
print '<br>';
print '<b>'.$langs->trans("InformationOnSourceFile").'</b>';
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border tableforfield">';
//print '<tr><td colspan="2"><b>'.$langs->trans("InformationOnSourceFile").'</b></td></tr>';
// Source file format
print '<tr><td class="titlefield">'.$langs->trans("SourceFileFormat").'</td>';
@ -798,13 +796,12 @@ if ($step == 4 && $datatoimport)
print '</table>';
print '</div>';
print '<br>';
print '<b>'.$langs->trans("InformationOnSourceFile").'</b>';
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border tableforfield">';
//print '<tr><td colspan="2"><b>'.$langs->trans("InformationOnSourceFile").'</b></td></tr>';
// Source file format
print '<tr><td class="titlefield">'.$langs->trans("SourceFileFormat").'</td>';
@ -865,8 +862,8 @@ if ($step == 4 && $datatoimport)
print '<input type="hidden" name="separator" value="'.dol_escape_htmltag($separator).'">';
print '<input type="hidden" name="enclosure" value="'.dol_escape_htmltag($enclosure).'">';
print '<div class="marginbottomonly opacitymedium">';
print $langs->trans("SelectImportFields", img_picto('', 'grip_title', '', false, 0, 0, '', '', 0)).' ';
print '<div class="marginbottomonly">';
print '<span class="opacitymedium">'.$langs->trans("SelectImportFields", img_picto('', 'grip_title', '', false, 0, 0, '', '', 0)).'</span> ';
$htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1);
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</div>';
@ -1273,13 +1270,12 @@ if ($step == 5 && $datatoimport)
print '</table>';
print '</div>';
print '<br>';
print '<b>'.$langs->trans("InformationOnSourceFile").'</b>';
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border tableforfield">';
//print '<tr><td colspan="2"><b>'.$langs->trans("InformationOnSourceFile").'</b></td></tr>';
// Source file format
print '<tr><td class="titlefield">'.$langs->trans("SourceFileFormat").'</td>';
@ -1378,9 +1374,9 @@ if ($step == 5 && $datatoimport)
print '</table>';
print '</div>';
print '<br>';
print '<b>'.$langs->trans("InformationOnTargetTables").'</b>';
print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
@ -1717,13 +1713,12 @@ if ($step == 6 && $datatoimport)
print '</table>';
print '</div>';
print '<br>';
print '<b>'.$langs->trans("InformationOnSourceFile").'</b>';
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border">';
//print '<tr><td colspan="2"><b>'.$langs->trans("InformationOnSourceFile").'</b></td></tr>';
// Source file format
print '<tr><td class="titlefield">'.$langs->trans("SourceFileFormat").'</td>';

View File

@ -49,17 +49,13 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('L', '98','VolumeUnitlitre','L', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('P', '0','Piece','p', 'qty', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('SET', '0','Set','set', 'qty', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('S', '0','second','s', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MI', '60','minute','i', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('H', '3600','hour','h', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D', '86400','day','d', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('W', '604800','week','w', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MO','2629800','month','m', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('Y','31557600','year','y', 'time', 1);

View File

@ -285,7 +285,7 @@ CREATE TABLE llx_website_account(
date_last_login datetime,
date_previous_login datetime,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),

View File

@ -334,6 +334,8 @@ InvoiceDateCreation=Invoice creation date
InvoiceStatus=Invoice status
InvoiceNote=Invoice note
InvoicePaid=Invoice paid
InvoicePaidCompletely=Paid completely
InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status.
OrderBilled=Order billed
DonationPaid=Donation paid
PaymentNumber=Payment number

View File

@ -69,6 +69,8 @@ Terminal=Terminal
NumberOfTerminals=Number of Terminals
TerminalSelect=Select terminal you want to use:
POSTicket=POS Ticket
POSTerminal=POS Terminal
POSModule=POS Module
BasicPhoneLayout=Use basic layout for phones
SetupOfTerminalNotComplete=Setup of terminal %s is not complete
DirectPayment=Direct payment

View File

@ -57,6 +57,7 @@ NatureOfThirdParty=Nature of Third party
NatureOfContact=Nature of Contact
Address=Address
State=State/Province
StateCode=State/Province code
StateShort=State
Region=Region
Region-State=Region - State

View File

@ -193,13 +193,38 @@ unitSET=Set
unitS=Second
unitH=Hour
unitD=Day
unitKG=Kilogram
unitG=Gram
unitM=Meter
unitLM=Linear meter
unitM2=Square meter
unitM3=Cubic meter
unitL=Liter
unitT=ton
unitKG=kg
unitG=g
unitMG=mg
unitLB=pound
unitOZ=ounce
unitM=m
unitDM=dm
unitCM=cm
unitMM=mm
unitFT=ft
unitIN=in
unitM2=m²
unitDM2=dm²
unitCM2=cm²
unitMM2=mm²
unitFT2=ft²
unitIN2=in²
unitM3=m³
unitDM3=dm³
unitCM3=cm³
unitMM3=mm³
unitFT3=ft³
unitIN3=in³
unitOZ3=ounce
unitgallon=gallon
ProductCodeModel=Product ref template
ServiceCodeModel=Service ref template
CurrentProductPrice=Current price
@ -292,6 +317,9 @@ ProductWeight=Weight for 1 product
ProductVolume=Volume for 1 product
WeightUnits=Weight unit
VolumeUnits=Volume unit
WidthUnits=Width unit
LengthUnits=Length unit
HeightUnits=Height unit
SurfaceUnits=Surface unit
SizeUnits=Size unit
DeleteProductBuyPrice=Delete buying price
@ -347,4 +375,4 @@ ErrorDestinationProductNotFound=Destination product not found
ErrorProductCombinationNotFound=Product variant not found
ActionAvailableOnVariantProductOnly=Action only available on the variant of product
ProductsPricePerCustomer=Product prices per customers
ProductSupplierExtraFields=Additional Attributes (Supplier Prices)
ProductSupplierExtraFields=Additional Attributes (Supplier Prices)

View File

@ -2561,7 +2561,10 @@ if (!function_exists("llxFooter"))
|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
|| GETPOST('forceping', 'alpha'))
{
if (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]))
if (strpos('alpha', DOL_VERSION) > 0) {
print "\n<!-- NO JS CODE TO ENABLE the anonymous One time Ping. It is an alpha version -->\n";
}
elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

View File

@ -139,8 +139,8 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
$sql .= " u.rowid as agent, u.login, u.lastname, u.firstname,";
$sql .= " sum(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE) ?-1 : $conf->global->AGENT_CONTACT_TYPE);

View File

@ -204,8 +204,8 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
if ($client) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql .= " sum(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not, your database may be corrupted, you can update this)
$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
$sql .= " sum(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";

View File

@ -180,8 +180,8 @@ if ($id > 0) $sql .= " d.fk_product,";
if ($id > 0) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql .= " SUM(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1', 'd.qty * d.buy_price_ht').") as buying_price,";
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))', 'd.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";

View File

@ -137,8 +137,8 @@ if ($id > 0 || !empty($ref))
if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty) as qty,"; // not always positive in case of Credit note
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty * d.buy_price_ht) as buying_price,"; // not always positive in case of Credit note
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // not always positive in case of Credit note
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // not always positive in case of Credit note
$sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100))) as marge"; // not always positive in case of Credit note
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";

View File

@ -147,8 +147,8 @@ if ($socid > 0)
$sql .= " f.rowid as facid, f.ref, f.total as total_ht,";
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
$sql .= " sum(d.qty * d.buy_price_ht) as buying_price,"; // always positive
$sql .= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // always positive
$sql .= " sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // always positive
$sql .= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100))) as marge"; // always positive
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
$sql .= ", ".MAIN_DB_PREFIX."facturedet as d";

View File

@ -342,7 +342,10 @@ class modMyModule extends DolibarrModules
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
//$keyforselect='myobjectline'; $keyforaliasextra='extraline'; $keyforelement='myobjectline';
//include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
//$this->export_dependencies_array[$r]=array('myobjectline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
//$this->export_dependencies_array[$r] = array('myobjectline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
//$this->export_special_array[$r] = array('t.field'=>'...');
//$this->export_examplevalues_array[$r] = array('t.field'=>'Example');
//$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp');
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t';
//$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'myobject_line as tl ON tl.fk_myobject = t.rowid';

View File

@ -22,7 +22,7 @@
* \brief Page for statistics of module salaries
*/
require '../../../main.inc.php';
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salariesstats.class.php';

View File

@ -765,7 +765,7 @@ $menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"><
print '<!-- Show the search input text -->'."\n";
print '<div class="margintoponly">';
print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;width:calc(100% - 41px);font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;width:calc(100% - 51px);font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
print '<a class="marginleftonly hideonsmartphone" onclick="ClearSearch();">'.img_picto('', 'searchclear').'</a>';
print '</div>';
?>

View File

@ -1408,6 +1408,9 @@ div.nopadding {
/* vertical-align: text-bottom; */
color: <?php echo $badgeWarning ?>;
}
.pictoerror {
color: <?php echo $badgeDanger ?>;
}
.pictomodule {
width: 14px;
}
@ -1449,7 +1452,7 @@ div.heightref {
min-height: 80px;
}
div.divphotoref {
padding-<?php echo $right; ?>: 10px;
padding-<?php echo $right; ?>: 20px;
}
div.paginationref {
padding-bottom: 10px;

View File

@ -67,7 +67,7 @@ $colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked
$colorbacklinebreak = '233,228,230'; // line break
$colorbackbody = '255,255,255';
$colortexttitlenotab = '0,103,111'; // 140,80,10 or 10,140,80
$colortexttitlenotab = '0,113,121'; // 140,80,10 or 10,140,80
$colortexttitle = '0,0,0';
$colortext = '0,0,0';
$colortextlink = '10, 20, 100';

View File

@ -1613,6 +1613,9 @@ div.nopadding {
/* vertical-align: text-bottom; */
color: <?php echo $badgeWarning; ?>;
}
.pictoerror {
color: <?php echo $badgeDanger ?>;
}
.pictomodule {
width: 14px;
}