Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4
This commit is contained in:
commit
650158dd59
10
ChangeLog
10
ChangeLog
@ -88,10 +88,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
|
||||
@ -120,8 +122,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
|
||||
@ -129,8 +131,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>';
|
||||
|
||||
@ -55,7 +55,7 @@ $specimenthirdparty->initAsSpecimen();
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconstorder=GETPOST('maskconstorder','alpha');
|
||||
$maskvalue=GETPOST('maskvalue','alpha');
|
||||
$maskvalue=GETPOST('maskorder','alpha');
|
||||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskvalue,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -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,17 +87,17 @@ class InfoBox
|
||||
{
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$obj->file,$regs))
|
||||
{
|
||||
$boxname = $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";
|
||||
}
|
||||
}
|
||||
|
||||
// TODO PERF Do not make "dol_include_once" here, nor "new" later. This means, we must store a 'depends' field to store modules list, then
|
||||
// TODO PERF Do not make "dol_include_once" here, nor "new" later. This means, we must store a 'depends' field to store modules list, then
|
||||
// the "enabled" condition for modules forbidden for external users and the depends condition can be done.
|
||||
// Goal is to avoid making a new instance for each boxes returned by select.
|
||||
|
||||
@ -106,7 +106,7 @@ class InfoBox
|
||||
{
|
||||
$box=new $boxname($db,$obj->note); // Constructor may set properties like box->enabled. obj->note is note into box def, not user params.
|
||||
//$box=new stdClass();
|
||||
|
||||
|
||||
// box properties
|
||||
$box->rowid = (empty($obj->rowid) ? '' : $obj->rowid);
|
||||
$box->id = (empty($obj->box_id) ? '' : $obj->box_id);
|
||||
@ -126,7 +126,7 @@ class InfoBox
|
||||
// box_def properties
|
||||
$box->box_id = (empty($obj->box_id) ? '' : $obj->box_id);
|
||||
$box->note = (empty($obj->note) ? '' : $obj->note);
|
||||
|
||||
|
||||
// Filter on box->enabled (fused for example by box_comptes) and box->depends
|
||||
//$enabled=1;
|
||||
$enabled=$box->enabled;
|
||||
@ -135,14 +135,15 @@ class InfoBox
|
||||
foreach($box->depends as $module)
|
||||
{
|
||||
//print $boxname.'-'.$module.'<br>';
|
||||
if (empty($conf->$module->enabled)) $enabled=0;
|
||||
$tmpmodule=preg_replace('/@[^@]+/','',$module);
|
||||
if (empty($conf->$tmpmodule->enabled)) $enabled=0;
|
||||
}
|
||||
}
|
||||
|
||||
//print 'xx module='.$module.' enabled='.$enabled;
|
||||
if ($enabled) $boxes[]=$box;
|
||||
else unset($box);
|
||||
}
|
||||
}
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -2166,13 +2166,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,16 +638,16 @@ $formproduct = new FormProduct($db);
|
||||
|
||||
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
{
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
if (empty($object->error) && $id)
|
||||
{
|
||||
$object = new Product($db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result <= 0) dol_print_error('',$object->error);
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
if (empty($object->error) && $id)
|
||||
{
|
||||
$object = new Product($db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result <= 0) dol_print_error('',$object->error);
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
$objcanvas->display_canvas($action); // Show template
|
||||
}
|
||||
else
|
||||
@ -1315,8 +1315,9 @@ print "\n</div><br>\n";
|
||||
|
||||
if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
{
|
||||
print '<table width="100%" class="noborder">';
|
||||
//print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
//Variable used to check if any text is going to be printed
|
||||
$html = '';
|
||||
//print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
// Propals
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->creer)
|
||||
@ -1325,42 +1326,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("propal");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherprop = $propal->liste_array(2,1,0);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherprop) && count($otherprop))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addinpropal">';
|
||||
print $langs->trans("Proposals").'</td><td colspan="2">';
|
||||
print $form->selectarray("propalid", $otherprop, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addinpropal">';
|
||||
$html .= $langs->trans("Proposals").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("propalid", $otherprop, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherOpenedPropals");
|
||||
print '</td></tr>';
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherOpenedPropals");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// Commande
|
||||
@ -1370,42 +1371,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("orders");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$othercom = $commande->liste_array(2, 1, null);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($othercom) && count($othercom))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addincommande">';
|
||||
print $langs->trans("Orders").'</td><td colspan="2">';
|
||||
print $form->selectarray("commandeid", $othercom, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addincommande">';
|
||||
$html .= $langs->trans("Orders").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("commandeid", $othercom, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherOpenedOrders");
|
||||
print '</td></tr>';
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherOpenedOrders");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// Factures
|
||||
@ -1415,47 +1416,52 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherinvoice = $invoice->liste_array(2, 1, null);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherinvoice) && count($otherinvoice))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addinfacture">';
|
||||
print $langs->trans("Invoice").'</td><td colspan="2">';
|
||||
print $form->selectarray("factureid", $otherinvoice, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherDraftBills");
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherinvoice = $invoice->liste_array(2, 1, null);
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherinvoice) && count($otherinvoice))
|
||||
{
|
||||
$var=!$var;
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addinfacture">';
|
||||
$html .= $langs->trans("Invoice").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("factureid", $otherinvoice, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherDraftBills");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
//If any text is going to be printed, then we show the table
|
||||
if (!empty($html))
|
||||
{
|
||||
print '<table width="100%" class="noborder">';
|
||||
print $html;
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -64,6 +64,9 @@ class MouvementStock
|
||||
$error = 0;
|
||||
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");
|
||||
|
||||
// Clean parameters
|
||||
if (empty($price)) $price=0;
|
||||
|
||||
if (empty($fk_product)) return 0;
|
||||
|
||||
$now=(! empty($datem) ? $datem : dol_now());
|
||||
|
||||
@ -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