forked from Wavyzz/dolibarr
Merge remote-tracking branch 'origin/4.0' into develop
This commit is contained in:
@@ -13,7 +13,7 @@ Architecture: all
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-cli,
|
||||
# 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
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf, libfpdi-php,
|
||||
@@ -31,10 +31,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: apache2 | lighttpd | httpd
|
||||
Suggests: www-browser
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
.
|
||||
|
||||
@@ -31,8 +31,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.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.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.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.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.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."/commande/class/commande.class.php");
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.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.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@@ -372,7 +372,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
|
||||
@@ -197,7 +197,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
else
|
||||
{
|
||||
$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>";
|
||||
|
||||
@@ -277,7 +277,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
||||
else
|
||||
{
|
||||
$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>";
|
||||
|
||||
@@ -357,7 +357,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
else
|
||||
{
|
||||
$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>";
|
||||
|
||||
@@ -438,7 +438,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
||||
else
|
||||
{
|
||||
$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>";
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
}
|
||||
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>";
|
||||
$db->free($resql);
|
||||
@@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
}
|
||||
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>";
|
||||
$db->free($resql);
|
||||
@@ -387,7 +387,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$colspan=5;
|
||||
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>';
|
||||
$db->free($resql);
|
||||
@@ -474,7 +474,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$colspan=5;
|
||||
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>';
|
||||
}
|
||||
@@ -842,7 +842,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$colspan=6;
|
||||
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>';
|
||||
$db->free($resql);
|
||||
@@ -942,7 +942,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$colspan=6;
|
||||
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>';
|
||||
}
|
||||
|
||||
@@ -4262,7 +4262,8 @@ class Form
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
// Definition du taux a pre-selectionner (si defaulttx non force et donc vaut -1 ou '')
|
||||
|
||||
@@ -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
|
||||
|
||||
// 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);
|
||||
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);
|
||||
|
||||
@@ -105,13 +105,13 @@ class pdf_standard extends ModeleExpenseReport
|
||||
// Define position of columns
|
||||
$this->posxpiece=$this->marge_gauche+1;
|
||||
$this->posxcomment=$this->marge_gauche+10;
|
||||
$this->posxdate=80;
|
||||
$this->posxtype=97;
|
||||
$this->posxprojet=116;
|
||||
$this->posxtva=136;
|
||||
$this->posxup=148;
|
||||
$this->posxqty=166;
|
||||
$this->postotalttc=178;
|
||||
$this->posxdate=88;
|
||||
$this->posxtype=107;
|
||||
$this->posxprojet=126;
|
||||
$this->posxtva=146;
|
||||
$this->posxup=158;
|
||||
$this->posxqty=176;
|
||||
$this->postotalttc=188;
|
||||
if (empty($conf->projet->enabled)) {
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
@@ -324,7 +324,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
// Date
|
||||
$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
|
||||
$pdf->SetXY($this->posxtype, $curY);
|
||||
@@ -352,7 +352,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
// Quantity
|
||||
$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
|
||||
$pdf->SetXY($this->postotalttc-1, $curY);
|
||||
@@ -423,6 +423,8 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
$pdf->SetFont('','', 10);
|
||||
|
||||
// Show total area box
|
||||
$posy=$bottomlasttab+5;//$nexY+95;
|
||||
$pdf->SetXY(100, $posy);
|
||||
@@ -574,7 +576,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
// Status Expense Report
|
||||
$posy+=6;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFont('','B',18);
|
||||
$pdf->SetFont('','B', $default_font_size + 2);
|
||||
$pdf->SetTextColor(111,81,124);
|
||||
$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))
|
||||
{
|
||||
$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
|
||||
|
||||
@@ -338,7 +338,7 @@ class modExpenseReport extends DolibarrModules
|
||||
|
||||
$sql = array(
|
||||
"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);
|
||||
|
||||
@@ -1825,9 +1825,7 @@ else
|
||||
print '<td style="text-align:right;">';
|
||||
$defaultvat=-1;
|
||||
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, '', true);
|
||||
print '</select>';
|
||||
print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', false);
|
||||
print '</td>';
|
||||
|
||||
// Unit price
|
||||
|
||||
@@ -429,7 +429,7 @@ if (! empty($holiday->holiday))
|
||||
// Si il n'y a pas d'enregistrement suite à une recherche
|
||||
if($holiday_payes == '2')
|
||||
{
|
||||
print '<tr>';
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
5132
htdocs/includes/jquery/plugins/layout/jquery.layout.js
Normal file
5132
htdocs/includes/jquery/plugins/layout/jquery.layout.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,7 @@ DefaultLang=Language by default
|
||||
VATIsUsed=VAT is used
|
||||
VATIsNotUsed=VAT is not used
|
||||
CopyAddressFromSoc=Fill address with thirdparty address
|
||||
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
|
||||
##### Local Taxes #####
|
||||
LocalTax1IsUsed=Use second tax
|
||||
LocalTax1IsUsedES= RE is used
|
||||
|
||||
@@ -145,10 +145,11 @@ if ($object->client)
|
||||
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->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->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
|
||||
|
||||
if ($object->fournisseur)
|
||||
{
|
||||
print '<tr><td class="titlefield">';
|
||||
@@ -318,8 +319,16 @@ if (!empty($sql_select))
|
||||
//print $sql;
|
||||
}
|
||||
|
||||
$disabled=0;
|
||||
$showempty=2;
|
||||
if (empty($elementTypeArray) && ! $object->client && ! $object->fournisseur)
|
||||
{
|
||||
$showempty=$langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef");
|
||||
$disabled=1;
|
||||
}
|
||||
|
||||
// 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")).'">';
|
||||
$param="&sref=".$sref."&month=".$month."&year=".$year."&sprod_fulldescr=".$sprod_fulldescr."&socid=".$socid."&type_element=".$type_element;
|
||||
|
||||
|
||||
@@ -1918,6 +1918,12 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
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 {
|
||||
color: #<?php echo $colortextbacktab; ?> !important;
|
||||
background: rgb(<?php echo $colorbacktabcard1; ?>) !important;
|
||||
@@ -2159,7 +2165,7 @@ div.tabBar table.border tr {
|
||||
|
||||
table.border td, div.border div div.tagtd {
|
||||
padding: 2px 2px 2px 2px;
|
||||
border: 1px solid #f4f4f4;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -412,7 +413,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
|
||||
$error=0;
|
||||
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
|
||||
|
||||
if ($fuser->societe_id) $socid=$fuser->societe_id;
|
||||
if ($fuser->socid) $socid=$fuser->socid;
|
||||
|
||||
// Check parameters
|
||||
if (! $error && empty($idthirdparty))
|
||||
@@ -425,7 +426,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
|
||||
{
|
||||
$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.=" WHERE f.entity = ".$conf->entity;
|
||||
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='',
|
||||
$id_invoice='', $ref_invoice='', $ref_ext_invoice='')
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
global $db,$conf;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@@ -674,6 +675,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re
|
||||
$errorcode='';$errorlabel='';
|
||||
$error=0;
|
||||
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
|
||||
if ($fuser->socid) $socid=$fuser->socid;
|
||||
|
||||
// Check parameters
|
||||
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)
|
||||
{
|
||||
$order=new Commande($db);
|
||||
$result=$order->fetch($id,$ref,$ref_ext);
|
||||
$result=$order->fetch($id_order,$ref_order,$ref_ext_order);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Security for external user
|
||||
|
||||
@@ -399,4 +399,23 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
|
||||
print __METHOD__." result=".join(',',$result)."\n";
|
||||
$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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user