Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop

This commit is contained in:
Maxime Kohlhaas 2013-02-22 15:24:49 +01:00
commit 04e1be4afd
32 changed files with 352 additions and 464 deletions

View File

@ -16,6 +16,7 @@ For users:
- New: total per vat rate are available as tags for ODT templates.
- New: Add more types for extra parameters (lists, phone, emails, checkbox, prices)
- New: Some part of interface use more CSS3 (ie: agenda)
- New: [ task #707 ] Create option ProfIdx are mandatory to validate a invoice
For developers:
- System of menu managers has been rewritten to reduce code to do same things.
@ -24,7 +25,7 @@ For developers:
- A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file.
- Removed not used libraries.
- More web services.
- Renamed some french fields into english.
- Renamed some database fields, code variables and parameters from french to english.
- First change to manage margins on contracts.
- Add hook getFormMail.

View File

@ -320,7 +320,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootsrap*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;

View File

@ -62,7 +62,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
// requete en prenant que les adherents a jour de cotisation
$sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,";
$sql.= " d.adresse as address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,";
$sql.= " d.address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,";
$sql.= " p.code as country_code, p.libelle as country";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
@ -112,7 +112,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
'%PRENOM%'=>$objp->firstname,
'%NOM%'=>$objp->lastname,
'%SOCIETE%'=>$objp->company,
'%ADRESSE%'=>$objp->address,
'%ADDRESS%'=>$objp->address,
'%CP%'=>$objp->zip,
'%VILLE%'=>$objp->town,
'%PAYS%'=>$objp->country,

View File

@ -51,7 +51,6 @@ class Adherent extends CommonObject
var $login;
var $pass;
var $societe;
//var $adresse;
var $address;
var $cp;
var $zip;
@ -233,7 +232,7 @@ class Adherent extends CommonObject
'%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
'%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
'%ADRESSE%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
'%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
@ -404,7 +403,7 @@ class Adherent extends CommonObject
// Clean parameters
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->nom);
$this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom);
$this->address=($this->address?$this->address:$this->adresse);
$this->address=($this->address?$this->address:$this->address);
$this->zip=($this->zip?$this->zip:$this->cp);
$this->town=($this->town?$this->town:$this->ville);
$this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays);
@ -1065,7 +1064,6 @@ class Adherent extends CommonObject
$this->pass = $obj->pass;
$this->societe = $obj->societe;
$this->fk_soc = $obj->fk_soc;
//$this->adresse = $obj->address; // deprecated
$this->address = $obj->address;
$this->cp = $obj->zip; // deprecated
$this->zip = $obj->zip;
@ -1201,7 +1199,7 @@ class Adherent extends CommonObject
* Insert subscription into database and eventually add links to banks, mailman, etc...
*
* @param timestamp $date Date d'effet de la cotisation
* @param amount $montant Montant cotisation (accepte 0 pour les adherents non soumis e cotisation)
* @param amount $montant Montant cotisation (accepte 0 pour les adherents non soumis a cotisation)
* @param int $accountid Id compte bancaire
* @param string $operation Type operation (si Id compte bancaire fourni)
* @param string $label Label operation (si Id compte bancaire fourni)
@ -1386,7 +1384,7 @@ class Adherent extends CommonObject
/**
* Fonction qui ajoute l'adherent au abonnements automatiques mailing-list, spip, etc.
* Fonction qui ajoute l'adherent aux abonnements automatiques mailing-list, spip, etc.
* TODO Move this into member creation trigger (trigger of mailmanspip module)
*
* @return int <0 if KO, >0 if OK
@ -1479,7 +1477,7 @@ class Adherent extends CommonObject
/**
* Return label of a civility of a contact
* Return civility label of a contact
*
* @param int $nohtmlentities 0=Encode with htmlentities for HTML output, 1=No htmlentities for memory translation
* @return string Name translated of civility

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -98,9 +98,9 @@ if ($rowid > 0)
}
}
// Define variables to know what current user can do on members
// Define variables to determine what the current user can do on the members
$canaddmember=$user->rights->adherent->creer;
// Define variables to know what current user can do on properties of a member
// Define variables to determine what the current user can do on the properties of a member
if ($rowid)
{
$caneditfieldmember=$user->rights->adherent->creer;
@ -259,7 +259,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
$object->pass = trim($_POST["pass"]);
$object->societe = trim($_POST["societe"]);
//$object->adresse = trim($_POST["address"]); // deprecated
$object->address = trim($_POST["address"]);
$object->cp = trim($_POST["zipcode"]); // deprecated
$object->zip = trim($_POST["zipcode"]);
@ -440,7 +439,6 @@ if ($action == 'add' && $user->rights->adherent->creer)
$object->firstname = $prenom;
$object->lastname = $nom;
$object->societe = $societe;
//$object->adresse = $address; // deprecated
$object->address = $address;
$object->cp = $zip; // deprecated
$object->zip = $zip;

View File

@ -1,350 +0,0 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/addpropal.php
* \ingroup propal
* \brief Page to add a new commercial proposal
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
}
$langs->load("propal");
if (! empty($conf->projet->enabled))
$langs->load("projects");
$langs->load("companies");
$langs->load("bills");
$langs->load("orders");
$langs->load("deliveries");
$action=GETPOST('action','alpha');
$origin=GETPOST('origin','alpha');
$originid=GETPOST('originid','int');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('propalcard'));
/*
* Actions
*/
// None
/*
* View
*/
llxHeader();
print_fiche_titre($langs->trans("NewProp"));
$form=new Form($db);
// Add new proposal
if ($action == 'create')
{
$soc = new Societe($db);
$result=$soc->fetch($_GET["socid"]);
if ($result < 0)
{
dol_print_error($db,$soc->error);
exit;
}
$object = new Propal($db);
$numpr='';
$obj = $conf->global->PROPALE_ADDON;
if ($obj)
{
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
{
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.'.php';
$modPropale = new $obj;
$numpr = $modPropale->getNextValue($soc,$object);
}
}
// Fix pour modele numerotation qui deconne
// Si numero deja pris (ne devrait pas arriver), on incremente par .num+1
$sql = "SELECT count(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."propal";
$sql.= " WHERE ref LIKE '".$numpr."%'";
$sql.= " AND entity = ".$conf->entity;
$resql=$db->query($sql);
if ($resql)
{
$obj=$db->fetch_object($resql);
$num = $obj->nb;
$db->free($resql);
if ($num > 0)
{
$numpr .= "." . ($num + 1);
}
}
print '<form name="addprop" action="propal.php?socid='.$soc->id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
if ($origin != 'project' && $originid)
{
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="originid" value="'.$originid.'">';
}
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">'.$numpr.'</td>';
print '<input type="hidden" name="ref" value="'.$numpr.'">';
print '</tr>';
// Ref customer
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td colspan="2">';
print '<input type="text" name="ref_client" value=""></td>';
print '</tr>';
// Third party
print '<tr><td class="fieldrequired">'.$langs->trans('Company').'</td><td colspan="2">'.$soc->getNomUrl(1);
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
print '</td>';
print '</tr>';
// Contacts
print "<tr><td>".$langs->trans("DefaultContact")."</td><td colspan=\"2\">\n";
$form->select_contacts($soc->id,'','contactidp',1);
print '</td></tr>';
// Ligne info remises tiers
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">';
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
else print $langs->trans("CompanyHasNoRelativeDiscount");
$absolute_discount=$soc->getAvailableDiscounts();
print '. ';
if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->trans("Currency".$conf->currency));
else print $langs->trans("CompanyHasNoAbsoluteDiscount");
print '.';
print '</td></tr>';
// Date
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
$form->select_date('','','','','',"addprop");
print '</td></tr>';
// Validaty duration
print '<tr><td class="fieldrequired">'.$langs->trans("ValidityDuration").'</td><td colspan="2"><input name="duree_validite" size="5" value="'.$conf->global->PROPALE_VALIDITY_DURATION.'"> '.$langs->trans("days").'</td></tr>';
// Terms of payment
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
$form->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id');
print '</td></tr>';
// Mode of payment
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
$form->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
print '</td></tr>';
// What trigger creation
print '<tr><td>'.$langs->trans('Source').'</td><td>';
$form->select_demand_reason('','demand_reason_id',"SRC_PROP",1);
print '</td></tr>';
// Delivery delay
print '<tr><td>'.$langs->trans('AvailabilityPeriod').'</td><td colspan="2">';
$form->select_availability('','availability_id','',1);
print '</td></tr>';
// Delivery date (or manufacturing)
print '<tr><td>'.$langs->trans("DeliveryDate").'</td>';
print '<td colspan="2">';
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "")
{
$tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
$syear = date("Y", $tmpdte);
$smonth = date("m", $tmpdte);
$sday = date("d", $tmpdte);
$form->select_date($syear."-".$smonth."-".$sday,'liv_','','','',"addprop");
}
else
{
$datepropal=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
$form->select_date($datepropal,'liv_','','','',"addprop");
}
print '</td></tr>';
// Model
print '<tr>';
print '<td>'.$langs->trans("DefaultModel").'</td>';
print '<td colspan="2">';
$liste=ModelePDFPropales::liste_modeles($db);
print $form->selectarray('model',$liste,$conf->global->PROPALE_ADDON_PDF);
print "</td></tr>";
// Project
if (! empty($conf->projet->enabled))
{
$projectid = 0;
if ($origin == 'project') $projectid = ($originid?$originid:0);
print '<tr>';
print '<td valign="top">'.$langs->trans("Project").'</td><td colspan="2">';
$numprojet=select_projects($soc->id,$projectid);
if ($numprojet==0)
{
print ' &nbsp; <a href="../projet/fiche.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddProject").'</a>';
}
print '</td>';
print '</tr>';
}
// Other attributes
$parameters=array('colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print '>'.$label.'</td><td colspan="3">';
print $extrafields->showInputField($key,$value);
print '</td></tr>'."\n";
}
}
print "</table>";
print '<br>';
/*
* Combobox pour la fonction de copie
*/
if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE))
{
print '<input type="hidden" name="createmode" value="empty">';
}
print '<table>';
if (! empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE))
{
// For backward compatibility
print '<tr>';
print '<td><input type="radio" name="createmode" value="copy"></td>';
print '<td>'.$langs->trans("CopyPropalFrom").' </td>';
print '<td>';
$liste_propal = array();
$liste_propal[0] = '';
$sql ="SELECT p.rowid as id, p.ref, s.nom";
$sql.=" FROM ".MAIN_DB_PREFIX."propal p";
$sql.= ", ".MAIN_DB_PREFIX."societe s";
$sql.= " WHERE s.rowid = p.fk_soc";
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND p.fk_statut <> 0";
$sql.= " ORDER BY Id";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$row = $db->fetch_row($resql);
$propalRefAndSocName = $row[1]." - ".$row[2];
$liste_propal[$row[0]]=$propalRefAndSocName;
$i++;
}
print $form->selectarray("copie_propal",$liste_propal, 0);
}
else
{
dol_print_error($db);
}
print '</td></tr>';
if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '<tr><td colspan="3">&nbsp;</td></tr>';
print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked="checked"></td>';
print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
}
if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE))
{
print '<tr><td colspan="3">';
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
$lib=$langs->trans("ProductsAndServices");
print '<table class="border" width="100%">';
print '<tr>';
print '<td>'.$lib.'</td>';
print '<td>'.$langs->trans("Qty").'</td>';
print '<td>'.$langs->trans("ReductionShort").'</td>';
print '</tr>';
for ($i = 1 ; $i <= $conf->global->PRODUCT_SHOW_WHEN_CREATE; $i++)
{
print '<tr><td>';
// multiprix
if($conf->global->PRODUIT_MULTIPRICES && $soc->price_level)
$form->select_produits('',"idprod".$i,'',$conf->product->limit_size,$soc->price_level);
else
$form->select_produits('',"idprod".$i,'',$conf->product->limit_size);
print '</td>';
print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
print '<td><input type="text" size="2" name="remise'.$i.'" value="'.$soc->remise_client.'">%</td>';
print '</tr>';
}
print "</table>";
}
print '</td></tr>';
}
print '</table>';
print '<br>';
$langs->load("bills");
print '<center>';
print '<input type="submit" class="button" value="'.$langs->trans("CreateDraft").'">';
print '&nbsp;<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
print '</center>';
print "</form>";
}
llxFooter();
$db->close();
?>

View File

@ -1247,7 +1247,7 @@ if ($action == 'create')
else
{
print '<td colspan="2">';
print $form->select_company('','socid','s.client = 1',1);
print $form->select_company('','socid','s.client = 1 OR s.client = 2 OR s.client = 3',1);
print '</td>';
}
print '</tr>'."\n";

View File

@ -366,6 +366,22 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
$object->fetch_thirdparty();
// Check parameters
// Check for mandatory prof id
for ($i = 1; $i < 5; $i++)
{
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_INVOICE_MANDATORY';
if (! $object->thirdparty->idprof.$i && ! empty($conf->global->$idprof_mandatory))
{
if (! $error) $langs->load("errors");
$error++;
setEventMessage($langs->trans('ErrorProdIdIsMandatory',$langs->transcountry('ProfId'.$i, $object->thirdparty->country_code)),'errors');
}
}
//Check for warehouse
if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $object->hasProductsOrServices(1))
{
if (! $idwarehouse || $idwarehouse == -1)
@ -375,7 +391,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
$action='';
}
}
if (! $error)
{
$result = $object->validate($user,'',$idwarehouse);

View File

@ -71,7 +71,7 @@ class box_activity extends ModeleBoxes
$nbofyears=2;
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
$textHead = $langs->trans("Activity").' ('.$nbofyears.' '.$langs->trans("years").')';
$textHead = $langs->trans("Activity").' ('.$nbofyears.' '.$langs->trans("DurationYears").')';
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
// compute the year limit to show

View File

@ -25,9 +25,7 @@
/**
* \class DoliDBMssql
* \brief Classe de gestion de la database de dolibarr
* \remarks Works with PHP5 Only
* Classe de gestion de la database de dolibarr
*/
class DoliDBMssql
{

View File

@ -29,8 +29,7 @@
/**
* \class DoliDBPgsql
* \brief Class to drive a Postgresql database for Dolibarr
* Class to drive a Postgresql database for Dolibarr
*/
class DoliDBPgsql
{
@ -245,17 +244,17 @@ class DoliDBPgsql
$line=preg_replace('/\sAFTER [a-z0-9_]+/i','',$line);
// We remove start of requests "ALTER TABLE tablexxx" if this is a DROP INDEX
$line=preg_replace('/ALTER TABLE [a-z0-9_]+ DROP INDEX/i','DROP INDEX',$line);
$line=preg_replace('/ALTER TABLE [a-z0-9_]+\s+DROP INDEX/i','DROP INDEX',$line);
// Translate order to rename fields
if (preg_match('/ALTER TABLE ([a-z0-9_]+) CHANGE(?: COLUMN)? ([a-z0-9_]+) ([a-z0-9_]+)(.*)$/i',$line,$reg))
if (preg_match('/ALTER TABLE ([a-z0-9_]+)\s+CHANGE(?: COLUMN)? ([a-z0-9_]+) ([a-z0-9_]+)(.*)$/i',$line,$reg))
{
$line = "-- ".$line." replaced by --\n";
$line.= "ALTER TABLE ".$reg[1]." RENAME COLUMN ".$reg[2]." TO ".$reg[3];
}
// Translate order to modify field format
if (preg_match('/ALTER TABLE ([a-z0-9_]+) MODIFY(?: COLUMN)? ([a-z0-9_]+) (.*)$/i',$line,$reg))
if (preg_match('/ALTER TABLE ([a-z0-9_]+)\s+MODIFY(?: COLUMN)? ([a-z0-9_]+) (.*)$/i',$line,$reg))
{
$line = "-- ".$line." replaced by --\n";
$newreg3=$reg[3];

View File

@ -26,8 +26,7 @@
/**
* \class DoliDBSqlite
* \brief Class to manage Dolibarr database access for a Sqlite database
* Class to manage Dolibarr database access for a Sqlite database
*/
class DoliDBSqlite
{

View File

@ -0,0 +1,55 @@
<?PHP
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/core/modules/expedition/methode_expedition_chrono.modules.php
* \ingroup expedition
*/
include_once "methode_expedition.modules.php";
/**
* Class to manage shipment Chronopost
*/
class methode_expedition_chrono extends ModeleShippingMethod
{
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function __construct($db=0)
{
$this->db = $db;
$this->id = 8; // Do not change this value
$this->code = "COLCHRONO"; // Do not change this value
$this->name = "Chronopost";
$this->description = "Chronopost";
}
/**
* Return URL of provider
*
* @param string $tracking_number Tracking number
* @return string URL for tracking
*/
function provider_url_status($tracking_number)
{
return sprintf("http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros=%s",$tracking_number);
}
}
?>

View File

@ -0,0 +1,55 @@
<?PHP
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* \file htdocs/core/modules/expedition/methode_expedition_gls.modules.php
* \ingroup expedition
*/
include_once "methode_expedition.modules.php";
/**
* Class to manage shipment GLS
*/
class methode_expedition_gls extends ModeleShippingMethod
{
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function __construct($db=0)
{
$this->db = $db;
$this->id = 7; // Do not change this value
$this->code = "COLGLS"; // Do not change this value
$this->name = "GLS";
$this->description = "General Logistics Systems";
}
/**
* Return URL of provider
*
* @param string $tracking_number Tracking number
* @return string URL for tracking
*/
function provider_url_status($tracking_number)
{
return sprintf("http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo=%s",$tracking_number);
}
}
?>

View File

@ -0,0 +1,55 @@
<?PHP
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/*
* \file htdocs/core/modules/expedition/methode_expedition_kiala.modules.php
* \ingroup expedition
*/
include_once "methode_expedition.modules.php";
Class methode_expedition_kiala extends ModeleShippingMethod
{
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function methode_expedition_kiala($db=0)
{
$this->db = $db;
$this->id = 6; // Do not change this value
$this->code = "COLKIALA"; // Do not change this value
$this->name = "KIALA";
$this->description = "KIALA";
}
/**
* Return URL of provider
*
* @param string $tracking_number Tracking number
* @return string URL for tracking
*/
function provider_url_status($tracking_number)
{
return sprintf("http://www.kiala.fr/tnt/delivery/%s",$tracking_number);
}
}
?>

View File

@ -0,0 +1,54 @@
<?PHP
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/*
* \file htdocs/core/modules/expedition/methode_expedition_ups.modules.php
* \ingroup expedition
*/
include_once "methode_expedition.modules.php";
class methode_expedition_ups extends ModeleShippingMethod
{
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function methode_expedition_ups($db=0)
{
$this->db = $db;
$this->id = 5; // Do not change this value
$this->code = "COLUPS"; // Do not change this value
$this->name = "UPS";
$this->description = "United Parcel Service";
}
/**
* Return URL of provider
*
* @param string $tracking_number Tracking number
* @return string URL for tracking
*/
function provider_url_status($tracking_number)
{
return sprintf("http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1=%s",$tracking_number);
}
}
?>

View File

@ -214,7 +214,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,0);
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?22:10);
$tab_height = 130;
$tab_height_newpage = 150;
@ -252,7 +252,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@ -355,12 +355,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Show square
if ($pagenb == 1)
{
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0);
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfooter + 1;
}
else
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1);
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfooter + 1;
}
@ -472,35 +472,43 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Rect prend une longueur en 3eme param
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height);
// line prend une position y en 3eme param
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6);
if (empty($hidetop))
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L');
if (empty($hidetop)) {
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L');
}
// Modif SEB pour avoir une col en plus pour les commentaires clients
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
$pdf->SetXY($this->posxcomm, $tab_top+1);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Comments"),'','L');
if (empty($hidetop)) {
$pdf->SetXY($this->posxcomm, $tab_top+1);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Comments"),'','L');
}
// Qty
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
$pdf->SetXY($this->posxqty-1, $tab_top+1);
$pdf->MultiCell(30, 2, $outputlangs->transnoentities("QtyShipped"),'','R');
if (empty($hidetop)) {
$pdf->SetXY($this->posxqty-1, $tab_top+1);
$pdf->MultiCell(30, 2, $outputlangs->transnoentities("QtyShipped"),'','R');
}
// Modif Seb cadres signatures
$pdf->SetFont('','', $default_font_size);
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
$pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY($this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
$pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');
if (empty($hidebottom)) {
// Modif Seb cadres signatures
$pdf->SetFont('','', $default_font_size);
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
$pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY($this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
$pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');
}
}
/**

View File

@ -80,8 +80,8 @@ if (! empty($conf->margin->enabled)) {
'origin_price_ht_cache' => 'price_ht',
'origin_tva_tx_cache' => 'tva_tx',
'origin_price_ttc_cache' => 'price_ttc',
'qty' => 'qty',
'remise_percent' => 'discount'
'qty' => 'qty'
//'remise_percent' => 'discount'
),
'update_textarea' => array(
'product_desc' => 'desc'
@ -242,7 +242,7 @@ $(document).ready(function() {
$('#select_type').val(data.type).attr('disabled','disabled').trigger('change');
//$('#price_base_type_area').show();
$('#qty').val(data.qty);
$('#remise_percent').val(data.discount);
//$('#remise_percent').val(data.discount);
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances['product_desc'] != "undefined") {
CKEDITOR.instances['product_desc'].setData(data.desc).focus();

View File

@ -33,3 +33,7 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (2,'TRANS','Transporter','Generic transporter',1);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0);

View File

@ -45,3 +45,8 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address
alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer;
alter table llx_don CHANGE COLUMN adresse address text;
alter table llx_adherent CHANGE COLUMN adresse address text;
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (7,'COLGLS','GLS','General Logistics Systems',0);
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (8,'COLCHRONO','Chronopost','Chronopost',0);

View File

@ -962,7 +962,8 @@ DocumentModelOdt=Generació des dels documents amb format OpenDocument (Arxiu .O
WatermarkOnDraft=Marca d'aigua en els documents esborrany
CompanyIdProfChecker=Règles sobre els ID professionals
MustBeUnique=Ha de ser únic?
MustBeMandatory=Ha de ser obligatori?
MustBeMandatory=Ha de ser obligatori per a crear tercers?
MustBeInvoiceMandatory=Ha de ser obligatori per a validar factures?
Miscellanous=Miscel·lània
##### Webcal setup #####
WebCalSetup=Configuració d'enllaç amb el calendari webcalendar

View File

@ -565,6 +565,7 @@ ThisLimitIsDefinedInSetup=Límit Dolibarr (Menú inici-configuració-seguretat):
NoFileFound=No hi ha documents guardats en aquesta carpeta
CurrentUserLanguage=Idioma actual
CurrentTheme=Tema actual
CurrentMenuManager=Gestor menú actual
DisabledModules=Mòduls desactivats
For=Per a
ForCustomer=Per a client

View File

@ -978,7 +978,8 @@ DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for
WatermarkOnDraft=Watermark on draft document
CompanyIdProfChecker=Rules ono Professional Ids
MustBeUnique=Must be unique ?
MustBeMandatory=Must be mandatory ?
MustBeMandatory=Must be mandatory to create thirds?
MustBeInvoiceMandatory=Must be mandatory to validate invoices?
Miscellanous=Miscellaneous
##### Webcal setup #####
WebCalSetup=Webcalendar link setup

View File

@ -566,7 +566,7 @@ ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP
NoFileFound=No documents saved in this directory
CurrentUserLanguage=Current language
CurrentTheme=Current theme
CurrentMenuManager=current men manager
CurrentMenuManager=current menu manager
DisabledModules=Disabled modules
For=For
ForCustomer=For customer

View File

@ -964,7 +964,8 @@ DocumentModelOdt=Generación desde los documentos OpenDocument (Archivo .ODT Ope
WatermarkOnDraft=Marca de agua en los documentos borrador
CompanyIdProfChecker=Reglas sobre los ID profesionales
MustBeUnique=¿Debe ser único?
MustBeMandatory=¿Debe ser obligatorio?
MustBeMandatory=¿Debe ser obligatorio para crear terceros?
MustBeInvoiceMandatory=¿Debe ser obligatorio para validar facturas?
Miscellanous=Miscelánea
##### Webcal setup #####
WebCalSetup=Configuración de enlace con el calendario Webcalendar

View File

@ -567,6 +567,7 @@ ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú inicio-configuración-segurida
NoFileFound=No hay documentos guardados en este directorio
CurrentUserLanguage=Idioma actual
CurrentTheme=Tema actual
CurrentMenuManager=Gestor menú actual
DisabledModules=Módulos desactivados
For=Para
ForCustomer=Para cliente

View File

@ -975,7 +975,8 @@ DocumentModelOdt=Genération depuis des modèles OpenDocument (Fichier .ODT Open
WatermarkOnDraft=Filigrane sur les documents brouillons
CompanyIdProfChecker=Règles sur les Ids professionnels
MustBeUnique=Doit être unique ?
MustBeMandatory=Doit être obligatoire?
MustBeMandatory=Doit être obligatoire pour creer tiers ?
MustBeInvoiceMandatory=Doit être obligatoire pour valider factures ?
Miscellanous=Divers
##### Webcal setup #####
WebCalSetup= Configuration du lien vers le calendrier Webcalendar

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -442,18 +443,12 @@ else
$i++;
}
if ($num > $conf->liste_limit)
{
if ($sref || $snom || $sall || $sbarcode || GETPOST('search'))
{
print_barre_liste('', $page, "liste.php", "&amp;sref=".$sref."&amp;snom=".$snom."&amp;sall=".$sall."&amp;tosell=".$tosell."&amp;tobuy=".$tobuy, $sortfield, $sortorder,'',$num);
}
else
{
print_barre_liste('', $page, "liste.php", "&amp;sref=$sref&amp;snom=$snom&amp;fourn_id=$fourn_id".(isset($type)?"&amp;type=$type":"")."&amp;tosell=".$tosell."&amp;tobuy=".$tobuy, $sortfield, $sortorder,'',$num);
}
}
$param="&amp;sref=".$sref.($sbarcode?"&amp;sbarcode=".$sbarcode:"")."&amp;snom=".$snom."&amp;sall=".$sall."&amp;tosell=".$tosell."&amp;tobuy=".$tobuy;
$param.=($fourn_id?"&amp;fourn_id=".$fourn_id:"");
$param.=($search_categ?"&amp;search_categ=".$search_categ:"");
$param.=isset($type)?"&amp;type=".$type:"";
print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
$db->free($resql);
print "</table>";

View File

@ -210,7 +210,7 @@ if ($action == 'setprofid')
}
}
//Activate ProfId
//Activate ProfId mandatory
if ($action == 'setprofidmandatory')
{
$status = GETPOST('status','alpha');
@ -227,6 +227,22 @@ if ($action == 'setprofidmandatory')
}
}
//Activate ProfId invoice mandatory
if ($action == 'setprofidinvoicemandatory')
{
$status = GETPOST('status','alpha');
$idprof="SOCIETE_IDPROF".$value."_INVOICE_MANDATORY";
if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
else
{
dol_print_error($db);
}
}
/*
* View
@ -554,6 +570,7 @@ print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center">'.$langs->trans("MustBeUnique").'</td>';
print '<td align="center">'.$langs->trans("MustBeMandatory").'</td>';
print '<td align="center">'.$langs->trans("MustBeInvoiceMandatory").'</td>';
print "</tr>\n";
$profid[0][0]=$langs->trans("ProfId1");
@ -586,8 +603,10 @@ while ($i < $nbofloop)
$idprof_unique ='SOCIETE_IDPROF'.($i+1).'_UNIQUE';
$idprof_mandatory ='SOCIETE_IDPROF'.($i+1).'_MANDATORY';
$idprof_invoice_mandatory ='SOCIETE_IDPROF'.($i+1).'_INVOICE_MANDATORY';
$verif=(empty($conf->global->$idprof_unique)?false:true);
$mandatory=(empty($conf->global->$idprof_mandatory)?false:true);
$invoice_mandatory=(empty($conf->global->$idprof_invoice_mandatory)?false:true);
if ($verif)
{
@ -614,6 +633,20 @@ while ($i < $nbofloop)
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a></td>';
}
if ($invoice_mandatory)
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&value='.($i+1).'&status=0">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a></td>';
}
else
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&value='.($i+1).'&status=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a></td>';
}
print "</tr>\n";
}
$i++;

View File

@ -168,7 +168,6 @@ abstract class ActionsCardCommon
}
$this->object->client = $_POST["client"];
$this->object->fournisseur = $_POST["fournisseur"];
$this->object->fournisseur_categorie = $_POST["fournisseur_categorie"];
$this->object->commercial_id = $_POST["commercial_id"];
$this->object->default_lang = $_POST["default_lang"];
@ -488,7 +487,6 @@ abstract class ActionsCardCommon
$this->object->LoadSupplierCateg();
$this->tpl['suppliercategory'] = $this->object->SupplierCategories;
$this->tpl['select_suppliercategory'] = $form->selectarray("fournisseur_categorie",$this->object->SupplierCategories,$_POST["fournisseur_categorie"],1);
}
// Zip

View File

@ -143,7 +143,8 @@ class Societe extends CommonObject
var $array_options;
var $oldcopy;
/**
* Constructor
*
@ -242,9 +243,6 @@ class Societe extends CommonObject
$this->add_commercial($user, $user->id);
}
// si le fournisseur est classe on l'ajoute
$this->AddFournisseurInCategory($this->fournisseur_categorie);
if ($ret >= 0)
{
// Appel des triggers
@ -610,9 +608,6 @@ class Societe extends CommonObject
}
}
// Si le fournisseur est classe on l'ajoute
$this->AddFournisseurInCategory($this->fournisseur_categorie);
// Actions on extra fields (by external module or standard code)
// FIXME le hook fait double emploi avec le trigger !!
$hookmanager->initHooks(array('thirdpartydao'));

View File

@ -162,7 +162,6 @@ if (empty($reshook))
$object->client = GETPOST('client');
$object->fournisseur = GETPOST('fournisseur');
$object->fournisseur_categorie = GETPOST('fournisseur_categorie');
$object->commercial_id = GETPOST('commercial_id');
$object->default_lang = GETPOST('default_lang');
@ -794,23 +793,6 @@ else
print $form->textwithpicto('',$s,1);
print '</td></tr></table>';
print '</td></tr>';
// Category
/* This must be set into category tab, like for customer category
if ($object->fournisseur)
{
$load = $object->LoadSupplierCateg();
if ( $load == 0)
{
if (count($object->SupplierCategories) > 0)
{
print '<tr>';
print '<td>'.$langs->trans('SupplierCategory').'</td><td colspan="3">';
print $form->selectarray("fournisseur_categorie",$object->SupplierCategories,GETPOST('fournisseur_categorie'),1);
print '</td></tr>';
}
}
}*/
}
// Status
@ -1256,22 +1238,6 @@ else
print '</td></tr></table>';
print '</td></tr>';
// Category
if (! empty($conf->categorie->enabled) && $object->fournisseur)
{
$load = $object->LoadSupplierCateg();
if ( $load == 0)
{
if (count($object->SupplierCategories) > 0)
{
print '<tr>';
print '<td>'.$langs->trans('SupplierCategory').'</td><td colspan="3">';
print $form->selectarray("fournisseur_categorie",$object->SupplierCategories,'',1);
print '</td></tr>';
}
}
}
}
// Barcode