Merge branch 'develop' into units
This commit is contained in:
commit
2967bc7df7
@ -90,6 +90,7 @@ before_script:
|
||||
- echo Install apache server
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-pgsql php5-intl
|
||||
- sudo apt-get install mysql-server-5.6 mysql-client-5.6
|
||||
- sudo sed -i -e "s,/var/www,$(pwd)/htdocs,g" /etc/apache2/sites-available/default
|
||||
- echo Show default virtual host
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
@ -111,8 +112,9 @@ script:
|
||||
- php upgrade.php 3.6.0 3.7.0 ignoredbversion > upgrade360370.log
|
||||
- php upgrade2.php 3.6.0 3.7.0 ignoredbversion > upgrade360370-2.log
|
||||
- php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log
|
||||
- cat upgrade370380.log
|
||||
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
||||
# - cat upgrade370380-2.log
|
||||
- cat upgrade370380-2.log
|
||||
- cd ../..
|
||||
- date
|
||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -218,5 +218,4 @@ if ($_REQUEST['unused'] == 'true') {
|
||||
print_r($unused);
|
||||
}
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
?>
|
||||
echo "</html>";
|
||||
@ -587,7 +587,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
$langs->load("order");
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total as total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv ";
|
||||
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande as c";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
|
||||
@ -2653,7 +2653,7 @@ if ($action == 'create')
|
||||
{
|
||||
$text .= '<br>' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive");
|
||||
}
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), ($conf->notification->enabled ? 0 : 2));
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2);
|
||||
}
|
||||
|
||||
// Confirm back to draft status
|
||||
|
||||
@ -448,7 +448,7 @@ class Conf
|
||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,askpricesupplier,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||
|
||||
// Enable select2
|
||||
if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT)) $this->global->MAIN_USE_JQUERY_MULTISELECT='select2';
|
||||
if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT)) $this->global->MAIN_USE_JQUERY_MULTISELECT='select2.min';
|
||||
|
||||
// Timeouts
|
||||
if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10;
|
||||
|
||||
@ -125,7 +125,7 @@ function bank_admin_prepare_head($object)
|
||||
function checkSwiftForAccount($account)
|
||||
{
|
||||
$swift = $account->bic;
|
||||
if (preg_march("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) {
|
||||
if (preg_match("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@ -258,7 +258,7 @@ class modFournisseur extends DolibarrModules
|
||||
$this->rights[$r][4] = 'commande';
|
||||
$this->rights[$r][5] = 'export';
|
||||
|
||||
if ($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL)
|
||||
if (! empty($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL))
|
||||
{
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1190;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
<form id="fileupload" action="<?php echo DOL_URL_ROOT; ?>/core/ajax/fileupload.php" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="fk_element" value="<?php echo $object->id; ?>">
|
||||
<input type="hidden" name="element" value="<?php echo $object->element; ?>">
|
||||
<input type="hidden" name="redirect" value="<?php echo $_SERVER['PHP_SELF'].'?id='.$object->id; ?>">
|
||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
||||
<div class="row fileupload-buttonbar">
|
||||
<div class="span7">
|
||||
|
||||
@ -71,7 +71,7 @@ if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeAr
|
||||
|
||||
llxHeader('',$title);
|
||||
|
||||
print_fiche_titre($langs->trans("HomeArea"));
|
||||
print_fiche_titre($langs->trans("HomeArea"),'','title_home');
|
||||
|
||||
if (! empty($conf->global->MAIN_MOTD))
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -535,6 +535,7 @@ CREATE TABLE IF NOT EXISTS llx_propal_merge_pdf_product (
|
||||
|
||||
-- Feature request: A page to merge two thirdparties into one #2613
|
||||
ALTER TABLE llx_categorie_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||
ALTER TABLE llx_categorie_fournisseur CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||
ALTER TABLE llx_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||
ALTER TABLE llx_user CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||
-- Units
|
||||
|
||||
@ -225,9 +225,9 @@ class Propalmergepdfproduct extends CommonObject
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $lang lang string id
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param int $product_id Id object
|
||||
* @param string $lang Lang string code
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetch_by_product($product_id, $lang='')
|
||||
{
|
||||
@ -637,7 +637,11 @@ class Propalmergepdfproduct extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
class PropalmergepdfproductLine{
|
||||
/**
|
||||
* Class to manage propal merge of product line
|
||||
*/
|
||||
class PropalmergepdfproductLine
|
||||
{
|
||||
var $id;
|
||||
|
||||
var $fk_product;
|
||||
|
||||
@ -64,7 +64,7 @@ print "</table></form><br>";
|
||||
$sql = "SELECT e.label, e.rowid, e.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " WHERE e.statut in (0,1)";
|
||||
$sql.= " AND e.entity = ".$conf->entity;
|
||||
$sql.= " AND e.entity IN (".getEntity('stock', 1).")";
|
||||
$sql.= $db->order('e.statut','DESC');
|
||||
$sql.= $db->plimit(15, 0);
|
||||
|
||||
@ -119,7 +119,7 @@ $sql.= ", ".MAIN_DB_PREFIX."stock_mouvement as m";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " WHERE m.fk_product = p.rowid";
|
||||
$sql.= " AND m.fk_entrepot = e.rowid";
|
||||
$sql.= " AND e.entity = ".$conf->entity;
|
||||
$sql.= " AND e.entity IN (".getEntity('stock', 1).")";
|
||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_type = 0";
|
||||
$sql.= $db->order("datem","DESC");
|
||||
$sql.= $db->plimit($max,0);
|
||||
|
||||
@ -58,7 +58,7 @@ $sql.= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellv
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON e.rowid = ps.fk_entrepot";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid";
|
||||
$sql.= " WHERE e.entity = ".$conf->entity;
|
||||
$sql.= " WHERE e.entity IN (".getEntity('stock', 1).")";
|
||||
if ($sref)
|
||||
{
|
||||
$sql.= " AND e.label LIKE '%".$db->escape($sref)."%'";
|
||||
|
||||
@ -133,7 +133,7 @@ $sql.= " ".MAIN_DB_PREFIX."stock_mouvement as m)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid";
|
||||
$sql.= " WHERE m.fk_product = p.rowid";
|
||||
$sql.= " AND m.fk_entrepot = e.rowid";
|
||||
$sql.= " AND e.entity = ".$conf->entity;
|
||||
$sql.= " AND e.entity IN (".getEntity('stock', 1).")";
|
||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_type = 0";
|
||||
if ($id)
|
||||
{
|
||||
|
||||
@ -849,7 +849,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."product_stock as ps";
|
||||
$sql.= " WHERE ps.reel != 0";
|
||||
$sql.= " AND ps.fk_entrepot = e.rowid";
|
||||
$sql.= " AND e.entity = ".$conf->entity;
|
||||
$sql.= " AND e.entity IN (".getEntity('stock', 1).")";
|
||||
$sql.= " AND ps.fk_product = ".$product->id;
|
||||
$sql.= " ORDER BY e.label";
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ $sql.= " SUM(ps.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sell
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON e.rowid = ps.fk_entrepot";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid";
|
||||
$sql.= " WHERE e.entity = ".$conf->entity;
|
||||
$sql.= " WHERE e.entity IN (".getEntity('stock', 1).")";
|
||||
if ($sref)
|
||||
{
|
||||
$sql.= " AND e.label LIKE '%".$db->escape($sref)."%'";
|
||||
|
||||
@ -416,8 +416,11 @@ if ($socid && $action != 'edit' && $action != "create")
|
||||
$var = !$var;
|
||||
}
|
||||
|
||||
if (count($rib_list) == 0) {
|
||||
print '<tr '.$bc[0].'><td colspan="7" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
|
||||
if (count($rib_list) == 0)
|
||||
{
|
||||
$colspan=7;
|
||||
if (! empty($conf->prelevement->enabled)) $colspan++;
|
||||
print '<tr '.$bc[0].'><td colspan="'.$colspan.'" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1000 B After Width: | Height: | Size: 1019 B |
Binary file not shown.
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 789 B |
BIN
htdocs/theme/eldy/img/title_home.png
Normal file
BIN
htdocs/theme/eldy/img/title_home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 721 B |
@ -550,6 +550,10 @@ display : table;
|
||||
margin : 0px auto;
|
||||
}
|
||||
|
||||
#pictotitle {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Menu top et 1ere ligne tableau */
|
||||
|
||||
@ -263,12 +263,12 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
||||
$result=$localobject->update($user);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
$result=$localobject->update_note($localobject->note);
|
||||
$result=$localobject->update_note($localobject->note,'_private');
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
$result=$localobject->update_note_public($localobject->note,'_public');
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
//$result=$localobject->update_note_public($localobject->note_public);
|
||||
//print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
//$this->assertLessThan($result, 0);
|
||||
|
||||
$newobject=new Adherent($this->savdb);
|
||||
$result=$newobject->fetch($localobject->id);
|
||||
@ -278,8 +278,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($localobject->civility_id, $newobject->civility_id);
|
||||
$this->assertEquals($localobject->login, $newobject->login);
|
||||
$this->assertEquals($localobject->societe, $newobject->societe);
|
||||
$this->assertEquals($localobject->note, $newobject->note);
|
||||
//$this->assertEquals($localobject->note_public, $newobject->note_public);
|
||||
$this->assertEquals($localobject->note_public, $newobject->note_public);
|
||||
$this->assertEquals($localobject->lastname, $newobject->lastname);
|
||||
$this->assertEquals($localobject->firstname, $newobject->firstname);
|
||||
$this->assertEquals($localobject->address, $newobject->address);
|
||||
|
||||
@ -142,4 +142,21 @@ class AdminLibTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* testEnableModule
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testEnableModule()
|
||||
{
|
||||
global $conf, $db, $langs, $user;
|
||||
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php';
|
||||
print "Enable module modExpenseReport";
|
||||
$moduledescriptor=new modExpenseReport($db);
|
||||
$moduledescriptor->init();
|
||||
$conf->setValues($db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -31,6 +31,8 @@ global $conf,$user,$langs,$db;
|
||||
//require_once 'PHPUnit/Autoload.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
|
||||
|
||||
|
||||
if ($langs->defaultlang != 'en_US')
|
||||
{
|
||||
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
||||
@ -61,6 +63,7 @@ class AllTests
|
||||
*/
|
||||
public static function suite()
|
||||
{
|
||||
|
||||
$suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
|
||||
|
||||
//require_once dirname(__FILE__).'/CoreTest.php';
|
||||
|
||||
@ -56,6 +56,9 @@ require_once dirname(__FILE__).'/../../htdocs/core/modules/project/modules_proje
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/fichinter/modules_fichinter.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/expedition/modules_expedition.php';
|
||||
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php';
|
||||
|
||||
|
||||
if (empty($user->id)) {
|
||||
print "Load permissions for admin user nb 1\n";
|
||||
$user->fetch(1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user