Merge branch 'develop' into develop_orderextrafield
Conflicts: htdocs/commande/fiche.php htdocs/install/mysql/migration/3.3.0-3.4.0.sql Change-Id: If57a2f2a386a2903b976178eb63aef2c8b09473d
This commit is contained in:
commit
b7137606ee
@ -73,6 +73,14 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
|
||||||
|
|
||||||
|
-Fix: Ducth (nl_NL) translation
|
||||||
|
-Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
|
||||||
|
-Generalize fix: file with a specific mask not found, again
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||||
|
|
||||||
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
||||||
|
|||||||
@ -44,24 +44,24 @@ $object = new Expedition($db);
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
//if ($action==setvalue AND $carrier)
|
//if ($action==setvalue AND $carrier)
|
||||||
if ($action==setvalue)
|
if ($action=='setvalue')
|
||||||
{
|
{
|
||||||
// need to add check on values
|
// need to add check on values
|
||||||
$object->update[code]=GETPOST('code','alpha');
|
$object->update['code']=GETPOST('code','alpha');
|
||||||
$object->update[libelle]=GETPOST('libelle','alpha');
|
$object->update['libelle']=GETPOST('libelle','alpha');
|
||||||
$object->update[description]=GETPOST('description','alpha');
|
$object->update['description']=GETPOST('description','alpha');
|
||||||
$object->update[tracking]=GETPOST('tracking','alpha');
|
$object->update['tracking']=GETPOST('tracking','alpha');
|
||||||
$object->update_delivery_method($carrier);
|
$object->update_delivery_method($carrier);
|
||||||
header("Location: carrier.php");
|
header("Location: carrier.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action==activate_carrier AND $carrier!='')
|
if ($action=='activate_carrier' && $carrier!='')
|
||||||
{
|
{
|
||||||
$object->activ_delivery_method($carrier);
|
$object->activ_delivery_method($carrier);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action==disable_carrier AND $carrier!='')
|
if ($action=='disable_carrier' && $carrier!='')
|
||||||
{
|
{
|
||||||
$object->disable_delivery_method($carrier);
|
$object->disable_delivery_method($carrier);
|
||||||
}
|
}
|
||||||
@ -134,26 +134,26 @@ if ($action=='edit_carrier' || $action=='setvalue')
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
||||||
print $langs->trans("Code").'</td><td>';
|
print $langs->trans("Code").'</td><td>';
|
||||||
print '<input size="32" type="text" name="code" value="'.$object->listmeths[0][code].'">';
|
print '<input size="32" type="text" name="code" value="'.$object->listmeths[0]['code'].'">';
|
||||||
print ' '.$langs->trans("Example").': CODE';
|
print ' '.$langs->trans("Example").': CODE';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
||||||
print $langs->trans("Name").'</td><td>';
|
print $langs->trans("Name").'</td><td>';
|
||||||
print '<input size="32" type="text" name="libelle" value="'.$object->listmeths[0][libelle].'">';
|
print '<input size="32" type="text" name="libelle" value="'.$object->listmeths[0]['libelle'].'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
||||||
print $langs->trans("Description").'</td><td>';
|
print $langs->trans("Description").'</td><td>';
|
||||||
print '<input size="64" type="text" name="description" value="'.$object->listmeths[0][description].'">';
|
print '<input size="64" type="text" name="description" value="'.$object->listmeths[0]['description'].'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
print '<tr '.$bc[$var].'><td class="fieldrequired">';
|
||||||
print $langs->trans("Tracking").'</td><td>';
|
print $langs->trans("Tracking").'</td><td>';
|
||||||
print '<input size="128" type="text" name="tracking" value="'.$object->listmeths[0][tracking].'">';
|
print '<input size="128" type="text" name="tracking" value="'.$object->listmeths[0]['tracking'].'">';
|
||||||
print ' '.$langs->trans("Example").': http://www.website.com/dir/{TRACKID}';
|
print ' '.$langs->trans("Example").': http://www.website.com/dir/{TRACKID}';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -186,25 +186,26 @@ else
|
|||||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="30">'.$langs->trans("Edit").'</td>';
|
print '<td align="center" width="30">'.$langs->trans("Edit").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
for ($i=0; $i<sizeof($object->listmeths); $i++)
|
$numlistmeths=count($object->listmeths);
|
||||||
|
for ($i=0; $i<$numlistmeths; $i++)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>'.$object->listmeths[$i][code].'</td>';
|
print '<td>'.$object->listmeths[$i]['code'].'</td>';
|
||||||
print '<td>'.$object->listmeths[$i][libelle].'</td>';
|
print '<td>'.$object->listmeths[$i]['libelle'].'</td>';
|
||||||
print '<td>'.$object->listmeths[$i][description].'</td>';
|
print '<td>'.$object->listmeths[$i]['description'].'</td>';
|
||||||
print '<td>'.$object->listmeths[$i][tracking].'</td>';
|
print '<td>'.$object->listmeths[$i]['tracking'].'</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if($object->listmeths[$i][active] == 0)
|
if($object->listmeths[$i]['active'] == 0)
|
||||||
{
|
{
|
||||||
print '<a href="carrier.php?action=activate_carrier&carrier='.$object->listmeths[$i][rowid].'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="carrier.php?action=activate_carrier&carrier='.$object->listmeths[$i]['rowid'].'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="carrier.php?action=disable_carrier&carrier='.$object->listmeths[$i][rowid].'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="carrier.php?action=disable_carrier&carrier='.$object->listmeths[$i]['rowid'].'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
print '<a href="carrier.php?action=edit_carrier&carrier='.$object->listmeths[$i][rowid].'">'.img_picto($langs->trans("Edit"),'edit').'</a>';
|
print '<a href="carrier.php?action=edit_carrier&carrier='.$object->listmeths[$i]['rowid'].'">'.img_picto($langs->trans("Edit"),'edit').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -415,7 +415,7 @@ if ($action == 'create')
|
|||||||
$(".fulldaystartmin").attr("disabled","disabled").val("00");
|
$(".fulldaystartmin").attr("disabled","disabled").val("00");
|
||||||
$(".fulldayendhour").attr("disabled","disabled").val("23");
|
$(".fulldayendhour").attr("disabled","disabled").val("23");
|
||||||
$(".fulldayendmin").attr("disabled","disabled").val("59");
|
$(".fulldayendmin").attr("disabled","disabled").val("59");
|
||||||
$("#p2").attr("disabled","disabled").val("");
|
$("#p2").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setdatefields();
|
setdatefields();
|
||||||
@ -869,7 +869,7 @@ if ($id > 0)
|
|||||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -878,7 +878,7 @@ if ($id > 0)
|
|||||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -887,7 +887,7 @@ if ($id > 0)
|
|||||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendarday').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -178,7 +178,7 @@ if ($result)
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td nowrap="nowrap"><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'</a></td>';
|
print '<td nowrap="nowrap"><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'</a></td>';
|
||||||
print '<td>'.dol_trunc($obj->titre,38).'</td>';
|
print '<td>'.dol_trunc($obj->titre,38).'</td>';
|
||||||
print '<td align="center">'.dol_print_date($obj->date_creat,'day').'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($obj->date_creat),'day').'</td>';
|
||||||
print '<td align="center">'.($obj->nbemail?$obj->nbemail:"0").'</td>';
|
print '<td align="center">'.($obj->nbemail?$obj->nbemail:"0").'</td>';
|
||||||
$mailstatic=new Mailing($db);
|
$mailstatic=new Mailing($db);
|
||||||
print '<td align="right">'.$mailstatic->LibStatut($obj->statut,5).'</td>';
|
print '<td align="right">'.$mailstatic->LibStatut($obj->statut,5).'</td>';
|
||||||
|
|||||||
@ -1199,7 +1199,6 @@ class Propal extends CommonObject
|
|||||||
* Update value of extrafields on the proposal
|
* Update value of extrafields on the proposal
|
||||||
*
|
*
|
||||||
* @param User $user Object user that modify
|
* @param User $user Object user that modify
|
||||||
* @param double $remise Amount discount
|
|
||||||
* @return int <0 if ko, >0 if ok
|
* @return int <0 if ko, >0 if ok
|
||||||
*/
|
*/
|
||||||
function update_extrafields($user)
|
function update_extrafields($user)
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -242,8 +243,7 @@ if ($resql)
|
|||||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_town='.urlencode($search_town);
|
$param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_zipcode).'&search_ville='.urlencode($search_ville);
|
||||||
// Added by Matelli
|
|
||||||
// Store the status filter in the URL
|
// Store the status filter in the URL
|
||||||
if (isSet($search_cstc))
|
if (isSet($search_cstc))
|
||||||
{
|
{
|
||||||
@ -449,4 +449,4 @@ else
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1120,7 +1120,7 @@ else if ($action == 'print_file' AND $user->rights->printipp->use)
|
|||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolprintipp.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/dolprintipp.class.php';
|
||||||
$printer = new dolPrintIPP($db,$conf->global->PRINTIPP_HOST,$conf->global->PRINTIPP_PORT,$user->login,$conf->global->PRINTIPP_USER,$conf->global->PRINTIPP_PASSWORD);
|
$printer = new dolPrintIPP($db,$conf->global->PRINTIPP_HOST,$conf->global->PRINTIPP_PORT,$user->login,$conf->global->PRINTIPP_USER,$conf->global->PRINTIPP_PASSWORD);
|
||||||
$printer->print_file(GETPOST('file',alpha),GETPOST('printer',alpha));
|
$printer->print_file(GETPOST('file','alpha'),GETPOST('printer','alpha'));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'update_extras')
|
else if ($action == 'update_extras')
|
||||||
|
|||||||
@ -559,7 +559,6 @@ class Facture extends CommonInvoice
|
|||||||
* Load an object from its id and create a new one in database
|
* Load an object from its id and create a new one in database
|
||||||
*
|
*
|
||||||
* @param int $socid Id of thirdparty
|
* @param int $socid Id of thirdparty
|
||||||
* @param HookManager $hookmanager Hook manager instance
|
|
||||||
* @return int New id of clone
|
* @return int New id of clone
|
||||||
*/
|
*/
|
||||||
function createFromClone($socid=0)
|
function createFromClone($socid=0)
|
||||||
|
|||||||
@ -97,9 +97,9 @@ $sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.libelle,";
|
|||||||
$sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,";
|
$sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,";
|
||||||
$sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,";
|
$sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,";
|
||||||
$sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,";
|
$sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,";
|
||||||
$sql.= " ct.accountancy_code_buy as account_tva";
|
$sql.= " ct.accountancy_code_buy as account_tva, ct.recuperableonly";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn_det fd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn_det fd";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '".$idpays."'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn f ON f.rowid = fd.fk_facture_fourn";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn f ON f.rowid = fd.fk_facture_fourn";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc" ;
|
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc" ;
|
||||||
@ -142,7 +142,8 @@ if ($result)
|
|||||||
$tabfac[$obj->rowid]["lib"] = $obj->libelle;
|
$tabfac[$obj->rowid]["lib"] = $obj->libelle;
|
||||||
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
||||||
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
||||||
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
if($obj->recuperableonly != 1)
|
||||||
|
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
||||||
$tabcompany[$obj->rowid]=array('id'=>$obj->socid,'name'=>$obj->name);
|
$tabcompany[$obj->rowid]=array('id'=>$obj->socid,'name'=>$obj->name);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -238,4 +239,4 @@ print "</table>";
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -99,12 +99,12 @@ $sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.ref_client,";
|
|||||||
$sql.= " fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,";
|
$sql.= " fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,";
|
||||||
$sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.client,";
|
$sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.client,";
|
||||||
$sql.= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell,";
|
$sql.= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell,";
|
||||||
$sql.= " ct.accountancy_code_sell as account_tva";
|
$sql.= " ct.accountancy_code_sell as account_tva, ct.recuperableonly";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet fd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet fd";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."facture f ON f.rowid = fd.fk_facture";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."facture f ON f.rowid = fd.fk_facture";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '".$idpays."'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
$sql.= " AND f.fk_statut > 0";
|
$sql.= " AND f.fk_statut > 0";
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
||||||
@ -149,7 +149,8 @@ if ($result)
|
|||||||
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva]=0;
|
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva]=0;
|
||||||
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
||||||
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
||||||
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
if($obj->recuperableonly != 1)
|
||||||
|
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
||||||
$tabcompany[$obj->rowid]=array('id'=>$obj->socid, 'name'=>$obj->name, 'client'=>$obj->client);
|
$tabcompany[$obj->rowid]=array('id'=>$obj->socid, 'name'=>$obj->name, 'client'=>$obj->client);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,7 +110,7 @@ else
|
|||||||
// Search criteria
|
// Search criteria
|
||||||
if (GETPOST("search_ref")) $sql .=" AND p.rowid=".GETPOST("search_ref",'int');
|
if (GETPOST("search_ref")) $sql .=" AND p.rowid=".GETPOST("search_ref",'int');
|
||||||
if (GETPOST("search_account") > 0) $sql .=" AND b.fk_account=".GETPOST("search_account",'int');
|
if (GETPOST("search_account") > 0) $sql .=" AND b.fk_account=".GETPOST("search_account",'int');
|
||||||
if (GETPOST("search_paymenttype") > 0) $sql .=" AND c.code='".GETPOST("search_paymenttype",'int')."'";
|
if (GETPOST("search_paymenttype") != "") $sql .=" AND c.code='".GETPOST("search_paymenttype")."'";
|
||||||
if (GETPOST("search_amount")) $sql .=" AND p.amount=".price2num(GETPOST("search_amount"));
|
if (GETPOST("search_amount")) $sql .=" AND p.amount=".price2num(GETPOST("search_amount"));
|
||||||
if (GETPOST("search_company")) $sql .=" AND s.nom LIKE '%".$db->escape(GETPOST("search_company"))."%'";
|
if (GETPOST("search_company")) $sql .=" AND s.nom LIKE '%".$db->escape(GETPOST("search_company"))."%'";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,8 @@ class Contact extends CommonObject
|
|||||||
var $email;
|
var $email;
|
||||||
var $birthday;
|
var $birthday;
|
||||||
var $default_lang;
|
var $default_lang;
|
||||||
var $note; // Private note
|
var $note_public; // Public note
|
||||||
|
var $note; // Private note
|
||||||
var $no_email; // 1=Don't send e-mail to this contact, 0=do
|
var $no_email; // 1=Don't send e-mail to this contact, 0=do
|
||||||
|
|
||||||
var $ref_facturation; // Nb de reference facture pour lequel il est contact
|
var $ref_facturation; // Nb de reference facture pour lequel il est contact
|
||||||
@ -725,7 +726,7 @@ class Contact extends CommonObject
|
|||||||
$this->error=$this->db->error().' sql='.$sql;
|
$this->error=$this->db->error().' sql='.$sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removed extrafields
|
// Removed extrafields
|
||||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) { // For avoid conflicts if trigger used
|
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) { // For avoid conflicts if trigger used
|
||||||
$result=$this->deleteExtraFields($this);
|
$result=$this->deleteExtraFields($this);
|
||||||
@ -1028,13 +1029,17 @@ class Contact extends CommonObject
|
|||||||
$this->specimen=1;
|
$this->specimen=1;
|
||||||
$this->lastname = 'DOLIBARR';
|
$this->lastname = 'DOLIBARR';
|
||||||
$this->firstname = 'SPECIMEN';
|
$this->firstname = 'SPECIMEN';
|
||||||
$this->address = '61 jump street';
|
$this->address = '21 jump street';
|
||||||
$this->zip = '75000';
|
$this->zip = '99999';
|
||||||
$this->town = 'Paris';
|
$this->town = 'MyTown';
|
||||||
$this->country_id = 1;
|
$this->country_id = 1;
|
||||||
$this->country_code = 'FR';
|
$this->country_code = 'FR';
|
||||||
$this->country = 'France';
|
$this->country = 'France';
|
||||||
$this->email = 'specimen@specimen.com';
|
$this->email = 'specimen@specimen.com';
|
||||||
|
|
||||||
|
$this->note_public='This is a comment (public)';
|
||||||
|
$this->note='This is a comment (private)';
|
||||||
|
|
||||||
$socid = rand(1, $num_socs);
|
$socid = rand(1, $num_socs);
|
||||||
$this->socid = $socids[$socid];
|
$this->socid = $socids[$socid];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -894,6 +894,8 @@ class Contrat extends CommonObject
|
|||||||
* @param float $price_base_type HT or TTC
|
* @param float $price_base_type HT or TTC
|
||||||
* @param float $pu_ttc Prix unitaire TTC
|
* @param float $pu_ttc Prix unitaire TTC
|
||||||
* @param int $info_bits Bits de type de lignes
|
* @param int $info_bits Bits de type de lignes
|
||||||
|
* @param int $fk_fournprice Fourn price id
|
||||||
|
* @param int $pa_ht Buying price HT
|
||||||
* @return int <0 si erreur, >0 si ok
|
* @return int <0 si erreur, >0 si ok
|
||||||
*/
|
*/
|
||||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0)
|
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0)
|
||||||
@ -1034,6 +1036,8 @@ class Contrat extends CommonObject
|
|||||||
* @param timestamp $date_fin_reel Date de fin reelle
|
* @param timestamp $date_fin_reel Date de fin reelle
|
||||||
* @param float $price_base_type HT or TTC
|
* @param float $price_base_type HT or TTC
|
||||||
* @param int $info_bits Bits de type de lignes
|
* @param int $info_bits Bits de type de lignes
|
||||||
|
* @param int $fk_fournprice Fourn price id
|
||||||
|
* @param int $pa_ht Buying price HT
|
||||||
* @return int < 0 si erreur, > 0 si ok
|
* @return int < 0 si erreur, > 0 si ok
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0, $localtax2tx=0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0, $localtax2tx=0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0)
|
||||||
|
|||||||
@ -45,7 +45,9 @@ class box_comptes extends ModeleBoxes
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
|||||||
$sql.= " AND fk_statut = 1";
|
$sql.= " AND fk_statut = 1";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||||
$sql.= " ORDER BY datelimite DESC, f.facnumber DESC ";
|
$sql.= " ORDER BY datelimite DESC, f.ref_supplier DESC ";
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -45,7 +45,9 @@ class box_members extends ModeleBoxes
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2196,7 +2196,7 @@ abstract class CommonObject
|
|||||||
* @param object $extrafields extrafield Object
|
* @param object $extrafields extrafield Object
|
||||||
* @param string $mode Show output (view) or input (edit) for extrafield
|
* @param string $mode Show output (view) or input (edit) for extrafield
|
||||||
*
|
*
|
||||||
* return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function showOptionals($extrafields,$mode='view')
|
function showOptionals($extrafields,$mode='view')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -65,7 +65,7 @@ class DolEditor
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." toolbarname=".$toolbarname);
|
dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." width=".$width." height=".$height." toolbarname=".$toolbarname);
|
||||||
|
|
||||||
if (! $rows) $rows=round($height/20);
|
if (! $rows) $rows=round($height/20);
|
||||||
if (! $cols) $cols=($width?round($width/6):80);
|
if (! $cols) $cols=($width?round($width/6):80);
|
||||||
@ -77,10 +77,8 @@ class DolEditor
|
|||||||
$this->uselocalbrowser=$uselocalbrowser;
|
$this->uselocalbrowser=$uselocalbrowser;
|
||||||
|
|
||||||
// Check if extended editor is ok. If not we force textarea
|
// Check if extended editor is ok. If not we force textarea
|
||||||
if (empty($conf->fckeditor->enabled) || ! $okforextendededitor)
|
if (empty($conf->fckeditor->enabled) || ! $okforextendededitor) $this->tool = 'textarea';
|
||||||
{
|
if ($conf->browser->phone) $this->tool = 'textarea';
|
||||||
$this->tool = 'textarea';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define content and some properties
|
// Define content and some properties
|
||||||
if ($this->tool == 'ckeditor')
|
if ($this->tool == 'ckeditor')
|
||||||
|
|||||||
@ -42,6 +42,9 @@ class dolprintIPP
|
|||||||
* @param DoliDB $db database
|
* @param DoliDB $db database
|
||||||
* @param string $host host of Cups
|
* @param string $host host of Cups
|
||||||
* @param string $port port
|
* @param string $port port
|
||||||
|
* @param string $userid userid
|
||||||
|
* @param string $user user
|
||||||
|
* @param string $password password
|
||||||
* @return printIPP
|
* @return printIPP
|
||||||
*/
|
*/
|
||||||
function __construct($db,$host,$port,$userid,$user,$password)
|
function __construct($db,$host,$port,$userid,$user,$password)
|
||||||
@ -76,7 +79,11 @@ class dolprintIPP
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Print selected file
|
* Print selected file
|
||||||
|
*
|
||||||
|
* @param string $file file
|
||||||
|
* @param string $module module
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function print_file($file,$module)
|
function print_file($file,$module)
|
||||||
{
|
{
|
||||||
@ -112,6 +119,9 @@ class dolprintIPP
|
|||||||
/**
|
/**
|
||||||
* List jobs print
|
* List jobs print
|
||||||
*
|
*
|
||||||
|
* @param string $module module
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function list_jobs($module)
|
function list_jobs($module)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -97,6 +97,7 @@ class ExtraFields
|
|||||||
* @param string $elementtype Element type ('member', 'product', 'company', ...)
|
* @param string $elementtype Element type ('member', 'product', 'company', ...)
|
||||||
* @param int $unique Is field unique or not
|
* @param int $unique Is field unique or not
|
||||||
* @param int $required Is field required or not
|
* @param int $required Is field required or not
|
||||||
|
* @param string $default_value Defaulted value
|
||||||
* @param array $param Params for field
|
* @param array $param Params for field
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@ -219,7 +220,7 @@ class ExtraFields
|
|||||||
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0,$param)
|
private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -356,7 +357,7 @@ class ExtraFields
|
|||||||
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||||
* @return int >0 if OK, <=0 if KO
|
* @return int >0 if OK, <=0 if KO
|
||||||
*/
|
*/
|
||||||
function update($attrname,$label,$type,$length,$elementtype,$unique=0,$required=0,$pos,$param='')
|
function update($attrname,$label,$type,$length,$elementtype,$unique=0,$required=0,$pos=0,$param='')
|
||||||
{
|
{
|
||||||
$table=$elementtype.'_extrafields';
|
$table=$elementtype.'_extrafields';
|
||||||
// Special case for not normalized table names
|
// Special case for not normalized table names
|
||||||
@ -814,7 +815,7 @@ class ExtraFields
|
|||||||
* Fill array_options array for object by extrafields value (using for data send by forms)
|
* Fill array_options array for object by extrafields value (using for data send by forms)
|
||||||
*
|
*
|
||||||
* @param array $extralabels $array of extrafields
|
* @param array $extralabels $array of extrafields
|
||||||
* @param object $object object
|
* @param object &$object object
|
||||||
* @return int 1 if array_options set / 0 if no value
|
* @return int 1 if array_options set / 0 if no value
|
||||||
*/
|
*/
|
||||||
function setOptionalsFromPost($extralabels,&$object)
|
function setOptionalsFromPost($extralabels,&$object)
|
||||||
|
|||||||
@ -3321,8 +3321,12 @@ class Form
|
|||||||
|
|
||||||
if ($d)
|
if ($d)
|
||||||
{
|
{
|
||||||
|
$usecalendar='combo';
|
||||||
|
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) $usecalendar=empty($conf->global->MAIN_POPUP_CALENDAR)?'eldy':$conf->global->MAIN_POPUP_CALENDAR;
|
||||||
|
if ($conf->browser->phone) $usecalendar='combo';
|
||||||
|
|
||||||
// Show date with popup
|
// Show date with popup
|
||||||
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none"))
|
if ($usecalendar != 'combo')
|
||||||
{
|
{
|
||||||
$formated_date='';
|
$formated_date='';
|
||||||
//print "e".$set_time." t ".$conf->format_date_short;
|
//print "e".$set_time." t ".$conf->format_date_short;
|
||||||
@ -3333,7 +3337,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calendrier popup version eldy
|
// Calendrier popup version eldy
|
||||||
if (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == "eldy")
|
if ($usecalendar == "eldy")
|
||||||
{
|
{
|
||||||
// Zone de saisie manuelle de la date
|
// Zone de saisie manuelle de la date
|
||||||
$retstring.='<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
$retstring.='<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
||||||
@ -3355,14 +3359,13 @@ class Form
|
|||||||
$retstring.='<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
$retstring.='<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Bad value of calendar";
|
print "Bad value of MAIN_POPUP_CALENDAR";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show date with combo selects
|
// Show date with combo selects
|
||||||
if (empty($conf->use_javascript_ajax) || $conf->global->MAIN_POPUP_CALENDAR == "none")
|
else
|
||||||
{
|
{
|
||||||
// Day
|
// Day
|
||||||
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat" name="'.$prefix.'day">';
|
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat" name="'.$prefix.'day">';
|
||||||
|
|
||||||
@ -3373,15 +3376,7 @@ class Form
|
|||||||
|
|
||||||
for ($day = 1 ; $day <= 31; $day++)
|
for ($day = 1 ; $day <= 31; $day++)
|
||||||
{
|
{
|
||||||
if ($day == $sday)
|
$retstring.='<option value="'.$day.'"'.($day == $sday ? ' selected="selected"':'').'>'.$day.'</option>';
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$day\" selected=\"selected\">$day";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$day\">$day";
|
|
||||||
}
|
|
||||||
$retstring.="</option>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$retstring.="</select>";
|
$retstring.="</select>";
|
||||||
@ -3412,15 +3407,7 @@ class Form
|
|||||||
|
|
||||||
for ($year = $syear - 5; $year < $syear + 10 ; $year++)
|
for ($year = $syear - 5; $year < $syear + 10 ; $year++)
|
||||||
{
|
{
|
||||||
if ($year == $syear)
|
$retstring.='<option value="'.$year.'"'.($year == $syear ? ' selected="true"':'').'>'.$year.'</option>';
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$year\" selected=\"true\">".$year;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$year\">".$year;
|
|
||||||
}
|
|
||||||
$retstring.="</option>";
|
|
||||||
}
|
}
|
||||||
$retstring.="</select>\n";
|
$retstring.="</select>\n";
|
||||||
}
|
}
|
||||||
@ -3436,21 +3423,11 @@ class Form
|
|||||||
if ($empty) $retstring.='<option value="-1"> </option>';
|
if ($empty) $retstring.='<option value="-1"> </option>';
|
||||||
for ($hour = 0; $hour < 24; $hour++)
|
for ($hour = 0; $hour < 24; $hour++)
|
||||||
{
|
{
|
||||||
if (dol_strlen($hour) < 2)
|
if (strlen($hour) < 2) $hour = "0" . $hour;
|
||||||
{
|
$retstring.='<option value="'.$hour.'"'.(($hour == $shour)?' selected="true"':'').'>'.$hour.(empty($conf->dol_optimize_smallscreen)?'':'H').'</option>';
|
||||||
$hour = "0" . $hour;
|
|
||||||
}
|
|
||||||
if ($hour == $shour)
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$hour\" selected=\"true\">$hour</option>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$hour\">$hour</option>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$retstring.="</select>";
|
$retstring.='</select>';
|
||||||
$retstring.="H\n";
|
if (empty($conf->dol_optimize_smallscreen)) $retstring.=":";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($m)
|
if ($m)
|
||||||
@ -3460,21 +3437,10 @@ class Form
|
|||||||
if ($empty) $retstring.='<option value="-1"> </option>';
|
if ($empty) $retstring.='<option value="-1"> </option>';
|
||||||
for ($min = 0; $min < 60 ; $min++)
|
for ($min = 0; $min < 60 ; $min++)
|
||||||
{
|
{
|
||||||
if (dol_strlen($min) < 2)
|
if (strlen($min) < 2) $min = "0" . $min;
|
||||||
{
|
$retstring.='<option value="'.$min.'"'.(($min == $smin)?' selected="true"':'').'>'.$min.(empty($conf->dol_optimize_smallscreen)?'':'').'</option>';
|
||||||
$min = "0" . $min;
|
|
||||||
}
|
|
||||||
if ($min == $smin)
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$min\" selected=\"true\">$min</option>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retstring.="<option value=\"$min\">$min</option>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$retstring.="</select>";
|
$retstring.='</select>';
|
||||||
$retstring.="M\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a "Now" button
|
// Add a "Now" button
|
||||||
|
|||||||
@ -211,9 +211,10 @@ class FormOther
|
|||||||
/**
|
/**
|
||||||
* Return list of revenue stamp for country
|
* Return list of revenue stamp for country
|
||||||
*
|
*
|
||||||
* @param string $selected Value of preselected revenue stamp
|
* @param string $selected Value of preselected revenue stamp
|
||||||
* @param string $htmlname Name of combo list
|
* @param string $htmlname Name of combo list
|
||||||
* @return string HTML select list
|
* @param string $country_code Country Code
|
||||||
|
* @return string HTML select list
|
||||||
*/
|
*/
|
||||||
function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
|
function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -694,6 +694,7 @@ class Translate
|
|||||||
/**
|
/**
|
||||||
* Return a currency code into its symbol
|
* Return a currency code into its symbol
|
||||||
*
|
*
|
||||||
|
* @param string $currency_code Currency Code
|
||||||
* @param string $amount If not '', show currency + amount according to langs ($10, 10€).
|
* @param string $amount If not '', show currency + amount according to langs ($10, 10€).
|
||||||
* @return string Amount + Currency symbol encoded into UTF8
|
* @return string Amount + Currency symbol encoded into UTF8
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -299,9 +299,10 @@ function ajax_dialog($title,$message,$w=350,$h=150)
|
|||||||
/**
|
/**
|
||||||
* Convert a html select field into an ajax combobox
|
* Convert a html select field into an ajax combobox
|
||||||
*
|
*
|
||||||
* @param string $htmlname Name of html select field
|
* @param string $htmlname Name of html select field
|
||||||
* @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
* @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @return string Return html string to convert a select field into a combo
|
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
||||||
|
* @return string Return html string to convert a select field into a combo
|
||||||
*/
|
*/
|
||||||
function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0)
|
function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2752,7 +2752,18 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
// Some test to guess with no need to make database access
|
// Some test to guess with no need to make database access
|
||||||
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
|
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
|
||||||
{
|
{
|
||||||
if ($local == 1 && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
if ($local == 1)
|
||||||
|
{
|
||||||
|
if ($thirdparty_seller->id==$mysoc->id)
|
||||||
|
{
|
||||||
|
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (! $thirdparty_seller->localtax1_assuj) return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
|
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3049,13 +3060,29 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
|||||||
/**
|
/**
|
||||||
* Fonction qui renvoie si tva doit etre tva percue recuperable
|
* Fonction qui renvoie si tva doit etre tva percue recuperable
|
||||||
*
|
*
|
||||||
* @param Societe $thirdparty_seller Objet societe vendeuse
|
* @param Societe $thirdparty_seller Thirdparty seller
|
||||||
* @param Societe $thirdparty_buyer Objet societe acheteuse
|
* @param Societe $thirdparty_buyer Thirdparty buyer
|
||||||
* @param int $idprod Id product
|
* @param int $idprod Id product
|
||||||
|
* @param int $idprodfournprice Id supplier price for product
|
||||||
* @return float 0 or 1
|
* @return float 0 or 1
|
||||||
*/
|
*/
|
||||||
function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod)
|
function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
|
||||||
{
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
if ($idprodfournprice > 0)
|
||||||
|
{
|
||||||
|
$prodprice = new ProductFournisseur($db);
|
||||||
|
$prodprice->fetch_product_fournisseur_price($idprodfournprice);
|
||||||
|
return $prodprice->fourn_tva_npr;
|
||||||
|
}
|
||||||
|
elseif ($idprod > 0)
|
||||||
|
{
|
||||||
|
$prod = new Product($db);
|
||||||
|
$prod->fetch($idprod);
|
||||||
|
return $prod->tva_npr;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3065,8 +3092,8 @@ function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod)
|
|||||||
* Si le (pays vendeur = pays acheteur) alors TVA par defaut=TVA du produit vendu. Fin de regle.
|
* Si le (pays vendeur = pays acheteur) alors TVA par defaut=TVA du produit vendu. Fin de regle.
|
||||||
* Sinon TVA proposee par defaut=0. Fin de regle.
|
* Sinon TVA proposee par defaut=0. Fin de regle.
|
||||||
*
|
*
|
||||||
* @param Societe $thirdparty_seller Objet societe vendeuse
|
* @param Societe $thirdparty_seller Thirdparty seller
|
||||||
* @param Societe $thirdparty_buyer Objet societe acheteuse
|
* @param Societe $thirdparty_buyer Thirdparty buyer
|
||||||
* @param int $local Localtax to process (1 or 2)
|
* @param int $local Localtax to process (1 or 2)
|
||||||
* @param int $idprod Id product
|
* @param int $idprod Id product
|
||||||
* @return float localtax, -1 si ne peut etre determine
|
* @return float localtax, -1 si ne peut etre determine
|
||||||
|
|||||||
@ -72,13 +72,15 @@ function dol_json_encode($elements)
|
|||||||
$output = '{';
|
$output = '{';
|
||||||
$last = $num - 1;
|
$last = $num - 1;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($elements as $key => $value)
|
if (is_array($elements) && count($elements)>0) {
|
||||||
{
|
foreach($elements as $key => $value)
|
||||||
$output .= '"'.$key.'":';
|
{
|
||||||
if (is_array($value)) $output.= json_encode($value);
|
$output .= '"'.$key.'":';
|
||||||
else $output .= _val($value);
|
if (is_array($value)) $output.= json_encode($value);
|
||||||
if ($i !== $last) $output.= ',';
|
else $output .= _val($value);
|
||||||
++$i;
|
if ($i !== $last) $output.= ',';
|
||||||
|
++$i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$output.= '}';
|
$output.= '}';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,38 +1,38 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/lib/pdf.lib.php
|
* \file htdocs/core/lib/pdf.lib.php
|
||||||
* \brief Set of functions used for PDF generation
|
* \brief Set of functions used for PDF generation
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return array with format properties of default PDF format
|
* Return array with format properties of default PDF format
|
||||||
*
|
*
|
||||||
* @return array Array('width'=>w,'height'=>h,'unit'=>u);
|
* @return array Array('width'=>w,'height'=>h,'unit'=>u);
|
||||||
*/
|
*/
|
||||||
function pdf_getFormat()
|
function pdf_getFormat()
|
||||||
{
|
{
|
||||||
global $conf,$db;
|
global $conf,$db;
|
||||||
@ -78,7 +78,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->MAIN_DISABLE_FPDI))
|
if (! empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->MAIN_DISABLE_FPDI))
|
||||||
return "Error MAIN_USE_FPDF and MAIN_DISABLE_FPDI can't be set together";
|
return "Error MAIN_USE_FPDF and MAIN_DISABLE_FPDI can't be set together";
|
||||||
|
|
||||||
// We use by default TCPDF else FPDF
|
// We use by default TCPDF else FPDF
|
||||||
if (empty($conf->global->MAIN_USE_FPDF)) require_once TCPDF_PATH.'tcpdf.php';
|
if (empty($conf->global->MAIN_USE_FPDF)) require_once TCPDF_PATH.'tcpdf.php';
|
||||||
@ -96,15 +96,15 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
|||||||
{
|
{
|
||||||
/* Permission supported by TCPDF
|
/* Permission supported by TCPDF
|
||||||
- print : Print the document;
|
- print : Print the document;
|
||||||
- modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
|
- modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
|
||||||
- copy : Copy or otherwise extract text and graphics from the document;
|
- copy : Copy or otherwise extract text and graphics from the document;
|
||||||
- annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
|
- annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
|
||||||
- fill-forms : Fill in existing interactive form fields (including signature fields), even if 'annot-forms' is not specified;
|
- fill-forms : Fill in existing interactive form fields (including signature fields), even if 'annot-forms' is not specified;
|
||||||
- extract : Extract text and graphics (in support of accessibility to users with disabilities or for other purposes);
|
- extract : Extract text and graphics (in support of accessibility to users with disabilities or for other purposes);
|
||||||
- assemble : Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if 'modify' is not set;
|
- assemble : Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if 'modify' is not set;
|
||||||
- print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
|
- print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
|
||||||
- owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
|
- owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
|
||||||
*/
|
*/
|
||||||
if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
||||||
else $pdf = new TCPDF($pagetype,$metric,$format);
|
else $pdf = new TCPDF($pagetype,$metric,$format);
|
||||||
// For TCPDF, we specify permission we want to block
|
// For TCPDF, we specify permission we want to block
|
||||||
@ -125,10 +125,10 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
|||||||
{
|
{
|
||||||
// Declare here a class to overwrite FPDI to add method writeHTMLCell
|
// Declare here a class to overwrite FPDI to add method writeHTMLCell
|
||||||
/**
|
/**
|
||||||
* This class if a enhanced FPDI class that support method writeHTMLCell
|
* This class if a enhanced FPDI class that support method writeHTMLCell
|
||||||
*/
|
*/
|
||||||
class FPDI_DolExtended extends FPDI
|
class FPDI_DolExtended extends FPDI
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* __call
|
* __call
|
||||||
*
|
*
|
||||||
@ -230,16 +230,16 @@ function pdf_getPDFFontSize($outputlangs)
|
|||||||
*/
|
*/
|
||||||
function pdf_getHeightForLogo($logo)
|
function pdf_getHeightForLogo($logo)
|
||||||
{
|
{
|
||||||
$height=22; $maxwidth=130;
|
$height=22; $maxwidth=130;
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
$tmp=dol_getImageSize($logo);
|
$tmp=dol_getImageSize($logo);
|
||||||
if ($tmp['height'])
|
if ($tmp['height'])
|
||||||
{
|
{
|
||||||
$width=round($height*$tmp['width']/$tmp['height']);
|
$width=round($height*$tmp['width']/$tmp['height']);
|
||||||
if ($width > $maxwidth) $height=$height*$maxwidth/$width;
|
if ($width > $maxwidth) $height=$height*$maxwidth/$width;
|
||||||
}
|
}
|
||||||
//print $tmp['width'].' '.$tmp['height'].' '.$width; exit;
|
//print $tmp['width'].' '.$tmp['height'].' '.$width; exit;
|
||||||
return $height;
|
return $height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -275,15 +275,15 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
|||||||
|
|
||||||
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
|
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
|
||||||
{
|
{
|
||||||
// Tel
|
// Tel
|
||||||
if ($sourcecompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->tel);
|
if ($sourcecompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->tel);
|
||||||
// Fax
|
// Fax
|
||||||
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
|
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
|
||||||
// EMail
|
// EMail
|
||||||
if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email);
|
if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email);
|
||||||
// Web
|
// Web
|
||||||
if ($sourcecompany->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($sourcecompany->url);
|
if ($sourcecompany->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($sourcecompany->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'target')
|
if ($mode == 'target')
|
||||||
@ -307,16 +307,16 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
|||||||
|
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
||||||
{
|
{
|
||||||
// Tel
|
// Tel
|
||||||
if ($targetcontact->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->tel);
|
if ($targetcontact->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->tel);
|
||||||
// Fax
|
// Fax
|
||||||
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
|
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
|
||||||
// EMail
|
// EMail
|
||||||
if ($targetcontact->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcontact->email);
|
if ($targetcontact->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcontact->email);
|
||||||
// Web
|
// Web
|
||||||
if ($targetcontact->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcontact->url);
|
if ($targetcontact->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcontact->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -325,16 +325,16 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
|||||||
if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n";
|
if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n";
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
||||||
{
|
{
|
||||||
// Tel
|
// Tel
|
||||||
if ($targetcompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->tel);
|
if ($targetcompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->tel);
|
||||||
// Fax
|
// Fax
|
||||||
if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax);
|
if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax);
|
||||||
// EMail
|
// EMail
|
||||||
if ($targetcompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcompany->email);
|
if ($targetcompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcompany->email);
|
||||||
// Web
|
// Web
|
||||||
if ($targetcompany->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcompany->url);
|
if ($targetcompany->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcompany->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intra VAT
|
// Intra VAT
|
||||||
@ -575,7 +575,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
|||||||
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
||||||
//$nboflines=dol_nboflines_bis($val,120);
|
//$nboflines=dol_nboflines_bis($val,120);
|
||||||
//$cury+=($nboflines*3)+2;
|
//$cury+=($nboflines*3)+2;
|
||||||
$tmpy=$pdf->getStringHeight (100, $val);
|
$tmpy=$pdf->getStringHeight(100, $val);
|
||||||
$cury+=$tmpy;
|
$cury+=$tmpy;
|
||||||
}
|
}
|
||||||
else if (! $usedetailedbban) $cury+=1;
|
else if (! $usedetailedbban) $cury+=1;
|
||||||
@ -626,11 +626,11 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
|||||||
{
|
{
|
||||||
// Make substitution
|
// Make substitution
|
||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'__FROM_NAME__' => $fromcompany->nom,
|
'__FROM_NAME__' => $fromcompany->nom,
|
||||||
'__FROM_EMAIL__' => $fromcompany->email,
|
'__FROM_EMAIL__' => $fromcompany->email,
|
||||||
'__TOTAL_TTC__' => $object->total_ttc,
|
'__TOTAL_TTC__' => $object->total_ttc,
|
||||||
'__TOTAL_HT__' => $object->total_ht,
|
'__TOTAL_HT__' => $object->total_ht,
|
||||||
'__TOTAL_VAT__' => $object->total_vat
|
'__TOTAL_VAT__' => $object->total_vat
|
||||||
);
|
);
|
||||||
complete_substitutions_array($substitutionarray,$outputlangs,$object);
|
complete_substitutions_array($substitutionarray,$outputlangs,$object);
|
||||||
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
|
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
|
||||||
@ -937,11 +937,11 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
|||||||
}
|
}
|
||||||
elseif ($desc == '(DEPOSIT)' && $object->lines[$i]->fk_remise_except)
|
elseif ($desc == '(DEPOSIT)' && $object->lines[$i]->fk_remise_except)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$discount->ref_facture_source);
|
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$discount->ref_facture_source);
|
||||||
// Add date of deposit
|
// Add date of deposit
|
||||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1024,7 +1024,6 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
|||||||
* @param int $i Current line number
|
* @param int $i Current line number
|
||||||
* @param Translate $outputlangs Object langs for output
|
* @param Translate $outputlangs Object langs for output
|
||||||
* @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
|
* @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
|
||||||
* @param HookManager $hookmanager Hook manager instance
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0)
|
function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0)
|
||||||
@ -1132,12 +1131,12 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
*/
|
*/
|
||||||
function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
|
function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
|
||||||
{
|
{
|
||||||
global $conf, $hookmanager;
|
global $conf, $hookmanager;
|
||||||
|
|
||||||
$sign=1;
|
$sign=1;
|
||||||
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
||||||
|
|
||||||
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
||||||
{
|
{
|
||||||
$special_code = $object->lines[$i]->special_code;
|
$special_code = $object->lines[$i]->special_code;
|
||||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||||
@ -1164,19 +1163,19 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
{
|
{
|
||||||
global $hookmanager;
|
global $hookmanager;
|
||||||
|
|
||||||
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
||||||
{
|
{
|
||||||
$special_code = $object->lines[$i]->special_code;
|
$special_code = $object->lines[$i]->special_code;
|
||||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||||
foreach($object->hooks as $modules)
|
foreach($object->hooks as $modules)
|
||||||
{
|
{
|
||||||
if (method_exists($modules[$special_code],'pdf_getlineupwithtax')) return $modules[$special_code]->pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails);
|
if (method_exists($modules[$special_code],'pdf_getlineupwithtax')) return $modules[$special_code]->pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100);
|
if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1342,10 +1341,10 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
*/
|
*/
|
||||||
function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
||||||
{
|
{
|
||||||
global $conf, $hookmanager;
|
global $conf, $hookmanager;
|
||||||
|
|
||||||
$sign=1;
|
$sign=1;
|
||||||
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
||||||
|
|
||||||
if ($object->lines[$i]->special_code == 3)
|
if ($object->lines[$i]->special_code == 3)
|
||||||
{
|
{
|
||||||
@ -1381,27 +1380,27 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
{
|
{
|
||||||
global $hookmanager;
|
global $hookmanager;
|
||||||
|
|
||||||
if ($object->lines[$i]->special_code == 3)
|
if ($object->lines[$i]->special_code == 3)
|
||||||
{
|
{
|
||||||
return $outputlangs->transnoentities("Option");
|
return $outputlangs->transnoentities("Option");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
||||||
{
|
{
|
||||||
$special_code = $object->lines[$i]->special_code;
|
$special_code = $object->lines[$i]->special_code;
|
||||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||||
foreach($object->hooks as $modules)
|
foreach($object->hooks as $modules)
|
||||||
{
|
{
|
||||||
if (method_exists($modules[$special_code],'pdf_getlinetotalwithtax')) return $modules[$special_code]->pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails);
|
if (method_exists($modules[$special_code],'pdf_getlinetotalwithtax')) return $modules[$special_code]->pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($hidedetails) || $hidedetails > 1) return
|
if (empty($hidedetails) || $hidedetails > 1) return
|
||||||
price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100);
|
price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class MenuManager
|
|||||||
if ($leftmenu=="modulesadmintools" && $user->admin)
|
if ($leftmenu=="modulesadmintools" && $user->admin)
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
array_unshift($tabMenu,array(
|
$array_menu_product=array(
|
||||||
'url'=>"/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",
|
'url'=>"/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",
|
||||||
'titre'=>$langs->trans("ProductVatMassChange"),
|
'titre'=>$langs->trans("ProductVatMassChange"),
|
||||||
'enabled'=>($user->admin?true:false),
|
'enabled'=>($user->admin?true:false),
|
||||||
@ -130,10 +130,11 @@ class MenuManager
|
|||||||
'leftmenu'=>'modulesadmintools_massvat',
|
'leftmenu'=>'modulesadmintools_massvat',
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'position'=>20
|
'position'=>20
|
||||||
));
|
);
|
||||||
|
array_unshift($tabMenu,$array_menu_product);
|
||||||
//$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
|
//$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
|
||||||
}
|
}
|
||||||
array_unshift($tabMenu,array(
|
$array_menu_product=array(
|
||||||
'url'=>"/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools",
|
'url'=>"/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools",
|
||||||
'titre'=>$langs->trans("ModulesSystemTools"),
|
'titre'=>$langs->trans("ModulesSystemTools"),
|
||||||
'enabled'=>($user->admin?true:false),
|
'enabled'=>($user->admin?true:false),
|
||||||
@ -144,7 +145,8 @@ class MenuManager
|
|||||||
'leftmenu'=>'modulesadmintools',
|
'leftmenu'=>'modulesadmintools',
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'position'=>20
|
'position'=>20
|
||||||
));
|
);
|
||||||
|
array_unshift($tabMenu,$array_menu_product);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,10 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -151,9 +151,10 @@ class mailing_contacts2 extends MailingTargets
|
|||||||
/**
|
/**
|
||||||
* Return here number of distinct emails returned by your selector.
|
* Return here number of distinct emails returned by your selector.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -218,4 +219,4 @@ class mailing_contacts2 extends MailingTargets
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -157,9 +157,10 @@ class mailing_contacts3 extends MailingTargets
|
|||||||
/**
|
/**
|
||||||
* Return here number of distinct emails returned by your selector.
|
* Return here number of distinct emails returned by your selector.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int Number of recipients
|
* @return int Number of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -239,4 +240,4 @@ class mailing_contacts3 extends MailingTargets
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -100,9 +100,10 @@ class mailing_example extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
// CHANGE THIS: Optionnal
|
// CHANGE THIS: Optionnal
|
||||||
|
|
||||||
|
|||||||
@ -82,13 +82,15 @@ class mailing_fraise extends MailingTargets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Return here number of distinct emails returned by your selector.
|
* Return here number of distinct emails returned by your selector.
|
||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
* \return int
|
*
|
||||||
*/
|
* @param string $sql Requete sql de comptage
|
||||||
function getNbOfRecipients()
|
* @return int Nb of recipients
|
||||||
|
*/
|
||||||
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
$sql = "SELECT count(distinct(a.email)) as nb";
|
$sql = "SELECT count(distinct(a.email)) as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||||
|
|||||||
@ -143,9 +143,10 @@ class mailing_framboise extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int Nb of recipients
|
* @return int Nb of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -77,13 +77,15 @@ class mailing_pomme extends MailingTargets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Return here number of distinct emails returned by your selector.
|
* Return here number of distinct emails returned by your selector.
|
||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
* \return int
|
*
|
||||||
*/
|
* @param string $sql Requete sql de comptage
|
||||||
function getNbOfRecipients()
|
* @return int Number of recipients
|
||||||
|
*/
|
||||||
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -153,9 +153,10 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int Nb of recipients
|
* @return int Nb of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||||||
* @param string $option Option
|
* @param string $option Option
|
||||||
* @return int Number of recipients
|
* @return int Number of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients($filter=1,$option='')
|
function getNbOfRecipients($sql,$filter=1,$option='')
|
||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
|
|||||||
@ -73,9 +73,10 @@ class mailing_xinputfile extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int '' means NA
|
* @return int '' means NA
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,9 +73,10 @@ class mailing_xinputuser extends MailingTargets
|
|||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
*
|
*
|
||||||
|
* @param string $sql Requete sql de comptage
|
||||||
* @return int '' means NA
|
* @return int '' means NA
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,10 +35,12 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php");
|
|||||||
class modPrintIPP extends DolibarrModules
|
class modPrintIPP extends DolibarrModules
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Constructeur. Definit les noms, constantes et boites
|
/**
|
||||||
* \param DB handler d'acces base
|
* Constructor
|
||||||
*/
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db ;
|
$this->db = $db ;
|
||||||
@ -120,25 +122,33 @@ class modPrintIPP extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module.
|
* Function called when module is enabled.
|
||||||
* Definit egalement les repertoires de donnees a creer pour ce module.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
*/
|
* It also creates data directories
|
||||||
function init()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
$sql = array("CREATE TABLE IF NOT EXISTS llx_printer_ipp (rowid int(11) NOT NULL AUTO_INCREMENT,printer_name text NOT NULL, printer_location text NOT NULL,printer_uri varchar(256) NOT NULL,copy int(11) NOT NULL DEFAULT '1',module varchar(16) NOT NULL,login varchar(32) NOT NULL,PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
return $this->_init($sql);
|
function init($options='')
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
|
||||||
*/
|
|
||||||
function remove()
|
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_init($sql, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function called when module is disabled.
|
||||||
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
|
return $this->_remove($sql, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,9 +31,34 @@ print '<head>
|
|||||||
<meta name="author" content="Dolibarr Development Team">
|
<meta name="author" content="Dolibarr Development Team">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
||||||
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
$jquerytheme = 'smoothness';
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||||
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" />'."\n"; // Tooltip
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
|
||||||
|
// jQuery jMobile
|
||||||
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('dol_use_jmobile'))
|
||||||
|
{
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
|
||||||
|
}
|
||||||
|
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||||
|
// Includes CSS for Dolibarr theme
|
||||||
|
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||||
|
$themesubdir='';
|
||||||
|
if (! empty($conf->modules_parts['theme'])) // This slow down
|
||||||
|
{
|
||||||
|
foreach($conf->modules_parts['theme'] as $reldir)
|
||||||
|
{
|
||||||
|
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||||
|
{
|
||||||
|
$themepath=dol_buildpath($reldir.$conf->css, 1);
|
||||||
|
$themesubdir=$reldir;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// CSS forced by modules (relative url starting with /)
|
// CSS forced by modules (relative url starting with /)
|
||||||
if (isset($conf->modules_parts['css']))
|
if (isset($conf->modules_parts['css']))
|
||||||
{
|
{
|
||||||
@ -51,13 +76,19 @@ if (isset($conf->modules_parts['css']))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// JQuery. Must be before other includes
|
if (! empty($conf_css)) print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
||||||
|
|
||||||
|
// JQuery. Must be before other js includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
print '<!-- Includes JS for JQuery -->'."\n";
|
print '<!-- Includes JS for JQuery -->'."\n";
|
||||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
||||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/dst.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/dst.js"></script>'."\n";
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
// jQuery jMobile
|
||||||
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('dol_use_jmobile'))
|
||||||
|
{
|
||||||
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||||
</head>';
|
</head>';
|
||||||
@ -107,13 +138,13 @@ $(document).ready(function () {
|
|||||||
<table class="left" summary="Login pass" cellpadding="2">
|
<table class="left" summary="Login pass" cellpadding="2">
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="bottom"> <strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong> </td>
|
<td valign="bottom" class="loginfield"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong></td>
|
||||||
<td valign="bottom" nowrap="nowrap">
|
<td valign="bottom" nowrap="nowrap">
|
||||||
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
|
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<tr><td valign="top" nowrap="nowrap"> <strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong> </td>
|
<tr><td valign="top" class="loginfield" nowrap="nowrap"><strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong></td>
|
||||||
<td valign="top" nowrap="nowrap">
|
<td valign="top" nowrap="nowrap">
|
||||||
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="off" />
|
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="off" />
|
||||||
</td></tr>
|
</td></tr>
|
||||||
@ -130,7 +161,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
?>
|
?>
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
<!-- Captcha -->
|
<!-- Captcha -->
|
||||||
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
<tr><td valign="middle" class="loginfield" nowrap="nowrap"><b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
||||||
<td valign="top" nowrap="nowrap" align="left" class="none">
|
<td valign="top" nowrap="nowrap" align="left" class="none">
|
||||||
|
|
||||||
<table class="login_table_securitycode" style="width: 100px;"><tr>
|
<table class="login_table_securitycode" style="width: 100px;"><tr>
|
||||||
@ -160,10 +191,16 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
<?php
|
<?php
|
||||||
if ($forgetpasslink || $helpcenterlink)
|
if ($forgetpasslink || $helpcenterlink)
|
||||||
{
|
{
|
||||||
|
$moreparam='';
|
||||||
|
if ($dol_hide_topmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$dol_hide_topmenu;
|
||||||
|
if ($dol_hide_leftmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$dol_hide_leftmenu;
|
||||||
|
if ($dol_no_mouse_hover) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$dol_no_mouse_hover;
|
||||||
|
if ($dol_use_jmobile) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$dol_use_jmobile;
|
||||||
|
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
echo '<div align="center" style="margin-top: 4px;">';
|
echo '<div align="center" style="margin-top: 4px;">';
|
||||||
if ($forgetpasslink) {
|
if ($forgetpasslink) {
|
||||||
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">(';
|
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam.'">(';
|
||||||
echo $langs->trans('PasswordForgotten');
|
echo $langs->trans('PasswordForgotten');
|
||||||
if (! $helpcenterlink) {
|
if (! $helpcenterlink) {
|
||||||
echo ')';
|
echo ')';
|
||||||
@ -172,7 +209,7 @@ if ($forgetpasslink || $helpcenterlink)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($helpcenterlink) {
|
if ($helpcenterlink) {
|
||||||
$url=DOL_URL_ROOT.'/support/index.php';
|
$url=DOL_URL_ROOT.'/support/index.php'.$moreparam;
|
||||||
if (! empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url=$conf->global->MAIN_HELPCENTER_LINKTOUSE;
|
if (! empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url=$conf->global->MAIN_HELPCENTER_LINKTOUSE;
|
||||||
echo '<a style="color: #888888; font-size: 10px" href="'.dol_escape_htmltag($url).'" target="_blank">';
|
echo '<a style="color: #888888; font-size: 10px" href="'.dol_escape_htmltag($url).'" target="_blank">';
|
||||||
if ($forgetpasslink) {
|
if ($forgetpasslink) {
|
||||||
|
|||||||
@ -81,7 +81,7 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
'origin_tva_tx_cache' => 'tva_tx',
|
'origin_tva_tx_cache' => 'tva_tx',
|
||||||
'origin_price_ttc_cache' => 'price_ttc',
|
'origin_price_ttc_cache' => 'price_ttc',
|
||||||
'qty' => 'qty'
|
'qty' => 'qty'
|
||||||
//'remise_percent' => 'discount'
|
,'remise_percent' => 'discount'
|
||||||
),
|
),
|
||||||
'update_textarea' => array(
|
'update_textarea' => array(
|
||||||
'product_desc' => 'desc'
|
'product_desc' => 'desc'
|
||||||
@ -242,7 +242,7 @@ $(document).ready(function() {
|
|||||||
$('#select_type').val(data.type).attr('disabled','disabled').trigger('change');
|
$('#select_type').val(data.type).attr('disabled','disabled').trigger('change');
|
||||||
//$('#price_base_type_area').show();
|
//$('#price_base_type_area').show();
|
||||||
$('#qty').val(data.qty);
|
$('#qty').val(data.qty);
|
||||||
//$('#remise_percent').val(data.discount);
|
if($('#remise_percent').val() < data.discount) $('#remise_percent').val(data.discount);
|
||||||
|
|
||||||
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances['product_desc'] != "undefined") {
|
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances['product_desc'] != "undefined") {
|
||||||
CKEDITOR.instances['product_desc'].setData(data.desc).focus();
|
CKEDITOR.instances['product_desc'].setData(data.desc).focus();
|
||||||
|
|||||||
@ -31,9 +31,34 @@ print '<head>
|
|||||||
<meta name="author" content="Dolibarr Development Team">
|
<meta name="author" content="Dolibarr Development Team">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
||||||
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
|
||||||
|
$jquerytheme = 'smoothness';
|
||||||
|
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" />'."\n"; // Tooltip
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
|
||||||
|
// jQuery jMobile
|
||||||
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('dol_use_jmobile'))
|
||||||
|
{
|
||||||
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
|
||||||
|
}
|
||||||
|
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||||
|
// Includes CSS for Dolibarr theme
|
||||||
|
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||||
|
$themesubdir='';
|
||||||
|
if (! empty($conf->modules_parts['theme'])) // This slow down
|
||||||
|
{
|
||||||
|
foreach($conf->modules_parts['theme'] as $reldir)
|
||||||
|
{
|
||||||
|
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||||
|
{
|
||||||
|
$themepath=dol_buildpath($reldir.$conf->css, 1);
|
||||||
|
$themesubdir=$reldir;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// CSS forced by modules (relative url starting with /)
|
// CSS forced by modules (relative url starting with /)
|
||||||
if (isset($conf->modules_parts['css']))
|
if (isset($conf->modules_parts['css']))
|
||||||
{
|
{
|
||||||
@ -51,13 +76,19 @@ if (isset($conf->modules_parts['css']))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// JQuery. Must be before other includes
|
if (! empty($conf_css)) print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
||||||
|
|
||||||
|
// JQuery. Must be before other js includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
print '<!-- Includes JS for JQuery -->'."\n";
|
print '<!-- Includes JS for JQuery -->'."\n";
|
||||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
||||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/dst.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/dst.js"></script>'."\n";
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
// jQuery jMobile
|
||||||
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('dol_use_jmobile'))
|
||||||
|
{
|
||||||
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||||
</head>';
|
</head>';
|
||||||
@ -95,7 +126,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="bottom"> <strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong> </td>
|
<td valign="bottom" class="loginfield" nowrap="nowrap"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong></td>
|
||||||
<td valign="bottom" nowrap="nowrap">
|
<td valign="bottom" nowrap="nowrap">
|
||||||
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
|
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
|
||||||
</td>
|
</td>
|
||||||
@ -115,7 +146,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
<!-- Captcha -->
|
<!-- Captcha -->
|
||||||
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
<tr><td valign="middle" class="loginfield" nowrap="nowrap"><b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
||||||
<td valign="top" nowrap="nowrap" align="left" class="none">
|
<td valign="top" nowrap="nowrap" align="left" class="none">
|
||||||
|
|
||||||
<table class="login_table_securitycode" style="width: 100px;"><tr>
|
<table class="login_table_securitycode" style="width: 100px;"><tr>
|
||||||
@ -145,9 +176,15 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div align="center" style="margin-top: 4px;">
|
<div align="center" style="margin-top: 4px;">
|
||||||
<a style="color: #888888; font-size: 10px" href="<?php echo $dol_url_root; ?>/">
|
<?php
|
||||||
<?php echo '('.$langs->trans('BackToLoginPage').')'; ?>
|
$moreparam='';
|
||||||
</a>
|
if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu;
|
||||||
|
if (! empty($conf->dol_hide_leftmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu;
|
||||||
|
if (! empty($conf->dol_no_mouse_hover)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover;
|
||||||
|
if (! empty($conf->dol_use_jmobile)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$conf->dol_use_jmobile;
|
||||||
|
|
||||||
|
print '<a style="color: #888888; font-size: 10px" href="'.$dol_url_root.$moreparam.'">('.$langs->trans('BackToLoginPage').')</a>';
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -54,7 +54,7 @@ if(!empty($cancel)) {
|
|||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$action='';
|
$action='';
|
||||||
}else {
|
}else {
|
||||||
Header ( "Location: ".dol_buildpath('/cron/cron/list.php',1).'?status=1');
|
Header("Location: ".dol_buildpath('/cron/cron/list.php',1).'?status=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->del
|
|||||||
setEventMessage($object->error,'errors');
|
setEventMessage($object->error,'errors');
|
||||||
$action='edit';
|
$action='edit';
|
||||||
}else {
|
}else {
|
||||||
Header ( "Location: ".dol_buildpath('/cron/cron/list.php',1).'?status=1');
|
Header("Location: ".dol_buildpath('/cron/cron/list.php',1).'?status=1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -407,7 +407,7 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||||
if (!empty($limit) && !empty($offset)) {
|
if (!empty($limit) && !empty($offset)) {
|
||||||
$sql.= $this->db->plimit( $limit + 1 ,$offset);
|
$sql.= $this->db->plimit($limit + 1,$offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sqlwhere = array();
|
$sqlwhere = array();
|
||||||
@ -1061,7 +1061,8 @@ class Cronjob extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Crob Job line class
|
* Crob Job line class
|
||||||
*/
|
*/
|
||||||
class Cronjobline{
|
class Cronjobline
|
||||||
|
{
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $ref;
|
var $ref;
|
||||||
|
|||||||
@ -1195,14 +1195,14 @@ class Expedition extends CommonObject
|
|||||||
{
|
{
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->listmeths[$i][rowid] = $obj->rowid;
|
$this->listmeths[$i]['rowid'] = $obj->rowid;
|
||||||
$this->listmeths[$i][code] = $obj->code;
|
$this->listmeths[$i]['code'] = $obj->code;
|
||||||
$label=$langs->trans('SendingMethod'.$obj->code);
|
$label=$langs->trans('SendingMethod'.$obj->code);
|
||||||
$this->listmeths[$i][libelle] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
|
$this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
|
||||||
$this->listmeths[$i][description] = $obj->description;
|
$this->listmeths[$i]['description'] = $obj->description;
|
||||||
if ($obj->tracking)
|
if ($obj->tracking)
|
||||||
{
|
{
|
||||||
$this->listmeths[$i][tracking] = $obj->tracking;
|
$this->listmeths[$i]['tracking'] = $obj->tracking;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1214,11 +1214,11 @@ class Expedition extends CommonObject
|
|||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($obj->code).'.modules.php';
|
require_once DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($obj->code).'.modules.php';
|
||||||
$shipmethod = new $classname();
|
$shipmethod = new $classname();
|
||||||
$this->listmeths[$i][tracking] = $shipmethod->provider_url_status('{TRACKID}');
|
$this->listmeths[$i]['tracking'] = $shipmethod->provider_url_status('{TRACKID}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->listmeths[$i][active] = $obj->active;
|
$this->listmeths[$i]['active'] = $obj->active;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1227,7 +1227,9 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update/create delivery method.
|
* Update/create delivery method.
|
||||||
* @param id $id id method to activate
|
*
|
||||||
|
* @param string $id id method to activate
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function update_delivery_method($id='')
|
function update_delivery_method($id='')
|
||||||
@ -1235,16 +1237,16 @@ class Expedition extends CommonObject
|
|||||||
if ($id=='')
|
if ($id=='')
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."c_shipment_mode (code, libelle, description, tracking)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."c_shipment_mode (code, libelle, description, tracking)";
|
||||||
$sql.=" VALUES ('".$this->update[code]."','".$this->update[libelle]."','".$this->update[description]."','".$this->update[tracking]."')";
|
$sql.=" VALUES ('".$this->update['code']."','".$this->update['libelle']."','".$this->update['description']."','".$this->update['tracking']."')";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."c_shipment_mode SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."c_shipment_mode SET";
|
||||||
$sql.= " code='".$this->update[code]."'";
|
$sql.= " code='".$this->update['code']."'";
|
||||||
$sql.= ",libelle='".$this->update[libelle]."'";
|
$sql.= ",libelle='".$this->update['libelle']."'";
|
||||||
$sql.= ",description='".$this->update[description]."'";
|
$sql.= ",description='".$this->update['description']."'";
|
||||||
$sql.= ",tracking='".$this->update[tracking]."'";
|
$sql.= ",tracking='".$this->update['tracking']."'";
|
||||||
$sql.= " WHERE rowid=".$id;
|
$sql.= " WHERE rowid=".$id;
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
}
|
}
|
||||||
@ -1253,7 +1255,9 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate delivery method.
|
* Activate delivery method.
|
||||||
|
*
|
||||||
* @param id $id id method to activate
|
* @param id $id id method to activate
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function activ_delivery_method($id)
|
function activ_delivery_method($id)
|
||||||
@ -1267,7 +1271,9 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* DesActivate delivery method.
|
* DesActivate delivery method.
|
||||||
|
*
|
||||||
* @param id $id id method to desactivate
|
* @param id $id id method to desactivate
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function disable_delivery_method($id)
|
function disable_delivery_method($id)
|
||||||
|
|||||||
@ -392,7 +392,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
{
|
{
|
||||||
$sql = 'SELECT f.rowid, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx, f.tva';
|
$sql = 'SELECT f.rowid, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx, f.tva';
|
||||||
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
||||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type';
|
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits';
|
||||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
||||||
@ -433,6 +433,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$this->lines[$i]->total_ttc = $obj->total_ttc;
|
$this->lines[$i]->total_ttc = $obj->total_ttc;
|
||||||
$this->lines[$i]->fk_product = $obj->fk_product;
|
$this->lines[$i]->fk_product = $obj->fk_product;
|
||||||
$this->lines[$i]->product_type = $obj->product_type;
|
$this->lines[$i]->product_type = $obj->product_type;
|
||||||
|
$this->lines[$i]->info_bits = $obj->info_bits;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -1077,6 +1078,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$pu_ttc = $tabprice[5];
|
$pu_ttc = $tabprice[5];
|
||||||
$total_localtax1 = $tabprice[9];
|
$total_localtax1 = $tabprice[9];
|
||||||
$total_localtax2 = $tabprice[10];
|
$total_localtax2 = $tabprice[10];
|
||||||
|
$info_bits = empty($info_bits) ? 0 : $info_bits;
|
||||||
|
|
||||||
if ($idproduct)
|
if ($idproduct)
|
||||||
{
|
{
|
||||||
@ -1106,6 +1108,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
if ($idproduct) $sql.= ", fk_product = ".$idproduct;
|
if ($idproduct) $sql.= ", fk_product = ".$idproduct;
|
||||||
else $sql.= ", fk_product = null";
|
else $sql.= ", fk_product = null";
|
||||||
$sql.= ", product_type = ".$product_type;
|
$sql.= ", product_type = ".$product_type;
|
||||||
|
$sql.= ", infos_bits = ".$infos_bits;
|
||||||
$sql.= " WHERE rowid = ".$id;
|
$sql.= " WHERE rowid = ".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::updateline sql=".$sql);
|
dol_syslog(get_class($this)."::updateline sql=".$sql);
|
||||||
|
|||||||
@ -48,6 +48,7 @@ class ProductFournisseur extends Product
|
|||||||
var $product_fourn_id; // supplier id
|
var $product_fourn_id; // supplier id
|
||||||
var $fk_availability; // availability delay
|
var $fk_availability; // availability delay
|
||||||
var $fourn_unitprice;
|
var $fourn_unitprice;
|
||||||
|
var $fourn_tva_npr;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,7 +148,7 @@ class ProductFournisseur extends Product
|
|||||||
* @param float $remise Discount regarding qty (amount)
|
* @param float $remise Discount regarding qty (amount)
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0)
|
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0)
|
||||||
{
|
{
|
||||||
global $conf,$mysoc;
|
global $conf,$mysoc;
|
||||||
|
|
||||||
@ -188,6 +189,7 @@ class ProductFournisseur extends Product
|
|||||||
$sql.= " tva_tx = ".$tva_tx.",";
|
$sql.= " tva_tx = ".$tva_tx.",";
|
||||||
$sql.= " fk_availability = ".$availability.",";
|
$sql.= " fk_availability = ".$availability.",";
|
||||||
$sql.= " entity = ".$conf->entity.",";
|
$sql.= " entity = ".$conf->entity.",";
|
||||||
|
$sql.= " info_bits = ".$newnpr.",";
|
||||||
$sql.= " charges = ".$charges;
|
$sql.= " charges = ".$charges;
|
||||||
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
||||||
// TODO Add price_base_type and price_ttc
|
// TODO Add price_base_type and price_ttc
|
||||||
@ -218,7 +220,7 @@ class ProductFournisseur extends Product
|
|||||||
{
|
{
|
||||||
// Add price for this quantity to supplier
|
// Add price for this quantity to supplier
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price(";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price(";
|
||||||
$sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, entity)";
|
$sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, entity, info_bits)";
|
||||||
$sql.= " values('".$this->db->idate($now)."',";
|
$sql.= " values('".$this->db->idate($now)."',";
|
||||||
$sql.= " ".$this->id.",";
|
$sql.= " ".$this->id.",";
|
||||||
$sql.= " ".$fourn->id.",";
|
$sql.= " ".$fourn->id.",";
|
||||||
@ -233,6 +235,7 @@ class ProductFournisseur extends Product
|
|||||||
$sql.= " ".$charges.",";
|
$sql.= " ".$charges.",";
|
||||||
$sql.= " ".$unitCharges.",";
|
$sql.= " ".$unitCharges.",";
|
||||||
$sql.= " ".$availability.",";
|
$sql.= " ".$availability.",";
|
||||||
|
$sql.= " ".$newnpr.",";
|
||||||
$sql.= $conf->entity;
|
$sql.= $conf->entity;
|
||||||
$sql.=")";
|
$sql.=")";
|
||||||
|
|
||||||
@ -292,7 +295,7 @@ class ProductFournisseur extends Product
|
|||||||
function fetch_product_fournisseur_price($rowid)
|
function fetch_product_fournisseur_price($rowid)
|
||||||
{
|
{
|
||||||
$sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability,";
|
$sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability,";
|
||||||
$sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.unitcharges";
|
$sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.unitcharges, pfp.recuperableonly as fourn_tva_npr";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
||||||
$sql.= " WHERE pfp.rowid = ".$rowid;
|
$sql.= " WHERE pfp.rowid = ".$rowid;
|
||||||
|
|
||||||
@ -303,20 +306,21 @@ class ProductFournisseur extends Product
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($obj)
|
if ($obj)
|
||||||
{
|
{
|
||||||
$this->product_fourn_price_id = $rowid;
|
$this->product_fourn_price_id = $rowid;
|
||||||
$this->fourn_ref = $obj->ref_fourn;
|
$this->fourn_ref = $obj->ref_fourn;
|
||||||
$this->fourn_price = $obj->price;
|
$this->fourn_price = $obj->price;
|
||||||
$this->fourn_charges = $obj->charges;
|
$this->fourn_charges = $obj->charges;
|
||||||
$this->fourn_qty = $obj->quantity;
|
$this->fourn_qty = $obj->quantity;
|
||||||
$this->fourn_remise_percent = $obj->remise_percent;
|
$this->fourn_remise_percent = $obj->remise_percent;
|
||||||
$this->fourn_remise = $obj->remise;
|
$this->fourn_remise = $obj->remise;
|
||||||
$this->fourn_unitprice = $obj->unitprice;
|
$this->fourn_unitprice = $obj->unitprice;
|
||||||
$this->fourn_unitcharges = $obj->unitcharges;
|
$this->fourn_unitcharges = $obj->unitcharges;
|
||||||
$this->tva_tx = $obj->tva_tx;
|
$this->tva_tx = $obj->tva_tx;
|
||||||
$this->product_id = $obj->fk_product; // deprecated
|
$this->product_id = $obj->fk_product; // deprecated
|
||||||
$this->fk_product = $obj->fk_product;
|
$this->fk_product = $obj->fk_product;
|
||||||
$this->fk_availability = $obj->fk_availability;
|
$this->fk_availability = $obj->fk_availability;
|
||||||
return 1;
|
$this->fourn_tva_npr = $obj->fourn_tva_npr;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -346,7 +350,7 @@ class ProductFournisseur extends Product
|
|||||||
|
|
||||||
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
|
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
|
||||||
$sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.fk_product as product_fourn_id,";
|
$sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.fk_product as product_fourn_id,";
|
||||||
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges";
|
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges, pfp.info_bits";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= " WHERE pfp.entity IN (".getEntity('product', 1).")";
|
$sql.= " WHERE pfp.entity IN (".getEntity('product', 1).")";
|
||||||
@ -381,6 +385,7 @@ class ProductFournisseur extends Product
|
|||||||
$prodfourn->fourn_name = $record["supplier_name"];
|
$prodfourn->fourn_name = $record["supplier_name"];
|
||||||
$prodfourn->fk_availability = $record["fk_availability"];
|
$prodfourn->fk_availability = $record["fk_availability"];
|
||||||
$prodfourn->id = $prodid;
|
$prodfourn->id = $prodid;
|
||||||
|
$prodfourn->fourn_tva_npr = $record["info_bits"];
|
||||||
|
|
||||||
if (!isset($prodfourn->fourn_unitprice))
|
if (!isset($prodfourn->fourn_unitprice))
|
||||||
{
|
{
|
||||||
@ -501,4 +506,4 @@ class ProductFournisseur extends Product
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -512,13 +512,14 @@ elseif ($action == 'addline')
|
|||||||
$label.= $_POST['np_desc'];
|
$label.= $_POST['np_desc'];
|
||||||
|
|
||||||
$tvatx=get_default_tva($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']);
|
$tvatx=get_default_tva($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']);
|
||||||
|
$npr = get_default_npr($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']);
|
||||||
|
|
||||||
$localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty);
|
$localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty);
|
||||||
$localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty);
|
$localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty);
|
||||||
$remise_percent=GETPOST('remise_percent');
|
$remise_percent=GETPOST('remise_percent');
|
||||||
$type = $product->type;
|
$type = $product->type;
|
||||||
|
|
||||||
$result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent);
|
$result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent, '', '', 0, $npr);
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($idprod == -1)
|
if ($idprod == -1)
|
||||||
@ -530,7 +531,9 @@ elseif ($action == 'addline')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tauxtva = price2num($_POST['tauxtva']);
|
$npr = preg_match('/\*/', $_POST['tauxtva']) ? 1 : 0 ;
|
||||||
|
$tauxtva = str_replace('*','',$_POST["tauxtva"]);
|
||||||
|
$tauxtva = price2num($tauxtva);
|
||||||
$localtax1tx= get_localtax($tauxtva, 1, $mysoc,$object->thirdparty);
|
$localtax1tx= get_localtax($tauxtva, 1, $mysoc,$object->thirdparty);
|
||||||
$localtax2tx= get_localtax($tauxtva, 2, $mysoc,$object->thirdparty);
|
$localtax2tx= get_localtax($tauxtva, 2, $mysoc,$object->thirdparty);
|
||||||
$remise_percent=GETPOST('remise_percent');
|
$remise_percent=GETPOST('remise_percent');
|
||||||
@ -548,14 +551,14 @@ elseif ($action == 'addline')
|
|||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
|
|
||||||
//$desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0)
|
//$desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0)
|
||||||
$result=$object->addline($_POST['dp_desc'], $ht, $tauxtva, $localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, 0, $price_base_type, $type);
|
$result=$object->addline($_POST['dp_desc'], $ht, $tauxtva, $localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ttc = price2num($_POST['amountttc']);
|
$ttc = price2num($_POST['amountttc']);
|
||||||
$ht = $ttc / (1 + ($tauxtva / 100));
|
$ht = $ttc / (1 + ($tauxtva / 100));
|
||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
$result=$object->addline($_POST['dp_desc'], $ht, $tauxtva,$localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, 0, $price_base_type, $type);
|
$result=$object->addline($_POST['dp_desc'], $ht, $tauxtva,$localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1774,7 +1777,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td align="right">'.vatrate($object->lines[$i]->tva_tx).'%</td>';
|
print '<td align="right">'.vatrate($object->lines[$i]->tva_tx, true, $object->lines[$i]->info_bits).'%</td>';
|
||||||
|
|
||||||
// Unit price
|
// Unit price
|
||||||
print '<td align="right" nowrap="nowrap">'.price($object->lines[$i]->pu_ht,'MU').'</td>';
|
print '<td align="right" nowrap="nowrap">'.price($object->lines[$i]->pu_ht,'MU').'</td>';
|
||||||
|
|||||||
@ -210,6 +210,18 @@ ALTER TABLE llx_user ADD COLUMN fk_state integer DEFAULT 0;
|
|||||||
ALTER TABLE llx_user ADD COLUMN fk_country integer DEFAULT 0;
|
ALTER TABLE llx_user ADD COLUMN fk_country integer DEFAULT 0;
|
||||||
ALTER TABLE llx_product_price ADD COLUMN import_key varchar(14) AFTER price_by_qty;
|
ALTER TABLE llx_product_price ADD COLUMN import_key varchar(14) AFTER price_by_qty;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE llx_printer_ipp
|
||||||
|
(
|
||||||
|
rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
printer_name text NOT NULL,
|
||||||
|
printer_location text NOT NULL,
|
||||||
|
printer_uri varchar(256) NOT NULL,
|
||||||
|
copy int(11) NOT NULL DEFAULT '1',
|
||||||
|
module varchar(16) NOT NULL,
|
||||||
|
login varchar(32) NOT NULL,
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
ALTER TABLE llx_socpeople ADD COLUMN ref_ext varchar(128) after entity;
|
ALTER TABLE llx_socpeople ADD COLUMN ref_ext varchar(128) after entity;
|
||||||
|
|
||||||
create table llx_commande_extrafields
|
create table llx_commande_extrafields
|
||||||
@ -220,3 +232,8 @@ create table llx_commande_extrafields
|
|||||||
import_key varchar(14)
|
import_key varchar(14)
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
ALTER TABLE llx_commande_extrafields ADD INDEX idx_commande_extrafields (fk_object);
|
ALTER TABLE llx_commande_extrafields ADD INDEX idx_commande_extrafields (fk_object);
|
||||||
|
|
||||||
|
ALTER TABLE llx_socpeople ADD COLUMN note_public text after note;
|
||||||
|
ALTER TABLE llx_societe ADD COLUMN note_public text after note;
|
||||||
|
|
||||||
|
>>>>>>> refs/heads/develop
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
create table llx_facture_fourn
|
create table llx_facture_fourn
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
ref varchar(30),
|
||||||
facnumber varchar(50) NOT NULL,
|
ref_supplier varchar(50) NOT NULL,
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
|
||||||
ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
|
ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
|
||||||
|
|||||||
@ -43,6 +43,7 @@ create table llx_facture_fourn_det
|
|||||||
product_type integer DEFAULT 0,
|
product_type integer DEFAULT 0,
|
||||||
date_start datetime DEFAULT NULL, -- date debut si service
|
date_start datetime DEFAULT NULL, -- date debut si service
|
||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
|
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||||
fk_code_ventilation integer DEFAULT 0 NOT NULL,
|
fk_code_ventilation integer DEFAULT 0 NOT NULL,
|
||||||
import_key varchar(14)
|
import_key varchar(14)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
28
htdocs/install/mysql/tables/llx_printer_ipp.sql
Normal file
28
htdocs/install/mysql/tables/llx_printer_ipp.sql
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Florian HENRY <florian.henry@open-concept.pro>
|
||||||
|
--
|
||||||
|
-- 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
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_printer_ipp
|
||||||
|
(
|
||||||
|
rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
printer_name text NOT NULL,
|
||||||
|
printer_location text NOT NULL,
|
||||||
|
printer_uri varchar(256) NOT NULL,
|
||||||
|
copy int(11) NOT NULL DEFAULT '1',
|
||||||
|
module varchar(16) NOT NULL,
|
||||||
|
login varchar(32) NOT NULL,
|
||||||
|
)ENGINE=innodb;
|
||||||
@ -37,6 +37,7 @@ create table llx_product_fournisseur_price
|
|||||||
charges double(24,8) DEFAULT 0,
|
charges double(24,8) DEFAULT 0,
|
||||||
unitcharges double(24,8) DEFAULT 0,
|
unitcharges double(24,8) DEFAULT 0,
|
||||||
tva_tx double(6,3) NOT NULL,
|
tva_tx double(6,3) NOT NULL,
|
||||||
|
info_bits integer NOT NULL DEFAULT 0,
|
||||||
fk_user integer,
|
fk_user integer,
|
||||||
import_key varchar(14) -- Import key
|
import_key varchar(14) -- Import key
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -63,6 +63,7 @@ create table llx_societe
|
|||||||
capital real, -- capital de la societe
|
capital real, -- capital de la societe
|
||||||
fk_stcomm integer DEFAULT 0 NOT NULL, -- commercial statut
|
fk_stcomm integer DEFAULT 0 NOT NULL, -- commercial statut
|
||||||
note text, --
|
note text, --
|
||||||
|
note_public text, --
|
||||||
prefix_comm varchar(5), -- prefix commercial
|
prefix_comm varchar(5), -- prefix commercial
|
||||||
client tinyint DEFAULT 0, -- client 0/1/2
|
client tinyint DEFAULT 0, -- client 0/1/2
|
||||||
fournisseur tinyint DEFAULT 0, -- fournisseur 0/1
|
fournisseur tinyint DEFAULT 0, -- fournisseur 0/1
|
||||||
|
|||||||
@ -47,6 +47,7 @@ create table llx_socpeople
|
|||||||
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
||||||
fk_user_modif integer,
|
fk_user_modif integer,
|
||||||
note text,
|
note text,
|
||||||
|
note_public text,
|
||||||
default_lang varchar(6),
|
default_lang varchar(6),
|
||||||
canvas varchar(32), -- type of canvas if used (null by default)
|
canvas varchar(32), -- type of canvas if used (null by default)
|
||||||
import_key varchar(14)
|
import_key varchar(14)
|
||||||
|
|||||||
@ -259,8 +259,8 @@ LastStableVersion = Laatste stabiele versie
|
|||||||
GenericMaskCodes = U kunt elk gewenst maskernummer invoeren. In dit masker, kunnen de volgende tags worden gebruikt:<br><b>{000000}</b> correspondeert met een nummer welke vermeerderd zal worden op elke %s. Voer zoveel nullen in als de gewenste lengte van de teller. De teller wordt aangevuld met nullen vanaf links zodat er zoveel nullen zijn als in het masker.<br><b>{000000+000}</b> hetzelfde als voorgaand maar een offset corresponderend met het nummer aan de rechterkant van het + teken is toegevoegd startend op de eerste %s. <br><b>{000000@x}</b> hetzelfde als voorgaande maar de teller wordt gereset naar nul, wanneer maand x is bereikt (x tussen 1 en 12). Als deze optie is gebruikt en x is 2 of hoger, dan is de volgorde {yy}{mm} of {yyyy}{mm} ook vereist. <br><b>{dd}</b> dag (01 t/m 31).<br><b>{mm}</b> maand (01 t/m 12).<br><b>{yy}</b>, <b>{yyyy}</b> of <b>{y}</b> jaat over 2, 4 of 1 nummer(s). <br>
|
GenericMaskCodes = U kunt elk gewenst maskernummer invoeren. In dit masker, kunnen de volgende tags worden gebruikt:<br><b>{000000}</b> correspondeert met een nummer welke vermeerderd zal worden op elke %s. Voer zoveel nullen in als de gewenste lengte van de teller. De teller wordt aangevuld met nullen vanaf links zodat er zoveel nullen zijn als in het masker.<br><b>{000000+000}</b> hetzelfde als voorgaand maar een offset corresponderend met het nummer aan de rechterkant van het + teken is toegevoegd startend op de eerste %s. <br><b>{000000@x}</b> hetzelfde als voorgaande maar de teller wordt gereset naar nul, wanneer maand x is bereikt (x tussen 1 en 12). Als deze optie is gebruikt en x is 2 of hoger, dan is de volgorde {yy}{mm} of {yyyy}{mm} ook vereist. <br><b>{dd}</b> dag (01 t/m 31).<br><b>{mm}</b> maand (01 t/m 12).<br><b>{yy}</b>, <b>{yyyy}</b> of <b>{y}</b> jaat over 2, 4 of 1 nummer(s). <br>
|
||||||
GenericMaskCodes2 = <b>{cccc}</b> de afnermerscode<br><b>{cccc000}</b> de afnermerscode en n karakters wordt opgevolgd door een afnermersreferentieteller zonder offset en gereset met de globale teller.<br><b>{tttt}</b> De code van bedrijfstype op n karakters (Zie het menu 'constantent' voor de bedrijfstypes<br>
|
GenericMaskCodes2 = <b>{cccc}</b> de afnermerscode<br><b>{cccc000}</b> de afnermerscode en n karakters wordt opgevolgd door een afnermersreferentieteller zonder offset en gereset met de globale teller.<br><b>{tttt}</b> De code van bedrijfstype op n karakters (Zie het menu 'constantent' voor de bedrijfstypes<br>
|
||||||
GenericMaskCodes3 = Alle andere karakters in het masker zullen intact blijven.<br>Spaties zijn niet toegestaan.<br>
|
GenericMaskCodes3 = Alle andere karakters in het masker zullen intact blijven.<br>Spaties zijn niet toegestaan.<br>
|
||||||
GenericMaskCodes4a = <u>Voorbeeld van de 99e %s van de derde partij 'HetBedrijf' gedaan op 2007-01-31:</u><br>
|
GenericMaskCodes4a = <u>Voorbeeld van de 99e %s van de Klant 'HetBedrijf' gedaan op 2007-01-31:</u><br>
|
||||||
GenericMaskCodes4b = <u>Voorbeeld van een derde partij gecreëerd op 2007-03-01:</u><br>
|
GenericMaskCodes4b = <u>Voorbeeld van een Klant gecreëerd op 2007-03-01:</u><br>
|
||||||
GenericMaskCodes5 = <b>ABC{jj}{mm}-{000000}</b> zal <b>ABC0701-000099</b> geven<br><b>{0000+100}-ZZZ/{dd}/XXX</b> zal <b>0199-ZZZ/31/XXX</b> geven
|
GenericMaskCodes5 = <b>ABC{jj}{mm}-{000000}</b> zal <b>ABC0701-000099</b> geven<br><b>{0000+100}-ZZZ/{dd}/XXX</b> zal <b>0199-ZZZ/31/XXX</b> geven
|
||||||
GenericNumRefModelDesc = Geeft een aanpasbaar nummer volgens een gedefinieerd masker.
|
GenericNumRefModelDesc = Geeft een aanpasbaar nummer volgens een gedefinieerd masker.
|
||||||
ServerAvailableOnIPOrPort = Server is beschikbaar op het IP-adres <b>%s</b> met poort <b>%s</b>
|
ServerAvailableOnIPOrPort = Server is beschikbaar op het IP-adres <b>%s</b> met poort <b>%s</b>
|
||||||
@ -523,7 +523,7 @@ PermissionAdvanced253 = Creëer / wijzig de rechten van internet / externe gebru
|
|||||||
Permission254 = Verwijderen of uitschakelen van andere gebruikers
|
Permission254 = Verwijderen of uitschakelen van andere gebruikers
|
||||||
Permission255 = Creëren / wijzigen eigen gebruikersgegevens
|
Permission255 = Creëren / wijzigen eigen gebruikersgegevens
|
||||||
Permission256 = Wijzigen eigen wachtwoord
|
Permission256 = Wijzigen eigen wachtwoord
|
||||||
Permission262 = Uitbreiden van de toegang tot iedereen die verbonden is aan de derde partij (niet alleen die welke verband houden met de gebruiker). Niet functioneel voor externe gebruikers (altijd beperkt tot zichzelf).
|
Permission262 = Uitbreiden van de toegang tot iedereen die verbonden is aan de Klant (niet alleen die welke verband houden met de gebruiker). Niet functioneel voor externe gebruikers (altijd beperkt tot zichzelf).
|
||||||
Permission271 = Lees CA
|
Permission271 = Lees CA
|
||||||
Permission272 = Facturen inzien
|
Permission272 = Facturen inzien
|
||||||
Permission273 = Facturen uitgeven
|
Permission273 = Facturen uitgeven
|
||||||
@ -827,7 +827,7 @@ UserMailRequired = E-mail verplicht om een nieuwe gebruiker creëren
|
|||||||
CompanySetup = Derde partijenmoduleinstellingen
|
CompanySetup = Derde partijenmoduleinstellingen
|
||||||
CompanyCodeChecker = Module voor de generatie en toetsing van codes voor derde partijen (afnemer of leverancier)
|
CompanyCodeChecker = Module voor de generatie en toetsing van codes voor derde partijen (afnemer of leverancier)
|
||||||
AccountCodeManager = Module voor de generatie van boekhoudkundige codes (afnemer of leverancier)
|
AccountCodeManager = Module voor de generatie van boekhoudkundige codes (afnemer of leverancier)
|
||||||
ModuleCompanyCodeAquarium = Geef een boekhoudkundige code terug opgebouwd uit "401", gevolgd door de de leverancierscode(Wanneer het een leverancier betreft) of een afnemerscode van de derde partij (Wanneer het een afnemer betreft).
|
ModuleCompanyCodeAquarium = Geef een boekhoudkundige code terug opgebouwd uit "401", gevolgd door de de leverancierscode(Wanneer het een leverancier betreft) of een afnemerscode van de Klant (Wanneer het een afnemer betreft).
|
||||||
ModuleCompanyCodePanicum = Geef een lege boekhoudkundige code terug.
|
ModuleCompanyCodePanicum = Geef een lege boekhoudkundige code terug.
|
||||||
ModuleCompanyCodeDigitaria = Boekhoudkundige-code is afhankelijk van derden code. De code bestaat uit het teken "C" in de eerste positie, gevolgd door de eerste 5 tekens van de derden code.
|
ModuleCompanyCodeDigitaria = Boekhoudkundige-code is afhankelijk van derden code. De code bestaat uit het teken "C" in de eerste positie, gevolgd door de eerste 5 tekens van de derden code.
|
||||||
UseNotifications = Gebruik kennisgevingen
|
UseNotifications = Gebruik kennisgevingen
|
||||||
@ -1191,7 +1191,7 @@ ClickToDialDesc = Deze module maakt het mogelijk om een icoontje te tonen achter
|
|||||||
##### Point Of Sales (CashDesk) ##### =
|
##### Point Of Sales (CashDesk) ##### =
|
||||||
CashDesk = Verkooppunten
|
CashDesk = Verkooppunten
|
||||||
CashDeskSetup = Verkooppuntenmoduleinstellingen
|
CashDeskSetup = Verkooppuntenmoduleinstellingen
|
||||||
CashDeskThirdPartyForSell = Algemene derde partij te gebruiken bij verkopen
|
CashDeskThirdPartyForSell = Algemene Klant te gebruiken bij verkopen
|
||||||
CashDeskBankAccountForSell = Te gebruiken rekening voor ontvangst van contacte betalingen
|
CashDeskBankAccountForSell = Te gebruiken rekening voor ontvangst van contacte betalingen
|
||||||
CashDeskBankAccountForCheque = Te gebruiken rekening voor ontvangst van betalingen per cheque
|
CashDeskBankAccountForCheque = Te gebruiken rekening voor ontvangst van betalingen per cheque
|
||||||
CashDeskBankAccountForCB = Te gebruiken rekening voor ontvangst van betalingen per CreditCard
|
CashDeskBankAccountForCB = Te gebruiken rekening voor ontvangst van betalingen per CreditCard
|
||||||
|
|||||||
@ -46,9 +46,9 @@ WasAddedSuccessfully = <b>%s</b> is succesvol toegevoegd.
|
|||||||
ObjectAlreadyLinkedToCategory = Element is al gekoppeld aan deze categorie.
|
ObjectAlreadyLinkedToCategory = Element is al gekoppeld aan deze categorie.
|
||||||
CategorySuccessfullyCreated = De categorie %s is met succes toegevoegd.
|
CategorySuccessfullyCreated = De categorie %s is met succes toegevoegd.
|
||||||
ProductIsInCategories = Product / dienst is eigenaar van de volgende categorieën
|
ProductIsInCategories = Product / dienst is eigenaar van de volgende categorieën
|
||||||
SupplierIsInCategories = Derde partij is eigenaar van de volgende leverancierscategorieën
|
SupplierIsInCategories = Klant is eigenaar van de volgende leverancierscategorieën
|
||||||
CompanyIsInCustomersCategories = Deze derde partij is eigenaar van de volgende afnemers- / prospectencategorieën
|
CompanyIsInCustomersCategories = Deze Klant is eigenaar van de volgende afnemers- / prospectencategorieën
|
||||||
CompanyIsInSuppliersCategories = Deze derde partij is eigenaar van de volgende leverancierscategorieën
|
CompanyIsInSuppliersCategories = Deze Klant is eigenaar van de volgende leverancierscategorieën
|
||||||
MemberIsInCategories = Dit lid is eigenaar van de volgende ledencategorieën
|
MemberIsInCategories = Dit lid is eigenaar van de volgende ledencategorieën
|
||||||
ProductHasNoCategory = Dit product / dienst behoort tot geen enkele categorie
|
ProductHasNoCategory = Dit product / dienst behoort tot geen enkele categorie
|
||||||
SupplierHasNoCategory = Deze leverancier behoort tot geen enkele categorie
|
SupplierHasNoCategory = Deze leverancier behoort tot geen enkele categorie
|
||||||
|
|||||||
@ -3,11 +3,11 @@ CHARSET = UTF-8
|
|||||||
ErrorCompanyNameAlreadyExists = De bedrijfsnaam %s bestaat al. kies een andere.
|
ErrorCompanyNameAlreadyExists = De bedrijfsnaam %s bestaat al. kies een andere.
|
||||||
ErrorPrefixAlreadyExists = De prefix %s bestaat al. kies een andere.
|
ErrorPrefixAlreadyExists = De prefix %s bestaat al. kies een andere.
|
||||||
ErrorSetACountryFirst = Stel eerst het land in
|
ErrorSetACountryFirst = Stel eerst het land in
|
||||||
DeleteThirdParty = Verwijder een derde partij
|
DeleteThirdParty = Verwijder een Klant
|
||||||
ConfirmDeleteCompany = Weet u zeker dat u dit bedrijf en alle geërfde gegevens wilt verwijderen?
|
ConfirmDeleteCompany = Weet u zeker dat u dit bedrijf en alle geërfde gegevens wilt verwijderen?
|
||||||
DeleteContact = Contactpersoon verwijderen
|
DeleteContact = Contactpersoon verwijderen
|
||||||
ConfirmDeleteContact = Weet u zeker dat u deze contactpersoon en alle geërfde gegevens wilt verwijderen ?
|
ConfirmDeleteContact = Weet u zeker dat u deze contactpersoon en alle geërfde gegevens wilt verwijderen ?
|
||||||
MenuNewThirdParty = Nieuwe derde partij
|
MenuNewThirdParty = Nieuwe Klant
|
||||||
MenuNewCompany = Nieuwe onderneming
|
MenuNewCompany = Nieuwe onderneming
|
||||||
MenuNewCustomer = Nieuwe afnemer
|
MenuNewCustomer = Nieuwe afnemer
|
||||||
MenuNewProspect = Nieuw prospect
|
MenuNewProspect = Nieuw prospect
|
||||||
@ -15,33 +15,33 @@ MenuNewSupplier = Nieuwe leverancier
|
|||||||
MenuNewPrivateIndividual = Nieuwe particulier
|
MenuNewPrivateIndividual = Nieuwe particulier
|
||||||
MenuSocGroup = Groepen
|
MenuSocGroup = Groepen
|
||||||
NewCompany = Nieuwe bedrijf (prospect, afnemer, leverancier)
|
NewCompany = Nieuwe bedrijf (prospect, afnemer, leverancier)
|
||||||
NewThirdParty = Nieuwe derde partij (prospect, afnemer, leverancier)
|
NewThirdParty = Nieuwe Klant (prospect, afnemer, leverancier)
|
||||||
NewSocGroup = Nieuwe bedrijfsgroep
|
NewSocGroup = Nieuwe bedrijfsgroep
|
||||||
NewPrivateIndividual = Nieuwe particulier (prospect, afnemer, leverancier)
|
NewPrivateIndividual = Nieuwe particulier (prospect, afnemer, leverancier)
|
||||||
ProspectionArea = Prospectenoverzicht
|
ProspectionArea = Prospectenoverzicht
|
||||||
SocGroup = Bedrijfsgroep
|
SocGroup = Bedrijfsgroep
|
||||||
IdThirdParty = ID derde partij
|
IdThirdParty = ID Klant
|
||||||
IdCompany = ID bedrijf
|
IdCompany = ID bedrijf
|
||||||
IdContact = ID contactpersoon
|
IdContact = ID contactpersoon
|
||||||
Contacts = Contactpersonen
|
Contacts = Contactpersonen
|
||||||
ContactsAddresses = Contacpersonen / adressen
|
ContactsAddresses = Contacpersonen / adressen
|
||||||
ThirdPartyContacts = Contacten van derde partij
|
ThirdPartyContacts = Contacten van Klant
|
||||||
ThirdPartyContact = Contactpersoon van derde partij
|
ThirdPartyContact = Contactpersoon van Klant
|
||||||
StatusContactValidated = Status van contactpersoon
|
StatusContactValidated = Status van contactpersoon
|
||||||
CustomerContact = Afnemerscontactpersoon
|
CustomerContact = Afnemerscontactpersoon
|
||||||
Company = Bedrijf
|
Company = Bedrijf
|
||||||
CompanyName = Bedrijfsnaam
|
CompanyName = Bedrijfsnaam
|
||||||
Companies = Bedrijven
|
Companies = Bedrijven
|
||||||
CountryIsInEEC = Lidstaat van de Europese Unie
|
CountryIsInEEC = Lidstaat van de Europese Unie
|
||||||
ThirdPartyName = Naam van derde partij
|
ThirdPartyName = Naam van Klant
|
||||||
ThirdParty = Derde partij
|
ThirdParty = Klant
|
||||||
ThirdParties = Derde partij
|
ThirdParties = Klant
|
||||||
ThirdPartyAll = Derde partijen (alle)
|
ThirdPartyAll = Klanten (alle)
|
||||||
ThirdPartyProspects = Prospecten
|
ThirdPartyProspects = Prospecten
|
||||||
ThirdPartyCustomers = Afnemers
|
ThirdPartyCustomers = Afnemers
|
||||||
ThirdPartyCustomersWithIdProf12 = Afnemers met %s of %s
|
ThirdPartyCustomersWithIdProf12 = Afnemers met %s of %s
|
||||||
ThirdPartySuppliers = Leveranciers
|
ThirdPartySuppliers = Leveranciers
|
||||||
ThirdPartyType = Type derde partij
|
ThirdPartyType = Type Klant
|
||||||
Company/Fundation = Bedrijf / stichting
|
Company/Fundation = Bedrijf / stichting
|
||||||
Individual = Particulier
|
Individual = Particulier
|
||||||
ToCreateContactWithSameName = Maakt automatisch een contactpersoon met dezelfde informatie
|
ToCreateContactWithSameName = Maakt automatisch een contactpersoon met dezelfde informatie
|
||||||
@ -173,10 +173,10 @@ Supplier = Leverancier
|
|||||||
CompanyList = Bedrijvenoverzicht
|
CompanyList = Bedrijvenoverzicht
|
||||||
AddContact = Contactpersoon toevoegen
|
AddContact = Contactpersoon toevoegen
|
||||||
Contact = Contactpersoon
|
Contact = Contactpersoon
|
||||||
NoContactDefined = Geen contactpersoon ingesteld voor deze derde partij
|
NoContactDefined = Geen contactpersoon ingesteld voor deze Klant
|
||||||
DefaultContact = Standaard contactpersoon
|
DefaultContact = Standaard contactpersoon
|
||||||
AddCompany = Bedrijf toevoegen
|
AddCompany = Bedrijf toevoegen
|
||||||
AddThirdParty = Derde partij toevoegen
|
AddThirdParty = Klant toevoegen
|
||||||
DeleteACompany = Bedrijf verwijderen
|
DeleteACompany = Bedrijf verwijderen
|
||||||
PersonalInformations = Persoonlijke gegevens
|
PersonalInformations = Persoonlijke gegevens
|
||||||
AccountancyCode = Boekhoudkundige code
|
AccountancyCode = Boekhoudkundige code
|
||||||
@ -186,8 +186,8 @@ CustomerAccount = Afnemersrekening
|
|||||||
SupplierAccount = Leveranciersrekening
|
SupplierAccount = Leveranciersrekening
|
||||||
CustomerCodeDesc = Afnemerscode, uniek voor alle afnemers
|
CustomerCodeDesc = Afnemerscode, uniek voor alle afnemers
|
||||||
SupplierCodeDesc = Leverancierscode, uniek voor alle leveranciers
|
SupplierCodeDesc = Leverancierscode, uniek voor alle leveranciers
|
||||||
RequiredIfCustomer = Vereist als derde partij een afnemer of prospect is
|
RequiredIfCustomer = Vereist als Klant een afnemer of prospect is
|
||||||
RequiredIfSupplier = Vereist als derde partij een leverancier is
|
RequiredIfSupplier = Vereist als Klant een leverancier is
|
||||||
ValidityControledByModule = Geldigheid gecontroleerd door module
|
ValidityControledByModule = Geldigheid gecontroleerd door module
|
||||||
ThisIsModuleRules = Dit zijn de regels voor deze module
|
ThisIsModuleRules = Dit zijn de regels voor deze module
|
||||||
LastProspect = Laatste prospect
|
LastProspect = Laatste prospect
|
||||||
@ -234,7 +234,7 @@ ProspectLevel = Prospectpotentieel
|
|||||||
ContactPrivate = Privé
|
ContactPrivate = Privé
|
||||||
ContactPublic = Gedeeld
|
ContactPublic = Gedeeld
|
||||||
ContactVisibility = Zichtbaarheid
|
ContactVisibility = Zichtbaarheid
|
||||||
OthersNotLinkedToThirdParty = Anderen, niet gebonden aan een derde partij
|
OthersNotLinkedToThirdParty = Anderen, niet gebonden aan een Klant
|
||||||
ProspectStatus = Prospectstatus
|
ProspectStatus = Prospectstatus
|
||||||
PL_NONE = Geen
|
PL_NONE = Geen
|
||||||
PL_UNKNOWN = Onbekend
|
PL_UNKNOWN = Onbekend
|
||||||
@ -269,7 +269,7 @@ NoRIB = Geen bank ingesteld
|
|||||||
NoParentCompany = Geen
|
NoParentCompany = Geen
|
||||||
ExportImport = Import - Export
|
ExportImport = Import - Export
|
||||||
ExportCardToFormat = Export details naar formaat
|
ExportCardToFormat = Export details naar formaat
|
||||||
ContactNotLinkedToCompany = Contact niet gekoppeld aan enige derde partij
|
ContactNotLinkedToCompany = Contact niet gekoppeld aan enige Klant
|
||||||
DolibarrLogin = Dolibarr login
|
DolibarrLogin = Dolibarr login
|
||||||
NoDolibarrAccess = Geen Dolibarr toegang
|
NoDolibarrAccess = Geen Dolibarr toegang
|
||||||
ExportDataset_company_1 = Bedrijven / instellingen en eigenschappen
|
ExportDataset_company_1 = Bedrijven / instellingen en eigenschappen
|
||||||
@ -292,12 +292,12 @@ DeleteFile = Bestand verwijderen
|
|||||||
ConfirmDeleteFile = Weet u zeker dat u dit bestand wilt verwijderen?
|
ConfirmDeleteFile = Weet u zeker dat u dit bestand wilt verwijderen?
|
||||||
AllocateCommercial = Toewijzing
|
AllocateCommercial = Toewijzing
|
||||||
SelectCountry = Selecteer een land
|
SelectCountry = Selecteer een land
|
||||||
SelectCompany = Selecteer een derde partij
|
SelectCompany = Selecteer een Klant
|
||||||
Organization = Organisatie
|
Organization = Organisatie
|
||||||
AutomaticallyGenerated = Automatisch gegenereerd
|
AutomaticallyGenerated = Automatisch gegenereerd
|
||||||
FiscalYearInformation = Informatie over het fiscale jaar
|
FiscalYearInformation = Informatie over het fiscale jaar
|
||||||
FiscalMonthStart = Startmaand van het fiscale jaar
|
FiscalMonthStart = Startmaand van het fiscale jaar
|
||||||
YouMustCreateContactFirst = U dient voor de derde partij eerst contactpersonen met een e-mailadres instellen, voordat u kennisgevingen per e-mail kunt sturen.
|
YouMustCreateContactFirst = U dient voor de Klant eerst contactpersonen met een e-mailadres instellen, voordat u kennisgevingen per e-mail kunt sturen.
|
||||||
ListSuppliersShort = Leveranciersoverzicht
|
ListSuppliersShort = Leveranciersoverzicht
|
||||||
ListProspectsShort = Prospectenoverzicht
|
ListProspectsShort = Prospectenoverzicht
|
||||||
ListCustomersShort = Afnemersoverzicht
|
ListCustomersShort = Afnemersoverzicht
|
||||||
|
|||||||
@ -74,7 +74,7 @@ OtherPropals = Andere offertes
|
|||||||
CopyPropalFrom = Maak offerte door het kopiëren van een bestaande offerte
|
CopyPropalFrom = Maak offerte door het kopiëren van een bestaande offerte
|
||||||
CreateEmptyPropal = Creëer een lege offerte of uit de lijst van producten / diensten
|
CreateEmptyPropal = Creëer een lege offerte of uit de lijst van producten / diensten
|
||||||
DefaultProposalDurationValidity = Standaardgeldigheid offerte (in dagen)
|
DefaultProposalDurationValidity = Standaardgeldigheid offerte (in dagen)
|
||||||
UseCustomerContactAsPropalRecipientIfExist = Gebruik, indien ingesteld, het afnemerscontactadres als offerteontvangstadres in plaats van het adres van de derde partij
|
UseCustomerContactAsPropalRecipientIfExist = Gebruik, indien ingesteld, het afnemerscontactadres als offerteontvangstadres in plaats van het adres van de Klant
|
||||||
ClonePropal = Kloon offerte
|
ClonePropal = Kloon offerte
|
||||||
ConfirmClonePropal = Weet u zeker dat u deze offerte <b>%s</b> wilt klonen?
|
ConfirmClonePropal = Weet u zeker dat u deze offerte <b>%s</b> wilt klonen?
|
||||||
ProposalsAndProposalsLines = Offertes en offerteregels
|
ProposalsAndProposalsLines = Offertes en offerteregels
|
||||||
|
|||||||
@ -1002,7 +1002,7 @@ class Product extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$price = price2num($newprice,'MU');
|
$price = price2num($newprice,'MU');
|
||||||
$price_ttc = price2num($newprice) * (1 + ($newvat / 100));
|
$price_ttc = ( $newnpr != 1 ) ? price2num($newprice) * (1 + ($newvat / 100)) : $price;
|
||||||
$price_ttc = price2num($price_ttc,'MU');
|
$price_ttc = price2num($price_ttc,'MU');
|
||||||
|
|
||||||
if ($newminprice!='' || $newminprice==0)
|
if ($newminprice!='' || $newminprice==0)
|
||||||
|
|||||||
@ -95,7 +95,9 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
|
if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
|
||||||
$quantity=GETPOST("qty");
|
$quantity=GETPOST("qty");
|
||||||
$remise_percent=price2num(GETPOST('remise_percent','alpha'));
|
$remise_percent=price2num(GETPOST('remise_percent','alpha'));
|
||||||
$tva_tx=price2num(GETPOST('tva_tx','alpha'));
|
$npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0 ;
|
||||||
|
$tva_tx = str_replace('*','', GETPOST('tva_tx','alpha'));
|
||||||
|
$tva_tx = price2num($tva_tx);
|
||||||
|
|
||||||
if (empty($quantity))
|
if (empty($quantity))
|
||||||
{
|
{
|
||||||
@ -156,7 +158,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
if (isset($_POST['ref_fourn_price_id']))
|
if (isset($_POST['ref_fourn_price_id']))
|
||||||
$product->fetch_product_fournisseur_price($_POST['ref_fourn_price_id']);
|
$product->fetch_product_fournisseur_price($_POST['ref_fourn_price_id']);
|
||||||
|
|
||||||
$ret=$product->update_buyprice($quantity, $_POST["price"], $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent);
|
$ret=$product->update_buyprice($quantity, $_POST["price"], $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, $npr);
|
||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
@ -527,4 +529,4 @@ else
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -202,14 +202,14 @@ $sql.= $where;
|
|||||||
if ($month > 0) {
|
if ($month > 0) {
|
||||||
if ($year > 0) {
|
if ($year > 0) {
|
||||||
$start = dol_mktime(0, 0, 0, $month, 1, $year);
|
$start = dol_mktime(0, 0, 0, $month, 1, $year);
|
||||||
$end = dol_time_plus_duree($start, 1 , 'm') - 1;
|
$end = dol_time_plus_duree($start,1,'m') - 1;
|
||||||
$sql.= " AND ".$datePrint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
$sql.= " AND ".$datePrint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
||||||
} else {
|
} else {
|
||||||
$sql.= " AND date_format(".$datePrint.", '%m') = '".sprintf('%02d',$month)."'";
|
$sql.= " AND date_format(".$datePrint.", '%m') = '".sprintf('%02d',$month)."'";
|
||||||
}
|
}
|
||||||
} else if ($year > 0) {
|
} else if ($year > 0) {
|
||||||
$start = dol_mktime(0, 0, 0, 1, 1, $year);
|
$start = dol_mktime(0, 0, 0, 1, 1, $year);
|
||||||
$end = dol_time_plus_duree($start, 1 , 'y') - 1;
|
$end = dol_time_plus_duree($start,1,'y') - 1;
|
||||||
$sql.= " AND ".$datePrint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
$sql.= " AND ".$datePrint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
||||||
}
|
}
|
||||||
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$sref."%'";
|
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$sref."%'";
|
||||||
|
|||||||
@ -48,7 +48,12 @@ print $langs->trans("HelpCenterDesc2")."<br>\n";
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print $langs->trans("ToGoBackToDolibarr",DOL_URL_ROOT.'/');
|
$homeurl=DOL_URL_ROOT.'/';
|
||||||
|
if (GETPOST('dol_hide_toptmenu')) $homeurl.=(strpos($homeurl,'?')===false?'?':'&').'dol_hide_toptmenu=1';
|
||||||
|
if (GETPOST('dol_hide_leftmenu')) $homeurl.=(strpos($homeurl,'?')===false?'?':'&').'dol_hide_leftmenu=1';
|
||||||
|
if (GETPOST('dol_no_mouse_hover')) $homeurl.=(strpos($homeurl,'?')===false?'?':'&').'dol_no_mouse_hover=1';
|
||||||
|
if (GETPOST('dol_use_jmobile')) $homeurl.=(strpos($homeurl,'?')===false?'?':'&').'dol_use_jmobile=1';
|
||||||
|
print $langs->trans("ToGoBackToDolibarr",$homeurl);
|
||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
@ -56,8 +61,7 @@ $style1='color: #333344; font-size: 16px; font-weight: bold';
|
|||||||
$style2='color: #5D4455; font-weight: bold;';
|
$style2='color: #5D4455; font-weight: bold;';
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<table border="0" style="spacing: 4px; padding: 0px" width="100%">';
|
print '<div style="width: 100%"><div class="inline-block">';
|
||||||
print '<tr><td width="50%" valign="top">';
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
// Forum/wiki support
|
// Forum/wiki support
|
||||||
@ -73,12 +77,12 @@ print '<br>'.$langs->trans("TypeOfHelp").'/'.$langs->trans("Efficiency").'/'.$la
|
|||||||
print $langs->trans("TypeHelpDev").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1);
|
print $langs->trans("TypeHelpDev").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1);
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="center" valign="top">';
|
print '<td align="center" valign="top">';
|
||||||
|
|
||||||
print '<table class="nocellnopadd">';
|
print '<table class="nocellnopadd">';
|
||||||
/*print '<tr><td align="center" valign="top">';
|
/*print '<tr><td align="center" valign="top">';
|
||||||
print img_picto_common('','who.png','',1);
|
print img_picto_common('','who.png','',1);
|
||||||
@ -99,8 +103,7 @@ print '</table>'."\n";
|
|||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
|
||||||
print '</td><td width="50%" valign="top">'."\n";
|
print '</div><div class="inline-block">';
|
||||||
print "\n";
|
|
||||||
|
|
||||||
|
|
||||||
// Online support
|
// Online support
|
||||||
@ -134,9 +137,10 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr><td width="50%" valign="top">'."\n";
|
|
||||||
print "\n";
|
print '</div><div class="inline-block">';
|
||||||
|
|
||||||
|
|
||||||
// EMail support
|
// EMail support
|
||||||
print '<table class="login" width="100%">';
|
print '<table class="login" width="100%">';
|
||||||
@ -170,8 +174,9 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
print '</td><td width="50%" valign="top">'."\n";
|
|
||||||
print "\n";
|
print '</div><div class="inline-block">';
|
||||||
|
|
||||||
|
|
||||||
// Other support
|
// Other support
|
||||||
print '<table class="login" width="100%">';
|
print '<table class="login" width="100%">';
|
||||||
@ -207,9 +212,10 @@ print '</tr>';
|
|||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
print '<div style="clear: both"></div>';
|
||||||
print '</table>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
pFooter();
|
pFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -2090,11 +2090,15 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update user using data from the LDAP
|
* Update user using data from the LDAP
|
||||||
* // TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?)
|
*
|
||||||
|
* @param ldapuser &$ldapuser Ladp User
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update_ldap2dolibarr(&$ldapuser)
|
function update_ldap2dolibarr(&$ldapuser)
|
||||||
{
|
{
|
||||||
|
// TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?)
|
||||||
global $user, $conf;
|
global $user, $conf;
|
||||||
|
|
||||||
$this->firstname=$ldapuser->{$conf->global->LDAP_FIELD_FIRSTNAME};
|
$this->firstname=$ldapuser->{$conf->global->LDAP_FIELD_FIRSTNAME};
|
||||||
|
|||||||
@ -55,6 +55,13 @@ $conf->entity = (GETPOST('entity') ? GETPOST('entity') : 1);
|
|||||||
$hookmanager->initHooks(array('passwordforgottenpage'));
|
$hookmanager->initHooks(array('passwordforgottenpage'));
|
||||||
|
|
||||||
|
|
||||||
|
if (GETPOST('dol_hide_leftmenu') || ! empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu=1;
|
||||||
|
if (GETPOST('dol_hide_topmenu') || ! empty($_SESSION['dol_hide_topmenu'])) $conf->dol_hide_topmenu=1;
|
||||||
|
if (GETPOST('dol_optimize_smallscreen') || ! empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen=1;
|
||||||
|
if (GETPOST('dol_no_mouse_hover') || ! empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover=1;
|
||||||
|
if (GETPOST('dol_use_jmobile') || ! empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile=1;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user