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

develop

Conflicts:
	htdocs/install/mysql/migration/3.3.0-3.4.0.sql
This commit is contained in:
simnandez 2013-04-07 15:53:31 +02:00
commit 44bfc1db4a
6 changed files with 15 additions and 9 deletions

View File

@ -161,7 +161,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$sql.= " ORDER BY dlr ASC";
// Supplier invoices
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.facnumber as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
$sql2.= " s.rowid as socid, s.nom, s.fournisseur";
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -86,7 +86,7 @@ class box_factures_fourn extends ModeleBoxes
$now=dol_now();
$i = 0;
$l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)';
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
while ($i < $num)
{
@ -95,7 +95,7 @@ class box_factures_fourn extends ModeleBoxes
$datec=$db->jdate($objp->datec);
$late = '';
if ($objp->paye == 0 && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg,

View File

@ -198,7 +198,7 @@ elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->factur
{
$object->fetch($id);
$object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']);
if ($object->date_echeance < $object->date)
if (! empty($object->date_echeance) && $object->date_echeance < $object->date)
{
$object->date_echeance=$object->date;
setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings');

View File

@ -229,6 +229,6 @@ ALTER TABLE llx_societe ADD COLUMN note_public text after note;
ALTER TABLE llx_actioncomm ADD COLUMN transparency integer after fk_user_action;
ALTER TABLE llx_facture_fourn_det ADD COLUMN info_bits integer DEFAULT 0;
ALTER TABLE llx_facture_fourn_det ADD COLUMN info_bits integer DEFAULT 0;
INSERT INTO llx_c_action_trigger (rowid,code,label,description,elementtype,rang) VALUES (29,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',29);

View File

@ -378,12 +378,12 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
$modulesfile = array();
foreach ($conf->file->dol_document_root as $type => $dirroot)
{
$handlemodule=@opendir($dirroot);
$handlemodule=@opendir($dirroot); // $dirroot may be '..'
if (is_resource($handlemodule))
{
while (($filemodule = readdir($handlemodule))!==false)
{
if (is_dir($dirroot.'/'.$filemodule.'/sql'))
if (! preg_match('/\./',$filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) // We exclude filemodule that contains . (are not directories) and are not directories.
{
//print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file))

View File

@ -378,7 +378,13 @@ function getSupplierInvoicesForThirdParty($authentication,$idthirdparty)
$obj=$db->fetch_object($resql);
$invoice=new FactureFournisseur($db);
$invoice->fetch($obj->facid);
$result=$invoice->fetch($obj->facid);
if ($result < 0)
{
$error++;
$errorcode=$result; $errorlabel=$invoice->error;
break;
}
// Define lines of invoice
$linesresp=array();