Fix regression

This commit is contained in:
Laurent Destailleur 2016-05-18 18:23:38 +02:00
parent 7f06e1780f
commit b1bd6b5d6e
2 changed files with 10 additions and 10 deletions

View File

@ -165,11 +165,11 @@ class modBanque extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Bordereaux remise Chq/Fact';
$this->export_permission[$r]=array(array("banque","export"));
$this->export_fields_array[$r]=array("bch.rowid"=>"DepositId","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
$this->export_fields_array[$r]=array("bch.rowid"=>"DepositId","bch.ref"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
"bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","f.facnumber"=>"InvoiceRef"
);
$this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Numeric','b.num_releve'=>'Text','b.datec'=>"Date",
"bch.date_bordereau"=>"Date","bch.rowid"=>"Numeric","bch.number"=>"Numeric","bch.ref_ext"=>"Text","bch.amount"=>"Numeric","bch.nbcheque"=>"Numeric","bu.url_id"=>"Text","s.nom"=>"Text","f.facnumber"=>"Text"
"bch.date_bordereau"=>"Date","bch.rowid"=>"Numeric","bch.ref"=>"Numeric","bch.ref_ext"=>"Text","bch.amount"=>"Numeric","bch.nbcheque"=>"Numeric","bu.url_id"=>"Text","s.nom"=>"Text","f.facnumber"=>"Text"
);
$this->export_entities_array[$r]=array('ba.ref'=>'account','ba.label'=>'account','b.datev'=>'account','b.num_chq'=>'account','b.amount'=>'account','b.num_releve'=>'account','b.datec'=>"account",
"bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"invoice");

View File

@ -149,21 +149,21 @@ class ExportTest extends PHPUnit_Framework_TestCase
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
$model='tsv';
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
$model='excel';
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
return true;
}
@ -200,21 +200,21 @@ class ExportTest extends PHPUnit_Framework_TestCase
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
$model='tsv';
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
$model='excel';
// Build export file
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql);
$expectedresult=1;
$this->assertEquals($result,$expectedresult);
$this->assertEquals($expectedresult,$result);
*/
return true;
}
@ -259,9 +259,9 @@ class ExportTest extends PHPUnit_Framework_TestCase
$sql = "";
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($result, $expectedresult, 'Call build_file to export '.$exportfile.' failed');
$this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed');
$result=dol_is_file($exportfile);
$this->assertTrue($result, $expectedresult, 'File '.$exportfile.' not found');
$this->assertTrue($result, 'File '.$exportfile.' not found');
}
return true;