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

This commit is contained in:
Laurent Destailleur 2012-10-17 13:12:02 +02:00
commit 0dffe08c07
7 changed files with 14 additions and 12 deletions

View File

@ -136,7 +136,7 @@ if ($filter == 'uptodate')
} }
if ($filter == 'outofdate') if ($filter == 'outofdate')
{ {
$sql.=" AND datefin < '".$db->idate($now)."'"; $sql.=" AND (datefin IS NULL OR datefin < '".$db->idate($now)."')";
} }
// Count total nb of records with no order and no limits // Count total nb of records with no order and no limits

View File

@ -62,6 +62,7 @@ if ($id || $ref)
$elementtype = 'fournisseur'; $elementtype = 'fournisseur';
$objecttype = 'societe&categorie'; $objecttype = 'societe&categorie';
$objectid = isset($id)?$id:(isset($socid)?$socid:''); $objectid = isset($id)?$id:(isset($socid)?$socid:'');
$dbtablename = '&societe';
$fieldid = 'rowid'; $fieldid = 'rowid';
} }
elseif ($type == 2) { elseif ($type == 2) {
@ -537,4 +538,4 @@ function formCategory($db,$object,$typeid,$socid=0)
llxFooter(); llxFooter();
$db->close(); $db->close();
?> ?>

View File

@ -220,7 +220,7 @@ foreach ($tabfac as $key => $val)
print "</td><td>".$langs->trans("ThirdParty"); print "</td><td>".$langs->trans("ThirdParty");
print ' ('.$companystatic->getNomUrl(0,'supplier',16).')'; print ' ('.$companystatic->getNomUrl(0,'supplier',16).')';
print "</td>"; print "</td>";
print '<td align="right">'.($mt<0?-price(-$mt):'')."</td>"; print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
print '<td align="right">'.($mt>=0?price($mt):'')."</td>"; print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
} }
print "</tr>"; print "</tr>";

View File

@ -59,13 +59,14 @@ class FormFile
* @param int $size Length of input file area * @param int $size Length of input file area
* @param Object $object Object to use (when attachment is done on an element) * @param Object $object Object to use (when attachment is done on an element)
* @param string $options Options * @param string $options Options
* @param boolean $useajax Use ajax if enabled
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='') function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=true)
{ {
global $conf,$langs; global $conf,$langs;
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)) if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax)
{ {
return $this->_formAjaxFileUpload($object); return $this->_formAjaxFileUpload($object);
} }

View File

@ -44,7 +44,7 @@ $action = GETPOST('action');
// Security check // Security check
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int')); $id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
if ($user->societe_id) $id=$user->societe_id; if ($user->societe_id) $id=$user->societe_id;
$result = restrictedArea($user, 'societe&fournisseur', $id, ''); $result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
$object = new Fournisseur($db); $object = new Fournisseur($db);
@ -403,10 +403,10 @@ if ($object->fetch($id))
// List of contacts // List of contacts
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id); show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
} }
// Addresses list // Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB)) if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
{ {
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id); $result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
} }

View File

@ -213,7 +213,7 @@ print_fiche_titre($langs->trans("CompanySetup"),$linkback,'setup');
$head = societe_admin_prepare_head(null); $head = societe_admin_prepare_head(null);
dol_fiche_head($head, 'general', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), 0, 'company');
dol_htmloutput_mesg($mesg); dol_htmloutput_mesg($mesg);

View File

@ -70,7 +70,7 @@ print_fiche_titre($langs->trans("CompanySetup"),$linkback,'setup');
$head = societe_admin_prepare_head(null); $head = societe_admin_prepare_head(null);
dol_fiche_head($head, 'attributes', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), 0, 'company');
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n"; print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";