Merge remote-tracking branch 'origin/4.0' into develop

This commit is contained in:
Laurent Destailleur
2016-07-16 19:58:36 +02:00
22 changed files with 5219 additions and 54 deletions

View File

@@ -13,7 +13,7 @@ Architecture: all
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
php5-cli, php5-cli,
# Required PHP extensions # Required PHP extensions
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip, php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
# Required PHP libraries # Required PHP libraries
php-pear, php-mail-mime, php-pear, php-mail-mime,
# php-tcpdf, libfpdi-php, # php-tcpdf, libfpdi-php,
@@ -31,10 +31,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
${misc:Depends}, ${misc:Depends},
${perl:Depends} ${perl:Depends}
Recommends: apache2 | lighttpd | httpd Recommends: apache2 | lighttpd | httpd
Suggests: www-browser Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software for small Dolibarr ERP & CRM is an easy to use open source/free software package for
and medium companies, foundations or freelances. It includes different companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities. Management (CRM) but also for different other activities.
. .

View File

@@ -31,8 +31,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]); //$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php"); require (__DIR__. '/../../htdocs/master.inc.php');
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]); //$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php"); require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]); //$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php"); require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]); //$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php"); require (__DIR__. '/../../htdocs/master.inc.php');
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]); //$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php"); require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -372,7 +372,6 @@ else
dol_print_error($db); dol_print_error($db);
} }
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';

View File

@@ -197,7 +197,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
else else
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoProposal").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
@@ -277,7 +277,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
else else
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoProposal").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
@@ -357,7 +357,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
else else
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoOrder").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoOrder").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
@@ -438,7 +438,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
else else
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoSupplierOrder").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSupplierOrder").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";

View File

@@ -199,7 +199,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
} }
else else
{ {
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
$db->free($resql); $db->free($resql);
@@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
} }
else else
{ {
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
$db->free($resql); $db->free($resql);
@@ -387,7 +387,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{ {
$colspan=5; $colspan=5;
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print '</table><br>'; print '</table><br>';
$db->free($resql); $db->free($resql);
@@ -474,7 +474,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
{ {
$colspan=5; $colspan=5;
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print '</table><br>'; print '</table><br>';
} }
@@ -842,7 +842,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{ {
$colspan=6; $colspan=6;
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print '</table><br>'; print '</table><br>';
$db->free($resql); $db->free($resql);
@@ -942,7 +942,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
{ {
$colspan=6; $colspan=6;
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>'; print '<tr '.$bc[$var].'><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
} }
print '</table><br>'; print '</table><br>';
} }

View File

@@ -4262,7 +4262,8 @@ class Form
} }
// Now we get list // Now we get list
$num = $this->load_cache_vatrates($code_country); $num = $this->load_cache_vatrates($code_country); // If no vat defined, return -1 with message into this->error
if ($num > 0) if ($num > 0)
{ {
// Definition du taux a pre-selectionner (si defaulttx non force et donc vaut -1 ou '') // Definition du taux a pre-selectionner (si defaulttx non force et donc vaut -1 ou '')

View File

@@ -1129,6 +1129,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
if ($formatwithoutreduce != $format) { $format = $formatwithoutreduce; $reduceformat=1; } // so format 'dayreduceformat' is processed like day if ($formatwithoutreduce != $format) { $format = $formatwithoutreduce; $reduceformat=1; } // so format 'dayreduceformat' is processed like day
// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
// TODO Add format daysmallyear and dayhoursmallyear
if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short);
else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration);

View File

@@ -105,13 +105,13 @@ class pdf_standard extends ModeleExpenseReport
// Define position of columns // Define position of columns
$this->posxpiece=$this->marge_gauche+1; $this->posxpiece=$this->marge_gauche+1;
$this->posxcomment=$this->marge_gauche+10; $this->posxcomment=$this->marge_gauche+10;
$this->posxdate=80; $this->posxdate=88;
$this->posxtype=97; $this->posxtype=107;
$this->posxprojet=116; $this->posxprojet=126;
$this->posxtva=136; $this->posxtva=146;
$this->posxup=148; $this->posxup=158;
$this->posxqty=166; $this->posxqty=176;
$this->postotalttc=178; $this->postotalttc=188;
if (empty($conf->projet->enabled)) { if (empty($conf->projet->enabled)) {
$this->posxtva-=20; $this->posxtva-=20;
$this->posxup-=20; $this->posxup-=20;
@@ -324,7 +324,7 @@ class pdf_standard extends ModeleExpenseReport
// Date // Date
$pdf->SetXY($this->posxdate, $curY); $pdf->SetXY($this->posxdate, $curY);
$pdf->MultiCell($this->posxtype-$this->posxdate-0.8, 4,dol_print_date($object->lines[$i]->date,"day",false,$outputlangs), 0, 'C'); $pdf->MultiCell($this->posxtype-$this->posxdate-0.8, 4, dol_print_date($object->lines[$i]->date,"day",false,$outputlangs), 0, 'C');
// Type // Type
$pdf->SetXY($this->posxtype, $curY); $pdf->SetXY($this->posxtype, $curY);
@@ -352,7 +352,7 @@ class pdf_standard extends ModeleExpenseReport
// Quantity // Quantity
$pdf->SetXY($this->posxqty, $curY); $pdf->SetXY($this->posxqty, $curY);
$pdf->MultiCell($this->postotalttc-$this->posxqty-0.8, 4,$object->lines[$i]->qty, 0, 'C'); $pdf->MultiCell($this->postotalttc-$this->posxqty-0.8, 4,$object->lines[$i]->qty, 0, 'R');
// Total with all taxes // Total with all taxes
$pdf->SetXY($this->postotalttc-1, $curY); $pdf->SetXY($this->postotalttc-1, $curY);
@@ -423,6 +423,8 @@ class pdf_standard extends ModeleExpenseReport
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
} }
$pdf->SetFont('','', 10);
// Show total area box // Show total area box
$posy=$bottomlasttab+5;//$nexY+95; $posy=$bottomlasttab+5;//$nexY+95;
$pdf->SetXY(100, $posy); $pdf->SetXY(100, $posy);
@@ -574,7 +576,7 @@ class pdf_standard extends ModeleExpenseReport
// Status Expense Report // Status Expense Report
$posy+=6; $posy+=6;
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetFont('','B',18); $pdf->SetFont('','B', $default_font_size + 2);
$pdf->SetTextColor(111,81,124); $pdf->SetTextColor(111,81,124);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $object->getLibStatut(0), '', 'R'); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $object->getLibStatut(0), '', 'R');
@@ -814,7 +816,7 @@ class pdf_standard extends ModeleExpenseReport
if (empty($hidetop)) if (empty($hidetop))
{ {
$pdf->SetXY($this->posxqty-1, $tab_top+1); $pdf->SetXY($this->posxqty-1, $tab_top+1);
$pdf->MultiCell($this->postotalttc-$this->posxqty,2, $outputlangs->transnoentities("Qty"),'','R'); $pdf->MultiCell($this->postotalttc-$this->posxqty - 1,2, $outputlangs->transnoentities("Qty"),'','R');
} }
// Total with all taxes // Total with all taxes

View File

@@ -338,7 +338,7 @@ class modExpenseReport extends DolibarrModules
$sql = array( $sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard' AND entity = ".$conf->entity, "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard' AND entity = ".$conf->entity,
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard','deplacement',".$conf->entity.")" "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard','expensereport',".$conf->entity.")"
); );
return $this->_init($sql,$options); return $this->_init($sql,$options);

View File

@@ -1825,9 +1825,7 @@ else
print '<td style="text-align:right;">'; print '<td style="text-align:right;">';
$defaultvat=-1; $defaultvat=-1;
if (! empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none'; if (! empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
print '<select class="flat" name="vatrate">'; print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', false);
print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', true);
print '</select>';
print '</td>'; print '</td>';
// Unit price // Unit price

View File

@@ -429,7 +429,7 @@ if (! empty($holiday->holiday))
// Si il n'y a pas d'enregistrement suite à une recherche // Si il n'y a pas d'enregistrement suite à une recherche
if($holiday_payes == '2') if($holiday_payes == '2')
{ {
print '<tr>'; print '<tr '.$bc[false].'>';
print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>'; print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
print '</tr>'; print '</tr>';
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -74,6 +74,7 @@ DefaultLang=Language by default
VATIsUsed=VAT is used VATIsUsed=VAT is used
VATIsNotUsed=VAT is not used VATIsNotUsed=VAT is not used
CopyAddressFromSoc=Fill address with thirdparty address CopyAddressFromSoc=Fill address with thirdparty address
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
##### Local Taxes ##### ##### Local Taxes #####
LocalTax1IsUsed=Use second tax LocalTax1IsUsed=Use second tax
LocalTax1IsUsedES= RE is used LocalTax1IsUsedES= RE is used

View File

@@ -145,10 +145,11 @@ if ($object->client)
if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->transnoentitiesnoconv('Proposals'); if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->transnoentitiesnoconv('Proposals');
if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->transnoentitiesnoconv('Orders'); if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->transnoentitiesnoconv('Orders');
if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->transnoentitiesnoconv('Invoices'); if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->transnoentitiesnoconv('Invoices');
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract']=$langs->transnoentitiesnoconv('Contracts'); if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract']=$langs->transnoentitiesnoconv('Contracts');
} }
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
if ($object->fournisseur) if ($object->fournisseur)
{ {
print '<tr><td class="titlefield">'; print '<tr><td class="titlefield">';
@@ -318,8 +319,16 @@ if (!empty($sql_select))
//print $sql; //print $sql;
} }
$disabled=0;
$showempty=2;
if (empty($elementTypeArray) && ! $object->client && ! $object->fournisseur)
{
$showempty=$langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef");
$disabled=1;
}
// Define type of elements // Define type of elements
$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), 2); $typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled);
$button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; $button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
$param="&amp;sref=".$sref."&amp;month=".$month."&amp;year=".$year."&amp;sprod_fulldescr=".$sprod_fulldescr."&amp;socid=".$socid."&amp;type_element=".$type_element; $param="&amp;sref=".$sref."&amp;month=".$month."&amp;year=".$year."&amp;sprod_fulldescr=".$sprod_fulldescr."&amp;socid=".$socid."&amp;type_element=".$type_element;

View File

@@ -1918,6 +1918,12 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
background-image: none !important; background-image: none !important;
} }
.tabunactive { /* We add some border on tabunactive to avoid change of position of title when switching tabs (border of tabunactive = border of tabactive) */
border-right: 1px solid rgb(<?php echo $colorbackbody; ?>);
border-left: 1px solid rgb(<?php echo $colorbackbody; ?>);
}
.tabactive, a.tab#active { .tabactive, a.tab#active {
color: #<?php echo $colortextbacktab; ?> !important; color: #<?php echo $colortextbacktab; ?> !important;
background: rgb(<?php echo $colorbacktabcard1; ?>) !important; background: rgb(<?php echo $colorbacktabcard1; ?>) !important;
@@ -2159,7 +2165,7 @@ div.tabBar table.border tr {
table.border td, div.border div div.tagtd { table.border td, div.border div div.tagtd {
padding: 2px 2px 2px 2px; padding: 2px 2px 2px 2px;
border: 1px solid #f4f4f4; border: 1px solid #f0f0f0;
border-collapse: collapse; border-collapse: collapse;
} }

View File

@@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -412,7 +413,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
$error=0; $error=0;
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel); $fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
if ($fuser->societe_id) $socid=$fuser->societe_id; if ($fuser->socid) $socid=$fuser->socid;
// Check parameters // Check parameters
if (! $error && empty($idthirdparty)) if (! $error && empty($idthirdparty))
@@ -425,7 +426,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
{ {
$linesinvoice=array(); $linesinvoice=array();
$sql.='SELECT f.rowid as facid, facnumber as ref, ref_ext, type, fk_statut as status, total_ttc, total, tva'; $sql ='SELECT f.rowid as facid, facnumber as ref, ref_ext, type, fk_statut as status, total_ttc, total, tva';
$sql.=' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql.=' FROM '.MAIN_DB_PREFIX.'facture as f';
$sql.=" WHERE f.entity = ".$conf->entity; $sql.=" WHERE f.entity = ".$conf->entity;
if ($idthirdparty != 'all' ) $sql.=" AND f.fk_soc = ".$db->escape($idthirdparty); if ($idthirdparty != 'all' ) $sql.=" AND f.fk_soc = ".$db->escape($idthirdparty);
@@ -660,7 +661,7 @@ function createInvoice($authentication,$invoice)
function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='', function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='',
$id_invoice='', $ref_invoice='', $ref_ext_invoice='') $id_invoice='', $ref_invoice='', $ref_ext_invoice='')
{ {
global $db,$conf,$langs; global $db,$conf;
$now=dol_now(); $now=dol_now();
@@ -674,6 +675,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re
$errorcode='';$errorlabel=''; $errorcode='';$errorlabel='';
$error=0; $error=0;
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel); $fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
if ($fuser->socid) $socid=$fuser->socid;
// Check parameters // Check parameters
if (empty($id_order) && empty($ref_order) && empty($ref_ext_order)) { if (empty($id_order) && empty($ref_order) && empty($ref_ext_order)) {
@@ -690,7 +692,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re
if ($fuser->rights->commande->lire) if ($fuser->rights->commande->lire)
{ {
$order=new Commande($db); $order=new Commande($db);
$result=$order->fetch($id,$ref,$ref_ext); $result=$order->fetch($id_order,$ref_order,$ref_ext_order);
if ($result > 0) if ($result > 0)
{ {
// Security for external user // Security for external user

View File

@@ -399,4 +399,23 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
print __METHOD__." result=".join(',',$result)."\n"; print __METHOD__." result=".join(',',$result)."\n";
$this->assertEquals(0,count($result)); $this->assertEquals(0,count($result));
} }
/**
* testDolDirList
*
* @return string
*
* @depends testDolCompressUnCompress
* The depends says test is run only if previous is ok
*/
public function testDolDirList()
{
global $conf,$user,$langs,$db;
// Scan dir to guaruante we on't have library jquery twice (we accept exception of duplicte into ckeditor because all dir is removed for debian package, so there is no duplicate).
$founddirs=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.js', array('ckeditor'));
print __METHOD__." count(founddirs)=".count($founddirs)."\n";
$this->assertEquals(1,count($founddirs));
}
} }