Fix missing field

Fix bad value for default value of next date
This commit is contained in:
Laurent Destailleur 2016-02-15 07:36:45 +01:00
parent a138c1503a
commit d4c3258385
4 changed files with 25 additions and 7 deletions

View File

@ -218,7 +218,7 @@ if ($action == 'create')
dol_fiche_head();
$rowspan=4;
if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++;
if (! empty($conf->projet->enabled)) $rowspan++;
if ($object->fk_account > 0) $rowspan++;
print '<table class="border" width="100%">';
@ -255,7 +255,7 @@ if ($action == 'create')
print "</td></tr>";
// Project
if (! empty($conf->projet->enabled) && $object->fk_project > 0)
if (! empty($conf->projet->enabled))
{
print "<tr><td>".$langs->trans("Project")."</td><td>";
if ($object->fk_project > 0)
@ -267,7 +267,7 @@ if ($action == 'create')
print "</td></tr>";
}
// Project
// Bank account
if ($object->fk_account > 0)
{
print "<tr><td>".$langs->trans('BankAccount')."</td><td>";
@ -280,7 +280,7 @@ if ($action == 'create')
print '<br>';
// Recurrence
// Autogeneration
$title = $langs->trans("Recurrence");
print load_fiche_titre($title);
@ -293,7 +293,7 @@ if ($action == 'create')
// First date of execution for cron
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
$date_next_execution = isset($date_next_execution) ? $date_next_execution : dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
print $form->select_date($date_next_execution, '', 0, 0, '', "add", 1, 1, 1);
print "</td></tr>";

View File

@ -291,8 +291,14 @@ if ($resql)
print '<td>';
if($obj->socid)
{
$socstatic->fetch($obj->socid);
$result=$socstatic->fetch($obj->socid);
if ($result < 0)
{
dol_print_error($db);
exit;
}
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative=count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{

View File

@ -232,3 +232,9 @@ ALTER TABLE llx_facturedet_rec ADD COLUMN multicurrency_total_ht double(24,8) DE
ALTER TABLE llx_facturedet_rec ADD COLUMN multicurrency_total_tva double(24,8) DEFAULT 0;
ALTER TABLE llx_facturedet_rec ADD COLUMN multicurrency_total_ttc double(24,8) DEFAULT 0;
ALTER TABLE llx_contratdet ADD COLUMN fk_multicurrency integer;
ALTER TABLE llx_contratdet ADD COLUMN multicurrency_code varchar(255);
ALTER TABLE llx_contratdet ADD COLUMN multicurrency_subprice double(24,8) DEFAULT 0;
ALTER TABLE llx_contratdet ADD COLUMN multicurrency_total_ht double(24,8) DEFAULT 0;
ALTER TABLE llx_contratdet ADD COLUMN multicurrency_total_tva double(24,8) DEFAULT 0;
ALTER TABLE llx_contratdet ADD COLUMN multicurrency_total_ttc double(24,8) DEFAULT 0;

View File

@ -62,6 +62,12 @@ create table llx_contratdet
fk_user_ouverture integer,
fk_user_cloture integer,
commentaire text,
fk_unit integer DEFAULT NULL
fk_unit integer DEFAULT NULL,
fk_multicurrency integer,
multicurrency_code varchar(255),
multicurrency_subprice double(24,8) DEFAULT 0,
multicurrency_total_ht double(24,8) DEFAULT 0,
multicurrency_total_tva double(24,8) DEFAULT 0,
multicurrency_total_ttc double(24,8) DEFAULT 0
)ENGINE=innodb;