forked from Wavyzz/dolibarr
Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -54,8 +54,10 @@ For users:
|
|||||||
suppliers invoice, orders, customers orders, proposals and social contributions.
|
suppliers invoice, orders, customers orders, proposals and social contributions.
|
||||||
- New: All professional id can contains up to 128 chars instead of 32.
|
- New: All professional id can contains up to 128 chars instead of 32.
|
||||||
- New: [ task #176 ] Allow to use ODT templates for proposals and orders like it's done for invoices
|
- New: [ task #176 ] Allow to use ODT templates for proposals and orders like it's done for invoices
|
||||||
|
- New: Add hidden option MAIN_ADD_PDF_BACKGROUND to add a PDF as background of invoice/order generated PDF.
|
||||||
- Fix: Can use POS module with several concurrent users.
|
- Fix: Can use POS module with several concurrent users.
|
||||||
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
||||||
|
- Fix: Sanitize input parameters.
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
- New: Can add a left menu into an existing top menu or left menu.
|
- New: Can add a left menu into an existing top menu or left menu.
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $langs->load("members");
|
|||||||
|
|
||||||
$mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
|
$mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
|
||||||
|
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
if (! $user->rights->adherent->lire) accessforbidden();
|
||||||
|
|||||||
@@ -141,10 +141,10 @@ if ($action == 'setsocid')
|
|||||||
$error=0;
|
$error=0;
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if (GETPOST("socid") != $adh->fk_soc) // If link differs from currently in database
|
if (GETPOST('socid','int') != $adh->fk_soc) // If link differs from currently in database
|
||||||
{
|
{
|
||||||
$sql ="SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
$sql ="SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
||||||
$sql.=" WHERE fk_soc = '".GETPOST("socid")."'";
|
$sql.=" WHERE fk_soc = '".GETPOST('socid','int')."'";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -154,7 +154,7 @@ if ($action == 'setsocid')
|
|||||||
$othermember=new Adherent($db);
|
$othermember=new Adherent($db);
|
||||||
$othermember->fetch($obj->rowid);
|
$othermember->fetch($obj->rowid);
|
||||||
$thirdparty=new Societe($db);
|
$thirdparty=new Societe($db);
|
||||||
$thirdparty->fetch(GETPOST("socid"));
|
$thirdparty->fetch(GETPOST('socid','int'));
|
||||||
$error++;
|
$error++;
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ if ($action == 'setsocid')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result=$adh->setThirdPartyId(GETPOST("socid"));
|
$result=$adh->setThirdPartyId(GETPOST('socid','int'));
|
||||||
if ($result < 0) dol_print_error($adh->db,$adh->error);
|
if ($result < 0) dol_print_error($adh->db,$adh->error);
|
||||||
$_POST['action']='';
|
$_POST['action']='';
|
||||||
$action='';
|
$action='';
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $langs->load('other');
|
|||||||
$mesg = "";
|
$mesg = "";
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$id = $user->societe_id;
|
$id = $user->societe_id;
|
||||||
|
|||||||
@@ -782,7 +782,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(GETPOST('options_'.$key,'alpha')?GETPOST('options_'.$key,'alpha'):$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td>';
|
print '<tr><td>'.$label.'</td><td>';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $langs->load("members");
|
|||||||
$langs->load("ldap");
|
$langs->load("ldap");
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
$rowid = GETPOST("id");
|
$rowid = GETPOST('id','int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
|
|
||||||
// Protection
|
// Protection
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php');
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
$id=GETPOST("id");
|
$id=GETPOST('id','int');
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
|
|||||||
$WIDTH=500;
|
$WIDTH=500;
|
||||||
$HEIGHT=200;
|
$HEIGHT=200;
|
||||||
|
|
||||||
$userid=GETPOST('userid'); if ($userid < 0) $userid=0;
|
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||||
$socid=GETPOST('socid'); if ($socid < 0) $socid=0;
|
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ complete_dictionnary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort
|
|||||||
// Define elementList and sourceList (used for dictionnary "type of contacts")
|
// Define elementList and sourceList (used for dictionnary "type of contacts")
|
||||||
$elementList = array();
|
$elementList = array();
|
||||||
$sourceList=array();
|
$sourceList=array();
|
||||||
if (GETPOST("id") == 11)
|
if (GETPOST('id','int') == 11)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
@@ -702,7 +702,7 @@ if ($_GET["id"])
|
|||||||
if ($num > $listlimit)
|
if ($num > $listlimit)
|
||||||
{
|
{
|
||||||
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
|
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
|
||||||
print_fleche_navigation($page,$_SERVER["PHP_SELF"],'&id='.GETPOST('id'),($num > $listlimit),$langs->trans("Page").' '.($page+1));
|
print_fleche_navigation($page,$_SERVER["PHP_SELF"],'&id='.GETPOST('id','int'),($num > $listlimit),$langs->trans("Page").' '.($page+1));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,10 +737,10 @@ if ($_GET["id"])
|
|||||||
// Affiche nom du champ
|
// Affiche nom du champ
|
||||||
if ($showfield)
|
if ($showfield)
|
||||||
{
|
{
|
||||||
print_liste_field_titre($valuetoshow,"dict.php",$fieldlist[$field],($page?'page='.$page.'&':'').'&id='.GETPOST("id"),"","",$sortfield,$sortorder);
|
print_liste_field_titre($valuetoshow,"dict.php",$fieldlist[$field],($page?'page='.$page.'&':'').'&id='.GETPOST('id','int'),"","",$sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_liste_field_titre($langs->trans("Status"),"dict.php","active",($page?'page='.$page.'&':'').'&id='.GETPOST("id"),"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),"dict.php","active",($page?'page='.$page.'&':'').'&id='.GETPOST('id','int'),"",'align="center"',$sortfield,$sortorder);
|
||||||
print '<td colspan="2" class="liste_titre"> </td>';
|
print '<td colspan="2" class="liste_titre"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -756,7 +756,7 @@ if ($_GET["id"])
|
|||||||
{
|
{
|
||||||
print '<form action="dict.php" method="post">';
|
print '<form action="dict.php" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="id" value="'.GETPOST("id").'">';
|
print '<input type="hidden" name="id" value="'.GETPOST('id','int').'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$_GET["rowid"].'">';
|
print '<input type="hidden" name="rowid" value="'.$_GET["rowid"].'">';
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ if (GETPOST("action") == 'set')
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if (GETPOST("socid") < 0) $_POST["socid"]='';
|
if (GETPOST('socid','int') < 0) $_POST["socid"]='';
|
||||||
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
||||||
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
||||||
|
|
||||||
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",GETPOST("socid"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",GETPOST('socid','int'),'chaine',0,'',$conf->entity);
|
||||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",GETPOST("CASHDESK_ID_BANKACCOUNT_CASH"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",GETPOST("CASHDESK_ID_BANKACCOUNT_CASH"),'chaine',0,'',$conf->entity);
|
||||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE"),'chaine',0,'',$conf->entity);
|
||||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",GETPOST("CASHDESK_ID_BANKACCOUNT_CB"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",GETPOST("CASHDESK_ID_BANKACCOUNT_CB"),'chaine',0,'',$conf->entity);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ print '<td>';
|
|||||||
$disabled=0;
|
$disabled=0;
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice
|
if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice
|
||||||
print $form->select_company(GETPOST('socid')?GETPOST('socid'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1);
|
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1);
|
||||||
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ $langs->load("cashdesk");
|
|||||||
|
|
||||||
$username = GETPOST("txtUsername");
|
$username = GETPOST("txtUsername");
|
||||||
$password = GETPOST("pwdPassword");
|
$password = GETPOST("pwdPassword");
|
||||||
$thirdpartyid = (GETPOST("socid")!='')?GETPOST("socid"):$conf->global->CASHDESK_ID_THIRDPARTY;
|
$thirdpartyid = (GETPOST('socid','int')!='')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY;
|
||||||
$warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global->CASHDESK_ID_WAREHOUSE;
|
$warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global->CASHDESK_ID_WAREHOUSE;
|
||||||
|
|
||||||
// Check username
|
// Check username
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ include_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php');
|
|||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
|
|
||||||
$facid=GETPOST('facid');
|
$facid=GETPOST('facid','int');
|
||||||
$object=new Facture($db);
|
$object=new Facture($db);
|
||||||
$object->fetch($facid);
|
$object->fetch($facid);
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$mesg = GETPOST('mesg');
|
$mesg = GETPOST('mesg');
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ require("../main.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php");
|
||||||
|
|
||||||
|
|
||||||
$id=GETPOST('id');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ $langs->load("categories");
|
|||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=GETPOST('socid');
|
$socid=GETPOST('socid','int');
|
||||||
if (!$user->rights->categorie->lire) accessforbidden();
|
if (!$user->rights->categorie->lire) accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load("bills");
|
|||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
$id=GETPOST('id');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/categories.lib.php");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
$id=GETPOST('id');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $langs->load("other");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
if (isset($_GET["error"])) $error=$_GET["error"];
|
if (isset($_GET["error"])) $error=$_GET["error"];
|
||||||
$objectid = GETPOST("id");
|
$objectid = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
|
|||||||
@@ -153,10 +153,10 @@ if ($action == 'add_action')
|
|||||||
|
|
||||||
$actioncomm->note = trim($_POST["note"]);
|
$actioncomm->note = trim($_POST["note"]);
|
||||||
if (isset($_POST["contactid"])) $actioncomm->contact = $contact;
|
if (isset($_POST["contactid"])) $actioncomm->contact = $contact;
|
||||||
if (GETPOST("socid") > 0)
|
if (GETPOST('socid','int') > 0)
|
||||||
{
|
{
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
$societe->fetch(GETPOST("socid"));
|
$societe->fetch(GETPOST('socid','int'));
|
||||||
$actioncomm->societe = $societe;
|
$actioncomm->societe = $societe;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -508,12 +508,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Societe, contact
|
// Societe, contact
|
||||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionOnCompany").'</td><td>';
|
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionOnCompany").'</td><td>';
|
||||||
if (GETPOST("socid") > 0)
|
if (GETPOST('socid','int') > 0)
|
||||||
{
|
{
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
$societe->fetch(GETPOST("socid"));
|
$societe->fetch(GETPOST('socid','int'));
|
||||||
print $societe->getNomUrl(1);
|
print $societe->getNomUrl(1);
|
||||||
print '<input type="hidden" name="socid" value="'.GETPOST("socid").'">';
|
print '<input type="hidden" name="socid" value="'.GETPOST('socid','int').'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -522,10 +522,10 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// If company is forced, we propose contacts (may be contact is also forced)
|
// If company is forced, we propose contacts (may be contact is also forced)
|
||||||
if (GETPOST("contactid") > 0 || GETPOST("socid") > 0)
|
if (GETPOST("contactid") > 0 || GETPOST('socid','int') > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
|
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||||
$form->select_contacts(GETPOST("socid"),GETPOST('contactid'),'contactid',1);
|
$form->select_contacts(GETPOST('socid','int'),GETPOST('contactid'),'contactid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if (! $sortorder) $sortorder="DESC";
|
|||||||
if (! $sortfield) $sortfield="a.datep";
|
if (! $sortfield) $sortfield="a.datep";
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'agenda', $socid, '', 'myactions');
|
$result = restrictedArea($user, 'agenda', $socid, '', 'myactions');
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ $langs->load("commercial");
|
|||||||
if ($_GET["action"] == 'builddoc')
|
if ($_GET["action"] == 'builddoc')
|
||||||
{
|
{
|
||||||
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
|
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
|
||||||
$result=$cat->write_file(GETPOST("id"));
|
$result=$cat->write_file(GETPOST('id','int'));
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$mesg=$cat->error;
|
$mesg=$cat->error;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $offset = $limit * $page ;
|
|||||||
$type=$_GET["type"];
|
$type=$_GET["type"];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe',$socid,'');
|
$result = restrictedArea($user, 'societe',$socid,'');
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if ($conf->notification->enabled) $langs->load("mails");
|
|||||||
if (!empty($conf->global->MAIN_MODULE_CHRONODOCS)) $langs->load("chronodocs");
|
if (!empty($conf->global->MAIN_MODULE_CHRONODOCS)) $langs->load("chronodocs");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id'));
|
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
||||||
if ($user->societe_id > 0) $id=$user->societe_id;
|
if ($user->societe_id > 0) $id=$user->societe_id;
|
||||||
$result = restrictedArea($user,'societe',$id,'&societe');
|
$result = restrictedArea($user,'societe',$id,'&societe');
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("suppliers");
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user,'societe',$socid,'');
|
$result = restrictedArea($user,'societe',$socid,'');
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="email";
|
if (! $sortfield) $sortfield="email";
|
||||||
|
|
||||||
$id=GETPOST('rowid')?GETPOST('rowid'):GETPOST('id');
|
$id=GETPOST('rowid')?GETPOST('rowid'):GETPOST('id','int');
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
$search_nom=GETPOST("search_nom");
|
$search_nom=GETPOST("search_nom");
|
||||||
$search_prenom=GETPOST("search_prenom");
|
$search_prenom=GETPOST("search_prenom");
|
||||||
|
|||||||
@@ -1080,7 +1080,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
//'text' => $langs->trans("ConfirmClone"),
|
//'text' => $langs->trans("ConfirmClone"),
|
||||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
|
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)'))
|
||||||
);
|
);
|
||||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||||
@@ -1352,11 +1352,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
if ($action == 'editdelivery_address')
|
if ($action == 'editdelivery_address')
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'fk_address','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','propal',$object->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'none','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','propal',$object->id);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $langs->load('compta');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'propale', $id, 'propal');
|
$result = restrictedArea($user, 'propale', $id, 'propal');
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load('other');
|
|||||||
|
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/dolgraph.class.php");
|
|||||||
$WIDTH=500;
|
$WIDTH=500;
|
||||||
$HEIGHT=200;
|
$HEIGHT=200;
|
||||||
|
|
||||||
$userid=GETPOST('userid'); if ($userid < 0) $userid=0;
|
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||||
$socid=GETPOST('socid'); if ($socid < 0) $socid=0;
|
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $langs->load('projects');
|
|||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $action=GETPOST('action','alpha');
|
|||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("id");
|
$socid = GETPOST('id','int');
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
@@ -189,7 +189,7 @@ if (GETPOST("action") == 'confirm_remove' && GETPOST("confirm")=='yes')
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
header("Location: ".$_SERVER["PHP_SELF"].'?id='.GETPOST('id')); // To avoid pb whith back
|
header("Location: ".$_SERVER["PHP_SELF"].'?id='.GETPOST('id','int')); // To avoid pb whith back
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $langs->load('sendings');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$id,'');
|
$result=restrictedArea($user,'commande',$id,'');
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ if ($_POST["action"] == 'addcontact' && $user->rights->commande->creer)
|
|||||||
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
|
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
if ($commande->fetch(GETPOST("id")))
|
if ($commande->fetch(GETPOST('id','int')))
|
||||||
{
|
{
|
||||||
$result=$commande->swapContactStatus(GETPOST('ligne'));
|
$result=$commande->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $langs->load('other');
|
|||||||
|
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ $langs->load('propal');
|
|||||||
$langs->load('deliveries');
|
$langs->load('deliveries');
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
|
||||||
$id = (GETPOST("id")?GETPOST("id"):GETPOST("orderid"));
|
$id = (GETPOST('id','int')?GETPOST('id','int'):GETPOST("orderid"));
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$lineid = GETPOST('lineid');
|
$lineid = GETPOST('lineid');
|
||||||
@@ -191,7 +191,7 @@ if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
$datecommande = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
$datecommande = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||||
$datelivraison = dol_mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']);
|
$datelivraison = dol_mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']);
|
||||||
|
|
||||||
$object->socid=GETPOST('socid');
|
$object->socid=GETPOST('socid','int');
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@@ -1652,7 +1652,7 @@ else
|
|||||||
//'text' => $langs->trans("ConfirmClone"),
|
//'text' => $langs->trans("ConfirmClone"),
|
||||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
|
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)'))
|
||||||
);
|
);
|
||||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if (!$user->rights->commande->lire) accessforbidden();
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=GETPOST('socid');
|
$socid=GETPOST('socid','int');
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ $sall=GETPOST('sall');
|
|||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = (GETPOST('orderid')?GETPOST('orderid'):GETPOST('id'));
|
$id = (GETPOST('orderid')?GETPOST('orderid'):GETPOST('id','int'));
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'commande', $id,'');
|
$result = restrictedArea($user, 'commande', $id,'');
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer';
|
|||||||
if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden();
|
if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden();
|
||||||
if ($mode == 'supplier' && ! $user->rights->fournisseur->commande->lire) accessforbidden();
|
if ($mode == 'supplier' && ! $user->rights->fournisseur->commande->lire) accessforbidden();
|
||||||
|
|
||||||
$userid=GETPOST('userid'); if ($userid < 0) $userid=0;
|
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||||
$socid=GETPOST('socid'); if ($socid < 0) $socid=0;
|
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -468,10 +468,10 @@ else
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
if (GETPOST("id") && $action == 'edit' && $user->rights->banque->configurer)
|
if (GETPOST('id','int') && $action == 'edit' && $user->rights->banque->configurer)
|
||||||
{
|
{
|
||||||
$account = new Account($db);
|
$account = new Account($db);
|
||||||
$account->fetch(GETPOST("id"));
|
$account->fetch(GETPOST('id','int'));
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("EditFinancialAccount"));
|
print_fiche_titre($langs->trans("EditFinancialAccount"));
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $langs->load("trips");
|
|||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement', $id,'');
|
$result = restrictedArea($user, 'deplacement', $id,'');
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ if ($action == 'create')
|
|||||||
// Company
|
// Company
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||||
print $form->select_company(GETPOST("socid"),'socid','',1);
|
print $form->select_company(GETPOST('socid','int'),'socid','',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Public note
|
// Public note
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("users");
|
|||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement','','');
|
$result = restrictedArea($user, 'deplacement','','');
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php"
|
|||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement', $id, '');
|
$result = restrictedArea($user, 'deplacement', $id, '');
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("users");
|
|||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement','','');
|
$result = restrictedArea($user, 'deplacement','','');
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ $langs->load("trips");
|
|||||||
$WIDTH=500;
|
$WIDTH=500;
|
||||||
$HEIGHT=200;
|
$HEIGHT=200;
|
||||||
|
|
||||||
$userid=GETPOST('userid'); if ($userid < 0) $userid=0;
|
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||||
$socid=GETPOST('socid'); if ($socid < 0) $socid=0;
|
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||||
// Securite acces client
|
// Securite acces client
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $langs->load("companies");
|
|||||||
$langs->load("donations");
|
$langs->load("donations");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$id=GETPOST('rowid')?GETPOST('rowid'):GETPOST('id');
|
$id=GETPOST('rowid')?GETPOST('rowid'):GETPOST('id','int');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|
||||||
$mesg="";
|
$mesg="";
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ if (GETPOST('mesg','int',1) && isset($_SESSION['message'])) $mesg=$_SESSION['mes
|
|||||||
$sall=trim(GETPOST('sall'));
|
$sall=trim(GETPOST('sall'));
|
||||||
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
||||||
|
|
||||||
$id=(GETPOST('id')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
|
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
@@ -558,7 +558,7 @@ if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->f
|
|||||||
*/
|
*/
|
||||||
if ($action == 'add' && $user->rights->facture->creer)
|
if ($action == 'add' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->socid=GETPOST('socid');
|
$object->socid=GETPOST('socid','int');
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $langs->load("bills");
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("facid");
|
$id = GETPOST('facid','int');
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'facture', $id);
|
$result = restrictedArea($user, 'facture', $id);
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$facid = isset($_GET["facid"])?$_GET["facid"]:'';
|
$facid = GETPOST('facid');
|
||||||
|
$id = GETPOST('facid');
|
||||||
|
$ref= GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
@@ -45,12 +47,11 @@ $result = restrictedArea($user, 'facture', $facid);
|
|||||||
|
|
||||||
if ($_POST["action"] == 'addcontact' && $user->rights->facture->creer)
|
if ($_POST["action"] == 'addcontact' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
|
|
||||||
$result = 0;
|
$result = 0;
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
$result = $facture->fetch($_GET["facid"]);
|
$result = $facture->fetch($facid);
|
||||||
|
|
||||||
if ($result > 0 && $_GET["facid"] > 0)
|
if ($result > 0 && $facid > 0)
|
||||||
{
|
{
|
||||||
$result = $facture->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
|
$result = $facture->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
|
||||||
}
|
}
|
||||||
@@ -78,7 +79,7 @@ if ($_POST["action"] == 'addcontact' && $user->rights->facture->creer)
|
|||||||
if ($_GET["action"] == 'swapstatut' && $user->rights->facture->creer)
|
if ($_GET["action"] == 'swapstatut' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
if ($facture->fetch(GETPOST("facid")))
|
if ($facture->fetch($facid))
|
||||||
{
|
{
|
||||||
$result=$facture->swapContactStatus(GETPOST('ligne'));
|
$result=$facture->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
@@ -92,7 +93,7 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->facture->creer)
|
|||||||
if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer)
|
if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
$facture->fetch($_GET["facid"]);
|
$facture->fetch($facid);
|
||||||
$result = $facture->delete_contact($_GET["lineid"]);
|
$result = $facture->delete_contact($_GET["lineid"]);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@@ -125,8 +126,6 @@ $userstatic=new User($db);
|
|||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
$id = $_GET['facid'];
|
|
||||||
$ref= $_GET['ref'];
|
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ $langs->load("bills");
|
|||||||
|
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$id = GETPOST('facid');
|
$id = GETPOST('facid','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
|||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$facid=GETPOST("facid");
|
$facid=GETPOST('facid','int');
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$objecttype = 'facture_rec';
|
$objecttype = 'facture_rec';
|
||||||
@@ -81,7 +81,7 @@ if ($_POST["action"] == 'add')
|
|||||||
if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
|
if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$facrec = new FactureRec($db);
|
$facrec = new FactureRec($db);
|
||||||
$facrec->fetch(GETPOST("facid"));
|
$facrec->fetch(GETPOST('facid','int'));
|
||||||
$facrec->delete();
|
$facrec->delete();
|
||||||
$facid = 0 ;
|
$facid = 0 ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer';
|
|||||||
if ($mode == 'customer' && ! $user->rights->facture->lire) accessforbidden();
|
if ($mode == 'customer' && ! $user->rights->facture->lire) accessforbidden();
|
||||||
if ($mode == 'supplier' && ! $user->rights->fournisseur->facture->lire) accessforbidden();
|
if ($mode == 'supplier' && ! $user->rights->fournisseur->facture->lire) accessforbidden();
|
||||||
|
|
||||||
$userid=GETPOST('userid'); if ($userid < 0) $userid=0;
|
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||||
$socid=GETPOST('socid'); if ($socid < 0) $socid=0;
|
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ $modetax = $conf->global->TAX_MODE;
|
|||||||
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $langs->load('banks');
|
|||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
|
|
||||||
$facid = GETPOST('facid');
|
$facid = GETPOST('facid','int');
|
||||||
$socname = GETPOST('socname');
|
$socname = GETPOST('socname');
|
||||||
$accountid = GETPOST('accountid');
|
$accountid = GETPOST('accountid');
|
||||||
$paymentnum = GETPOST('num_paiement');
|
$paymentnum = GETPOST('num_paiement');
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load('banks');
|
|||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|
||||||
$id =GETPOST("id");
|
$id =GETPOST('id','int');
|
||||||
$ref=GETPOST("ref");
|
$ref=GETPOST("ref");
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ $filteraccountid=GETPOST('accountid');
|
|||||||
if ($action == 'setdate' && $user->rights->banque->cheque)
|
if ($action == 'setdate' && $user->rights->banque->cheque)
|
||||||
{
|
{
|
||||||
$remisecheque = new RemiseCheque($db);
|
$remisecheque = new RemiseCheque($db);
|
||||||
$result = $remisecheque->fetch(GETPOST('id'));
|
$result = $remisecheque->fetch(GETPOST('id','int'));
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php');
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$facid =GETPOST("facid");
|
$facid =GETPOST('facid','int');
|
||||||
$socid =GETPOST("socid");
|
$socid =GETPOST('socid','int');
|
||||||
$userid=GETPOST('userid');
|
$userid=GETPOST('userid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'facture',$facid,'');
|
$result = restrictedArea($user, 'facture',$facid,'');
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ $langs->load("categories");
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement', $id);
|
$result = restrictedArea($user, 'prelevement', $id);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ $langs->load("widthdrawals");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("companies");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ $langs->load("categories");
|
|||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$prev_id = GETPOST("id");
|
$prev_id = GETPOST('id','int');
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
$sortorder = ((GETPOST("sortorder")=="")) ? "DESC" : GETPOST("sortorder");
|
$sortorder = ((GETPOST("sortorder")=="")) ? "DESC" : GETPOST("sortorder");
|
||||||
$sortfield = ((GETPOST("sortfield")=="")) ? "p.ref" : GETPOST("sortfield");
|
$sortfield = ((GETPOST("sortfield")=="")) ? "p.ref" : GETPOST("sortfield");
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load("categories");
|
|||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$prev_id = GETPOST("id");
|
$prev_id = GETPOST('id','int');
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $langs->load("withdrawals");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$prev_id = GETPOST("id");
|
$prev_id = GETPOST('id','int');
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$action = GETPOST("action");
|
$action = GETPOST("action");
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("withdrawals");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','');
|
$result = restrictedArea($user, 'prelevement','','');
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ $langs->load("categories");
|
|||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$action = GETPOST("action");
|
$action = GETPOST("action");
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
|
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
$sortorder = GETPOST("sortorder");
|
$sortorder = GETPOST("sortorder");
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$prev_id = GETPOST("id");
|
$prev_id = GETPOST('id','int');
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
$sortorder = ((GETPOST("sortorder")=="")) ? "DESC" : GETPOST("sortorder");
|
$sortorder = ((GETPOST("sortorder")=="")) ? "DESC" : GETPOST("sortorder");
|
||||||
$sortfield = ((GETPOST("sortfield")=="")) ? "pl.fk_soc" : GETPOST("sortfield");
|
$sortfield = ((GETPOST("sortfield")=="")) ? "pl.fk_soc" : GETPOST("sortfield");
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ $langs->load("companies");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ $langs->load("companies");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ $langs->load("companies");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||||
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire) accessforbidden();
|
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid');
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||||
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire)
|
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/tax.lib.php");
|
|||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$id=GETPOST("id");
|
$id=GETPOST('id','int');
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges');
|
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges');
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ $langs->load("companies");
|
|||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$action = GETPOST("action");
|
$action = GETPOST("action");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
|||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$id=GETPOST("id");
|
$id=GETPOST('id','int');
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges');
|
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges');
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ else {
|
|||||||
$year_end=$year_start + ($nbofyear-1);
|
$year_end=$year_start + ($nbofyear-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$userid=GETPOST('userid');
|
$userid=GETPOST('userid','int');
|
||||||
$socid=GETPOST('socid');
|
$socid=GETPOST('socid','int');
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||||
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire) accessforbidden();
|
if (!$user->rights->compta->resultat->lire && !$user->rights->accounting->comptarapport->lire) accessforbidden();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ $modetax = $conf->global->TAX_MODE;
|
|||||||
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
|||||||
if (empty($modetax)) $modetax=0;
|
if (empty($modetax)) $modetax=0;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
|
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"].'?id='.GETPOST("id"); ?>">
|
<form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"].'?id='.GETPOST('id','int'); ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||||
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
||||||
<input type="hidden" name="id" value="<?php echo GETPOST("id"); ?>">
|
<input type="hidden" name="id" value="<?php echo GETPOST('id','int'); ?>">
|
||||||
<input type="hidden" name="action" value="update">
|
<input type="hidden" name="action" value="update">
|
||||||
<input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
|
<input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
|
||||||
<input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
|
<input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
|
<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||||
@@ -98,7 +97,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
<td><?php echo $this->control->tpl['email']; ?></td>
|
<td><?php echo $this->control->tpl['email']; ?></td>
|
||||||
<?php if ($this->control->tpl['nb_emailing']) { ?>
|
<?php if ($this->control->tpl['nb_emailing']) { ?>
|
||||||
<td nowrap><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
|
<td nowrap><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
|
||||||
<td><a href="<?php echo DOL_URL_ROOT.'/comm/mailing/liste.php?filteremail='.urlencode($this->control->tpl['email']); ?>"><?php echo $this->control->tpl['nb_emailing']; ?></a></td>
|
<td><?php echo $this->control->tpl['nb_emailing']; ?></td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td colspan="2"> </td>
|
<td colspan="2"> </td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -249,10 +249,12 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$object->old_name='';
|
$object->old_name='';
|
||||||
$object->old_firstname='';
|
$object->old_firstname='';
|
||||||
|
$action = 'view';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error=$object->error; $errors=$object->errors;
|
$error=$object->error; $errors=$object->errors;
|
||||||
|
$action = 'edit';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,7 +279,7 @@ if ($socid > 0)
|
|||||||
$objsoc->fetch($socid);
|
$objsoc->fetch($socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||||
{
|
{
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
// When used with CANVAS
|
// When used with CANVAS
|
||||||
@@ -288,7 +290,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
|||||||
$object->fetch($id); // For use with "pure canvas" (canvas that contains templates only)
|
$object->fetch($id); // For use with "pure canvas" (canvas that contains templates only)
|
||||||
}
|
}
|
||||||
$objcanvas->assign_values($action, $id); // Set value for templates
|
$objcanvas->assign_values($action, $id); // Set value for templates
|
||||||
$objcanvas->display_canvas(); // Show template
|
$objcanvas->display_canvas($action); // Show template
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -390,7 +392,7 @@ else
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
print $form->select_company(GETPOST("socid"),'socid','',1);
|
print $form->select_company(GETPOST('socid','int'),'socid','',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -562,7 +564,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td>';
|
print '<tr><td>'.$langs->trans("Company").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->select_company(GETPOST("socid")?GETPOST("socid"):($object->socid?$object->socid:-1),'socid','',1);
|
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ if ($_POST["action"] == 'addcontact' && $user->rights->contrat->creer)
|
|||||||
if ($_GET["action"] == 'swapstatut' && $user->rights->contrat->creer)
|
if ($_GET["action"] == 'swapstatut' && $user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
$contrat = new Contrat($db);
|
$contrat = new Contrat($db);
|
||||||
if ($contrat->fetch(GETPOST("id")))
|
if ($contrat->fetch(GETPOST('id','int')))
|
||||||
{
|
{
|
||||||
$result=$contrat->swapContactStatus(GETPOST('ligne'));
|
$result=$contrat->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ $langs->load("bills");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
$socid = GETPOST("socid");
|
$socid = GETPOST('socid','int');
|
||||||
$contratid = GETPOST("id");
|
$contratid = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ $search_nom=GETPOST("search_nom");
|
|||||||
$search_contract=GETPOST("search_contract");
|
$search_contract=GETPOST("search_contract");
|
||||||
$search_service=GETPOST("search_service");
|
$search_service=GETPOST("search_service");
|
||||||
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
||||||
$socid=GETPOST("socid");
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$contratid = GETPOST("id");
|
$contratid = GETPOST('id','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contrat',$contratid,'');
|
$result = restrictedArea($user, 'contrat',$contratid,'');
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ class Canvas
|
|||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $DB Database handler
|
||||||
* @param string $actiontype Action type ('create', 'view', 'edit', 'list')
|
* @param string $actiontype Action type ('create', 'view', 'edit', 'list')
|
||||||
*/
|
*/
|
||||||
function __construct($DB, $actiontype='view')
|
function __construct($db, $actiontype='view')
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->actiontype = $actiontype;
|
$this->actiontype = $actiontype;
|
||||||
if ($this->actiontype == 'add') $this->actiontype='create';
|
if ($this->actiontype == 'add') $this->actiontype='create';
|
||||||
@@ -128,11 +128,11 @@ class Canvas
|
|||||||
*
|
*
|
||||||
* @return int 0=Canvas template file does not exist, 1=Canvas template file exists
|
* @return int 0=Canvas template file does not exist, 1=Canvas template file exists
|
||||||
*/
|
*/
|
||||||
function displayCanvasExists()
|
function displayCanvasExists($action)
|
||||||
{
|
{
|
||||||
if (empty($this->template_dir)) return 0;
|
if (empty($this->template_dir)) return 0;
|
||||||
//print $this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php';
|
|
||||||
if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php')) return 1;
|
if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->action.'.tpl.php')) return 1;
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,12 +142,12 @@ class Canvas
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function display_canvas()
|
function display_canvas($action)
|
||||||
{
|
{
|
||||||
global $db, $conf, $langs, $user, $canvas;
|
global $db, $conf, $langs, $user, $canvas;
|
||||||
global $form, $formfile;
|
global $form, $formfile;
|
||||||
|
|
||||||
include($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php'); // Include native PHP template
|
include($this->template_dir.($this->card?$this->card.'_':'').$this->action.'.tpl.php'); // Include native PHP template
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,12 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -165,6 +171,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -240,6 +247,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -211,6 +217,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -356,6 +363,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -155,6 +155,12 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction generant le document sur le disque
|
* Fonction generant le document sur le disque
|
||||||
* \param object Objet expedition a generer (ou id si ancienne methode)
|
*
|
||||||
* \param outputlangs Lang output object
|
* @param object Objet expedition a generer (ou id si ancienne methode)
|
||||||
* \return int 1=ok, 0=ko
|
* @param outputlangs Lang output object
|
||||||
|
* @return int 1=ok, 0=ko
|
||||||
*/
|
*/
|
||||||
function write_file(&$object, $outputlangs)
|
function write_file(&$object, $outputlangs)
|
||||||
{
|
{
|
||||||
@@ -133,6 +134,12 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -152,6 +159,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -211,6 +217,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -360,6 +367,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -174,6 +174,12 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -191,6 +197,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -260,6 +267,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -142,6 +142,12 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -159,6 +165,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -289,6 +296,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -126,6 +126,12 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Complete object by loading several other informations
|
// Complete object by loading several other informations
|
||||||
$expedition=new Expedition($this->db);
|
$expedition=new Expedition($this->db);
|
||||||
@@ -155,6 +161,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -148,6 +148,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Complete object by loading several other informations
|
// Complete object by loading several other informations
|
||||||
$expedition=new Expedition($this->db);
|
$expedition=new Expedition($this->db);
|
||||||
@@ -188,6 +194,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->export_icon[$r]='company';
|
$this->export_icon[$r]='company';
|
||||||
$this->export_permission[$r]=array(array("societe","export"));
|
$this->export_permission[$r]=array(array("societe","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Effectif","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State');
|
$this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Effectif","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State');
|
||||||
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
|
||||||
$this->export_entities_array[$r]=array(); // We define here only fields that use another picto
|
$this->export_entities_array[$r]=array(); // We define here only fields that use another picto
|
||||||
// Add extra fields
|
// Add extra fields
|
||||||
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";
|
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";
|
||||||
|
|||||||
@@ -170,6 +170,12 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -196,6 +202,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -341,6 +348,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -170,6 +170,12 @@ class pdf_jaune extends ModelePDFPropales
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -196,6 +202,7 @@ class pdf_jaune extends ModelePDFPropales
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -341,6 +348,7 @@ class pdf_jaune extends ModelePDFPropales
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -177,6 +177,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -203,6 +209,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -347,6 +354,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -183,6 +183,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
// Set path to the background PDF File
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
|
{
|
||||||
|
$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
|
||||||
|
$tplidx = $pdf->importPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
@@ -209,6 +215,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
@@ -353,6 +360,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ $result = restrictedArea($user, 'ecm', 0);
|
|||||||
$user->getrights('ecm');
|
$user->getrights('ecm');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$socid=GETPOST('socid');
|
$socid=GETPOST('socid','int');
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
$section=GETPOST("section");
|
$section=GETPOST("section");
|
||||||
$module=GETPOST("module");
|
$module=GETPOST("module");
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ $langs->load('other');
|
|||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
|
|
||||||
$origin = GETPOST("origin")?GETPOST("origin"):'expedition'; // Example: commande, propal
|
$origin = GETPOST("origin")?GETPOST("origin"):'expedition'; // Example: commande, propal
|
||||||
$origin_id = GETPOST("id")?GETPOST("id"):'';
|
$origin_id = GETPOST('id','int')?GETPOST('id','int'):'';
|
||||||
if (empty($origin_id)) $origin_id = GETPOST("origin_id"); // Id of order or propal
|
if (empty($origin_id)) $origin_id = GETPOST("origin_id"); // Id of order or propal
|
||||||
if (empty($origin_id)) $origin_id = GETPOST("object_id"); // Id of order or propal
|
if (empty($origin_id)) $origin_id = GETPOST("object_id"); // Id of order or propal
|
||||||
$id = $origin_id;
|
$id = $origin_id;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load('interventions');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("id");
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user