Merge remote-tracking branch 'origin/3.4' into develop
Conflicts: htdocs/core/class/infobox.class.php
This commit is contained in:
commit
eadfa66f2c
10
ChangeLog
10
ChangeLog
@ -104,10 +104,12 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
||||
- If module use hook pdf_writelinedesc, module may have to add return 1 at end of
|
||||
function to keep same behaviour.
|
||||
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
|
||||
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
|
||||
|
||||
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
|
||||
|
||||
- Fix: Dutch (nl_NL) translation
|
||||
- Generalize fix: file with a specific mask not found, again
|
||||
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
|
||||
@ -136,8 +138,8 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
||||
- Fix: [ bug #788 ] Date of linked interventions are not shown
|
||||
- Fix: external users should not see costprice and margin infos
|
||||
- Fix: [ bug #806 ] Tasks are ordered alphabetically instead of chronological order
|
||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||
|
||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
||||
- Fix: Package for launchpad
|
||||
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
|
||||
@ -145,8 +147,6 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
||||
- Fix: [ bug #762 ] Bad profit calculation in Reporting
|
||||
- Fix: bug dictionnary with wrong prefix table
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
||||
For users:
|
||||
- New: Add holiday module, to declare and follow holidays of your employees.
|
||||
|
||||
@ -45,6 +45,7 @@ $startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -45,6 +45,7 @@ $startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -47,6 +47,7 @@ $startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -599,7 +599,7 @@ else
|
||||
|
||||
print '</table>';
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA))
|
||||
{
|
||||
print '<br>';
|
||||
/*
|
||||
@ -686,7 +686,7 @@ else
|
||||
$formmail->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test"));
|
||||
$formmail->withtopicreadonly=0;
|
||||
$formmail->withfile=2;
|
||||
$formmail->withbody=(isset($_POST['message'])?$_POST['message']:($action == 'testhtml'?$langs->trans("PredefinedMailTestHtml"):$langs->trans("PredefinedMailTest")));
|
||||
$formmail->withbody=(isset($_POST['message'])?$_POST['message']:($action == 'testhtml'?$langs->transnoentities("PredefinedMailTestHtml"):$langs->transnoentities("PredefinedMailTest")));
|
||||
$formmail->withbodyreadonly=0;
|
||||
$formmail->withcancel=1;
|
||||
$formmail->withdeliveryreceipt=1;
|
||||
|
||||
@ -217,7 +217,7 @@ else
|
||||
{
|
||||
$var=true;
|
||||
|
||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a target="_blank" href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
@ -668,7 +668,7 @@ if ($action == 'create')
|
||||
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
|
||||
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td width="25%" class="fieldrequired" valign="top">'.$langs->trans("MailMessage").'<br>';
|
||||
print '<tr><td width="25%" valign="top"><span class="fieldrequired">'.$langs->trans("MailMessage").'</span><br>';
|
||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||
foreach($object->substitutionarray as $key => $val)
|
||||
{
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
|
||||
@ -596,7 +596,7 @@ class FormMail
|
||||
if (!empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
|
||||
$this->withfckeditor=1;
|
||||
}
|
||||
$doleditor=new DolEditor('message',nl2br($defaultmessage),'',280,$this->ckeditortoolbar,'In',true,true,$this->withfckeditor,8,72);
|
||||
$doleditor=new DolEditor('message',$defaultmessage,'',280,$this->ckeditortoolbar,'In',true,true,$this->withfckeditor,8,72);
|
||||
$out.= $doleditor->Create(1);
|
||||
}
|
||||
$out.= "</td></tr>\n";
|
||||
|
||||
@ -87,13 +87,13 @@ class InfoBox
|
||||
{
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$obj->file,$regs))
|
||||
{
|
||||
$boxname = preg_replace('/.php$/i','',$regs[1]);
|
||||
$boxname = preg_replace('/\.php$/i','',$regs[1]);
|
||||
$module = $regs[2];
|
||||
$relsourcefile = "/".$module."/core/boxes/".$boxname.".php";
|
||||
}
|
||||
else
|
||||
{
|
||||
$boxname=preg_replace('/.php$/i','',$obj->file);
|
||||
$boxname=preg_replace('/\.php$/i','',$obj->file);
|
||||
$relsourcefile = "/core/boxes/".$boxname.".php";
|
||||
}
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ class modOpenSurvey extends DolibarrModules
|
||||
|
||||
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
||||
// Example:
|
||||
$this->rights[$r][0] = 55000; // Permission id (must not be already used)
|
||||
$this->rights[$r][0] = 55001; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Read surveys'; // Permission label
|
||||
$this->rights[$r][2] = 'r'; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
@ -116,7 +116,7 @@ class modOpenSurvey extends DolibarrModules
|
||||
|
||||
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
||||
// Example:
|
||||
$this->rights[$r][0] = 55001; // Permission id (must not be already used)
|
||||
$this->rights[$r][0] = 55002; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Create/modify surveys'; // Permission label
|
||||
$this->rights[$r][2] = 'w'; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
|
||||
@ -51,7 +51,6 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
|
||||
--
|
||||
-- IHM
|
||||
--
|
||||
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SHOW_WORKBOARD','1','yesno','Affichage tableau de bord de travail Dolibarr',0,0);
|
||||
|
||||
@ -62,7 +61,7 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT
|
||||
|
||||
|
||||
--
|
||||
-- Delai tolerance
|
||||
-- Warning delays
|
||||
--
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_DELAY_ACTIONS_TODO','7','chaine','Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées',0);
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_DELAY_ORDERS_TO_PROCESS','2','chaine','Tolérance de retard avant alerte (en jours) sur commandes clients non traitées',0);
|
||||
@ -77,13 +76,8 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_DELAY_MEM
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE','62','chaine','Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire',0);
|
||||
|
||||
|
||||
--
|
||||
-- Tiers
|
||||
--
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('SOCIETE_NOLIST_COURRIER','1','yesno','Liste les fichiers du repertoire courrier',0,0);
|
||||
|
||||
|
||||
--
|
||||
-- Mail Mailing
|
||||
--
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_FIX_FOR_BUGGED_MTA','1','chaine','Set constant to fix email ending from PHP with some linux ike system',1);
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAILING_EMAIL_FROM','dolibarr@domain.com','chaine','EMail emmetteur pour les envois d emailings',0);
|
||||
|
||||
@ -80,8 +80,8 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values
|
||||
UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid);
|
||||
|
||||
|
||||
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid
|
||||
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note)
|
||||
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid;
|
||||
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note);
|
||||
|
||||
|
||||
-- Requests to clean old tables or fields
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
# Dolibarr language file - es_MX - banks
|
||||
CHARSET=UTF-8
|
||||
IBAN=CLAVE Interbancaria
|
||||
BIC=Sucursal
|
||||
BankAccountDomiciliation=Tarjeta
|
||||
@ -23,6 +23,4 @@ TerreNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las f
|
||||
AddCreditNote=Crear nota de crédito
|
||||
BillTo=Receptor
|
||||
Residence=Tarjeta
|
||||
IBANNumber=CLAVE Interbancaria
|
||||
BICNumber=Sucursal
|
||||
PaymentByTransferOnThisBankAccount=Cuenta para depositos y transferencias
|
||||
@ -2169,13 +2169,13 @@ class Product extends CommonObject
|
||||
'fullpath' => $compl_path.$label, // Label
|
||||
'type'=>$type // Nb of units that compose parent product
|
||||
);
|
||||
}
|
||||
|
||||
// Recursive call if child is an array
|
||||
if (is_array($desc_pere['childs']))
|
||||
{
|
||||
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
|
||||
$this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1);
|
||||
// Recursive call if child is an array
|
||||
if (is_array($desc_pere['childs']))
|
||||
{
|
||||
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
|
||||
$this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1);
|
||||
|
||||
if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
||||
{
|
||||
print $langs->trans("Auto subscription form for public visitors has no been enabled");
|
||||
print $langs->trans("Auto subscription form for public visitors has not been enabled");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -79,4 +79,12 @@ CKEDITOR.editorConfig = function( config )
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||
['SpecialChar']
|
||||
];
|
||||
|
||||
// Used for mailing fields
|
||||
config.toolbar_dolibarr_readonly =
|
||||
[
|
||||
['Source','Maximize'],
|
||||
['Find']
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
@ -79,4 +79,12 @@ CKEDITOR.editorConfig = function( config )
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||
['Link','Unlink','SpecialChar']
|
||||
];
|
||||
|
||||
// Used for mailing fields
|
||||
config.toolbar_dolibarr_readonly =
|
||||
[
|
||||
['Source','Maximize'],
|
||||
['Find']
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
@ -79,4 +79,12 @@ CKEDITOR.editorConfig = function( config )
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||
['Link','Unlink','SpecialChar']
|
||||
];
|
||||
|
||||
// Used for mailing fields
|
||||
config.toolbar_dolibarr_readonly =
|
||||
[
|
||||
['Source','Maximize'],
|
||||
['Find']
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
@ -79,4 +79,11 @@ CKEDITOR.editorConfig = function( config )
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||
['Link','Unlink','SpecialChar']
|
||||
];
|
||||
|
||||
// Used for mailing fields
|
||||
config.toolbar_dolibarr_readonly =
|
||||
[
|
||||
['Source','Maximize'],
|
||||
['Find']
|
||||
];
|
||||
};
|
||||
|
||||
@ -919,19 +919,20 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
|
||||
margin: 1px 0px 8px 2px;
|
||||
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 8px);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 8px);
|
||||
/* background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 90%, rgb(<?php echo $colorbacktab2; ?>) 100%); */
|
||||
background-image: -webkit-linear-gradient(right, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 8px);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 8px);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 8px);
|
||||
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 3px);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 3px);
|
||||
background-image: -webkit-linear-gradient(right, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 3px);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 3px);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab2; ?>) 0px, rgb(<?php echo $colorbacktab1; ?>) 3px);
|
||||
|
||||
<?php } else { ?>
|
||||
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/tmenu.jpg',1); ?>);
|
||||
background-position:top;
|
||||
background-repeat:repeat-x;
|
||||
<?php } ?>
|
||||
border-left: 1px solid #CCCCCC;
|
||||
border-right: 1px solid #DDDDDD;
|
||||
border-right: 1px solid #D0D0D0;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
border-top: 1px solid #DDDDDD;
|
||||
border-radius: 5px;
|
||||
@ -1874,19 +1875,20 @@ div.ok {
|
||||
}
|
||||
|
||||
div.warning {
|
||||
color: #997711;
|
||||
padding: 0.2em 0.2em 0.2em 0.2em;
|
||||
color: #504020;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #e0e0d0;
|
||||
border: 1px solid #e0d0b0;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
background: #efefd4;
|
||||
background: #FFEF9A;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
div.error {
|
||||
color: #550000; font-weight: bold;
|
||||
padding: 0.2em 0.2em 0.2em 0.2em;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #DC9CAB;
|
||||
-moz-border-radius:6px;
|
||||
@ -1897,14 +1899,15 @@ div.error {
|
||||
|
||||
/* Info admin */
|
||||
div.info {
|
||||
color: #807050;
|
||||
color: #302010;
|
||||
padding: 0.4em 0.4em 0.4em 0.4em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #DFDFA0;
|
||||
border: 1px solid #DFBF9A;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius:6px;
|
||||
background: #EFEFBA;
|
||||
background: #EFCFAA;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ global $conf,$user,$langs,$db;
|
||||
require_once 'PHPUnit/Autoload.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent_type.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
@ -115,11 +116,39 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* testAdherentCreate
|
||||
* testAdherentTypeCreate
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testAdherentCreate()
|
||||
public function testAdherentTypeCreate()
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
$conf=$this->savconf;
|
||||
$user=$this->savuser;
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
$localobject=new AdherentType($this->savdb);
|
||||
$localobject->statut=1;
|
||||
$localobject->libelle='Adherent type test';
|
||||
$localobject->cotisation=1;
|
||||
$localobject->vote=1;
|
||||
$result=$localobject->create($user);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
return $localobject->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* testAdherentCreate
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @depends testAdherentTypeCreate
|
||||
* The depends says test is run only if previous is ok
|
||||
*/
|
||||
public function testAdherentCreate($fk_adherent_type)
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
$conf=$this->savconf;
|
||||
@ -129,6 +158,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$localobject=new Adherent($this->savdb);
|
||||
$localobject->initAsSpecimen();
|
||||
$localobject->typeid=$fk_adherent_type;
|
||||
$result=$localobject->create($user);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
@ -131,12 +131,12 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
// Set supplier and product to use
|
||||
$socid=1;
|
||||
$prodid=1;
|
||||
$societe=new Societe($db);
|
||||
$societe->fetch($socid);
|
||||
$product=new ProductFournisseur($db);
|
||||
$product->fetch($prodid);
|
||||
|
||||
$product->fetch(0,'PIDRESS');
|
||||
if ($product->id <= 0) { print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); }
|
||||
|
||||
$quantity=10;
|
||||
$ref_fourn='SUPPLIER_REF_PHPUNIT';
|
||||
$tva_tx=19.6;
|
||||
|
||||
@ -613,7 +613,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||
$vat1=get_default_localtax($companyes,$companyes,1,0);
|
||||
$vat2=get_default_localtax($companyes,$companyes,2,0);
|
||||
$this->assertEquals(5.2,$vat1);
|
||||
$this->assertEquals(-15,$vat2);
|
||||
$this->assertEquals(-21,$vat2);
|
||||
|
||||
// Test RULE ES-IT
|
||||
$vat1=get_default_localtax($companyes,$companyit,1,0);
|
||||
|
||||
@ -129,11 +129,16 @@ class PdfDocTest extends PHPUnit_Framework_TestCase
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
$localproduct=new Product($this->savdb);
|
||||
$localproduct->fetch(0,'PIDRESS');
|
||||
$product_id=$localproduct->id;
|
||||
if ($product_id <= 0) { print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); }
|
||||
|
||||
$localobject=new Facture($this->savdb);
|
||||
$localobject->initAsSpecimen();
|
||||
$localobject->lines=array();
|
||||
$localobject->lines[0]=new FactureLigne($this->savdb);
|
||||
$localobject->lines[0]->fk_product=1;
|
||||
$localobject->lines[0]->fk_product=$product_id;
|
||||
$localobject->lines[0]->label='Label 1';
|
||||
$localobject->lines[0]->desc="This is a description with a é accent\n(Country of origin: France)";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user