Merge remote-tracking branch 'origin/3.3' into develop
This commit is contained in:
commit
b1ad7867e5
@ -201,7 +201,18 @@ else if ($action == 'classin' && $user->rights->contrat->creer)
|
||||
|
||||
else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
{
|
||||
if (GETPOST('pqty') && ((GETPOST('pu') != '' && GETPOST('desc')) || GETPOST('idprod')))
|
||||
if (! GETPOST('qty'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")),'errors');
|
||||
$error++;
|
||||
}
|
||||
if ((GETPOST('price_ht') == '' || ! GETPOST('dp_desc')) && ! GETPOST('idprod'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")),'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$ret=$object->fetch($id);
|
||||
if ($ret < 0)
|
||||
@ -286,11 +297,11 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu_ht=GETPOST('pu');
|
||||
$pu_ht=GETPOST('price_ht');
|
||||
$price_base_type = 'HT';
|
||||
$tva_tx=str_replace('*','',GETPOST('tva_tx'));
|
||||
$tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0;
|
||||
$desc=GETPOST('desc');
|
||||
$desc=GETPOST('dp_desc');
|
||||
}
|
||||
|
||||
$localtax1_tx=get_localtax($tva_tx,1,$object->societe);
|
||||
@ -310,12 +321,12 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$pu_ht,
|
||||
GETPOST('pqty'),
|
||||
GETPOST('qty'),
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
GETPOST('idprod'),
|
||||
GETPOST('premise'),
|
||||
GETPOST('remise_percent'),
|
||||
$date_start,
|
||||
$date_end,
|
||||
$price_base_type,
|
||||
@ -343,6 +354,14 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
}
|
||||
*/
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['remise_percent']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['dp_desc']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -372,7 +391,7 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST(
|
||||
$localtax1_tx=get_localtax(GETPOST('eltva_tx'),1,$object->thirdparty);
|
||||
$localtax2_tx=get_localtax(GETPOST('eltva_tx'),2,$object->thirdparty);
|
||||
|
||||
$objectline->description=GETPOST('eldesc');
|
||||
$objectline->description=GETPOST('product_desc');
|
||||
$objectline->price_ht=GETPOST('elprice');
|
||||
$objectline->subprice=GETPOST('elprice');
|
||||
$objectline->qty=GETPOST('elqty');
|
||||
@ -898,7 +917,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>".nl2br($objp->description)."</td>\n";
|
||||
print "<td>".dol_htmlentitiesbr($objp->description)."</td>\n";
|
||||
}
|
||||
// TVA
|
||||
print '<td align="center">'.vatrate($objp->tva_tx,'%',$objp->info_bits).'</td>';
|
||||
@ -997,7 +1016,16 @@ else
|
||||
{
|
||||
print $objp->label?$objp->label.'<br>':'';
|
||||
}
|
||||
print '<textarea name="eldesc" cols="70" rows="1">'.$objp->description.'</textarea></td>';
|
||||
|
||||
// editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$enable=(isset($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
|
||||
$doleditor=new DolEditor('product_desc',$objp->description,'',92,'dolibarr_details','',false,true,$enable,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->thirdparty);
|
||||
print '</td>';
|
||||
@ -1252,108 +1280,60 @@ else
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
/*
|
||||
* Ajouter une ligne produit/service
|
||||
*/
|
||||
// Form to add new line
|
||||
if ($user->rights->contrat->creer && ($object->statut >= 0))
|
||||
{
|
||||
$dateSelector=1;
|
||||
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">'; // Array with (n*2)+1 lines
|
||||
print '<table id="tablelines" class="noborder" width="100%">'; // Array with (n*2)+1 lines
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td>'.$langs->trans("Service").'</td>';
|
||||
print '<td align="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("PriceUHT").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Qty").'</td>';
|
||||
print '<td align="right">'.$langs->trans("ReductionShort").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=false;
|
||||
|
||||
// Service sur produit predefini
|
||||
print '<form name="addline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addline">';
|
||||
print '<input type="hidden" name="mode" value="predefined">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">';
|
||||
// multiprix
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
$form->select_produits('','idprod',1,$conf->product->limit_size,$object->thirdparty->price_level);
|
||||
else
|
||||
$form->select_produits('','idprod',1,$conf->product->limit_size);
|
||||
print '<br>';
|
||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea>';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center"><input type="text" class="flat" size="2" name="pqty" value="1"></td>';
|
||||
print '<td align="right" nowrap><input type="text" class="flat" size="1" name="premise" value="'.$object->thirdparty->remise_client.'">%</td>';
|
||||
print '<td align="center" colspan="2" rowspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="8">';
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
|
||||
print ' '.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date('',"date_end",$usehm,$usehm,1,"addline");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$var=!$var;
|
||||
|
||||
// Service libre
|
||||
print '<form name="addline_sl" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addline">';
|
||||
print '<input type="hidden" name="mode" value="libre">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
||||
|
||||
print '<td>';
|
||||
print $form->load_tva("tva_tx",-1,$mysoc,$object->thirdparty);
|
||||
print '</td>';
|
||||
print '<td align="right"><input type="text" class="flat" size="4" name="pu" value=""></td>';
|
||||
print '<td align="center"><input type="text" class="flat" size="2" name="pqty" value="1"></td>';
|
||||
print '<td align="right" nowrap><input type="text" class="flat" size="1" name="premise" value="'.$object->thirdparty->remise_client.'">%</td>';
|
||||
print '<td align="center" rowspan="2" colspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td colspan="8">';
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl");
|
||||
print ' '.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Trick to not show product entries
|
||||
$savproductenabled=$conf->product->enabled;
|
||||
$conf->product->enabled = 0;
|
||||
|
||||
// Form to add new line
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var=true;
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
// Add free or predefined products/services
|
||||
$object->formAddObjectLine($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add free products/services
|
||||
$object->formAddFreeProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
|
||||
// Restore correct setup
|
||||
$conf->product->enabled = $savproductenabled;
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
//print '</td><td align="center" class="tab" style="padding: 4px; border-right: 1px solid #'.$colorb.'; border-top: 1px solid #'.$colorb.'; border-bottom: 1px solid #'.$colorb.';">';
|
||||
|
||||
//print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* Boutons Actions
|
||||
*************************************************************/
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
@ -1391,6 +1371,10 @@ else
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
print '<br>';
|
||||
@ -1410,5 +1394,6 @@ else
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -13,8 +13,8 @@ insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 0, 7, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 6, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run', '', 2, 8, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('! empty($conf->boutique->enabled)', 11__+MAX_llx_menu__, __HANDLER__, 'top', 'shop', '', 0, '/boutique/index.php?mainmenu=shop&leftmenu=', 'OSCommerce', -1, 'shop', '', '', 0, 11, __ENTITY__);
|
||||
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 15, __ENTITY__);
|
||||
|
||||
@ -240,12 +240,15 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after)
|
||||
// TODO Find a way to add parent menu only if child menu exists. For the moment, no ther method than hard coded methods.
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||
{
|
||||
$langs->load("products");
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||
if ($leftmenu=="modulesadmintools")
|
||||
{
|
||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",$langs->trans("ProductVatMassChange"),1);
|
||||
}
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||
if ($leftmenu=="modulesadmintools" && $user->admin)
|
||||
{
|
||||
$langs->load("products");
|
||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -712,12 +712,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
// Modules system tools
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||
{
|
||||
$langs->load("products");
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||
if ($leftmenu=="modulesadmintools")
|
||||
{
|
||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",$langs->trans("ProductVatMassChange"),1);
|
||||
}
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||
if ($leftmenu=="modulesadmintools" && $user->admin)
|
||||
{
|
||||
$langs->load("products");
|
||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,10 @@
|
||||
* $this (invoice, order, ...)
|
||||
* $line defined
|
||||
*/
|
||||
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE freeproductline_create.tpl.php -->
|
||||
@ -37,23 +41,23 @@
|
||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||
<?php
|
||||
$colspan = 4;
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
?>
|
||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||
<?php
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
$colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
$colspan++;
|
||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||
<?php
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||
</tr>
|
||||
|
||||
<form name="addproduct" id="addproduct" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id; ?>#add" method="POST">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="action" value="addline" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>" />
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
<input type="hidden" name="action" value="addline">
|
||||
<input type="hidden" name="mode" value="libre">
|
||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>">
|
||||
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
|
||||
@ -92,40 +96,49 @@
|
||||
<td align="right" nowrap><input type="text" size="1" value="<?php echo $buyer->remise_client; ?>" name="remise_percent">%</td>
|
||||
<?php
|
||||
$colspan = 4;
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
?>
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
?>
|
||||
<td align="right"><input type="text" size="5" name="buying_price"
|
||||
value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
$colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
$colspan++;
|
||||
<?php
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
}
|
||||
?>
|
||||
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>"><input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline"></td>
|
||||
</tr>
|
||||
|
||||
<?php if (! empty($conf->service->enabled) && $dateSelector) {
|
||||
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
||||
$colspan = 10;
|
||||
else
|
||||
$colspan = 9;
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
<?php
|
||||
if (! empty($conf->service->enabled) && $dateSelector)
|
||||
{
|
||||
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||
else $colspan = 9;
|
||||
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
$colspan++; // For the buying price
|
||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
||||
$colspan++;
|
||||
if($conf->global->DISPLAY_MARK_RATES)
|
||||
$colspan++;
|
||||
if($conf->global->DISPLAY_MARGIN_RATES) $colspan++;
|
||||
if($conf->global->DISPLAY_MARK_RATES) $colspan++;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<td colspan="<?php echo $colspan; ?>"><?php
|
||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
||||
echo $form->select_date('','date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct");
|
||||
echo ' '.$langs->trans('to').' ';
|
||||
echo $form->select_date('','date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct");
|
||||
if (! empty($object->element) && $object->element == 'contrat')
|
||||
{
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl");
|
||||
print ' '.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
||||
echo $form->select_date('','date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct");
|
||||
echo ' '.$langs->trans('to').' ';
|
||||
echo $form->select_date('','date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
* $this (invoice, order, ...)
|
||||
* $line defined
|
||||
*/
|
||||
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
||||
@ -32,32 +36,32 @@
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>>
|
||||
<?php
|
||||
echo $langs->trans("AddNewLine").' - ';
|
||||
if (! empty($conf->service->enabled))
|
||||
echo $langs->trans('RecordedProductsAndServices');
|
||||
else
|
||||
echo $langs->trans('RecordedProducts');
|
||||
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('RecordedProducts');
|
||||
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('RecordedServices');
|
||||
else echo $langs->trans('RecordedProductsAndServices');
|
||||
?>
|
||||
</td>
|
||||
<td align="right"><?php echo $langs->trans('Qty'); ?></td>
|
||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||
<?php
|
||||
$colspan = 4;
|
||||
if (! empty($conf->margin->enabled))
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
?>
|
||||
?>
|
||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||
</tr>
|
||||
|
||||
<form name="addpredefinedproduct" id="addpredefinedproduct" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id; ?>#add" method="POST">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="action" value="addline" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>" />
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
<input type="hidden" name="action" value="addline">
|
||||
<input type="hidden" name="mode" value="predefined">
|
||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>">
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
@ -72,7 +76,9 @@ jQuery(document).ready(function() {
|
||||
<?php
|
||||
|
||||
echo '<span>';
|
||||
$form->select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level);
|
||||
$filtertype='';
|
||||
if (! empty($object->element) && $object->element == 'contrat') $filtertype='1';
|
||||
$form->select_produits('','idprod',$filtertype,$conf->product->limit_size,$buyer->price_level);
|
||||
echo '</span>';
|
||||
|
||||
if (is_object($hookmanager))
|
||||
@ -94,20 +100,20 @@ jQuery(document).ready(function() {
|
||||
</td>
|
||||
<td align="right"><input type="text" size="2" name="qty" value="1"></td>
|
||||
<td align="right" nowrap><input type="text" size="1" name="remise_percent" value="<?php echo $buyer->remise_client; ?>">%</td>
|
||||
<?php
|
||||
$colspan = 4;
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
?>
|
||||
<td align="right">
|
||||
<select id="fournprice" name="fournprice" style="display: none;"></select>
|
||||
<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$colspan = 4;
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
?>
|
||||
<td align="right">
|
||||
<select id="fournprice" name="fournprice" style="display: none;"></select>
|
||||
<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>">
|
||||
<input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>" name="addline">
|
||||
</td>
|
||||
@ -118,7 +124,7 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
||||
{
|
||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||
else $colspan = 9;
|
||||
if (! empty($conf->margin->enabled))
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
$colspan++; // For the buying price
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
@ -128,10 +134,20 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<td colspan="<?php echo $colspan; ?>">
|
||||
<?php
|
||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
||||
echo $form->select_date('','date_start_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
|
||||
echo ' '.$langs->trans('to').' ';
|
||||
echo $form->select_date('','date_end_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
|
||||
if (! empty($object->element) && $object->element == 'contrat')
|
||||
{
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
|
||||
print ' '.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date('',"date_end",$usehm,$usehm,1,"addline");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
||||
echo $form->select_date('','date_start_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
|
||||
echo ' '.$langs->trans('to').' ';
|
||||
echo $form->select_date('','date_end_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -142,42 +158,42 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if (! empty($conf->margin->enabled))
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$("#idprod").change(function() {
|
||||
$("#fournprice options").remove();
|
||||
$("#fournprice").hide();
|
||||
$("#buying_price").val("").show();
|
||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
||||
if (data && data.length > 0) {
|
||||
var options = '';
|
||||
var i = 0;
|
||||
$(data).each(function() {
|
||||
i++;
|
||||
options += '<option value="'+this.id+'" price="'+this.price+'"';
|
||||
if (i == 1) {
|
||||
options += ' selected';
|
||||
$("#buying_price").val(this.price);
|
||||
}
|
||||
options += '>'+this.label+'</option>';
|
||||
});
|
||||
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||
$("#buying_price").hide();
|
||||
$("#fournprice").html(options).show();
|
||||
$("#fournprice").change(function() {
|
||||
var selval = $(this).find('option:selected').attr("price");
|
||||
if (selval)
|
||||
$("#buying_price").val(selval).hide();
|
||||
else
|
||||
$('#buying_price').show();
|
||||
});
|
||||
}
|
||||
},
|
||||
'json');
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$("#idprod").change(function() {
|
||||
$("#fournprice options").remove();
|
||||
$("#fournprice").hide();
|
||||
$("#buying_price").val("").show();
|
||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
||||
if (data && data.length > 0) {
|
||||
var options = '';
|
||||
var i = 0;
|
||||
$(data).each(function() {
|
||||
i++;
|
||||
options += '<option value="'+this.id+'" price="'+this.price+'"';
|
||||
if (i == 1) {
|
||||
options += ' selected';
|
||||
$("#buying_price").val(this.price);
|
||||
}
|
||||
options += '>'+this.label+'</option>';
|
||||
});
|
||||
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||
$("#buying_price").hide();
|
||||
$("#fournprice").html(options).show();
|
||||
$("#fournprice").change(function() {
|
||||
var selval = $(this).find('option:selected').attr("price");
|
||||
if (selval)
|
||||
$("#buying_price").val(selval).hide();
|
||||
else
|
||||
$('#buying_price').show();
|
||||
});
|
||||
}
|
||||
},
|
||||
'json');
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@ -340,7 +340,6 @@ SecurityTokenIsUnique=Използвайте уникална параметър
|
||||
EnterRefToBuildUrl=Въведете справка за обект %s
|
||||
GetSecuredUrl=Изчислява URL
|
||||
ButtonHideUnauthorized=Скриване на бутоните за неправомерни действия, вместо да се показва с увреждания бутони
|
||||
ModulesSystemTools=Модули инструменти
|
||||
ProductVatMassChange=Промяната в масата ДДС
|
||||
ProductVatMassChangeDesc=Тази страница може да се използва за промяна на ДДС ставката, определена за продукти или услуги от стойността на друг. Внимание, тази промяна се прави на цялата база данни.
|
||||
OldVATRates=Old ставка на ДДС
|
||||
|
||||
@ -338,7 +338,6 @@ GetSecuredUrl=Obtenir la URL calculada
|
||||
ButtonHideUnauthorized=Amaga els botons d'accions no autoritzades en compte de mostrar-los atenuats
|
||||
TotalNumberOfActivatedModules=Nombre total de mòduls activats: <b>%s</b>
|
||||
YouMustEnableOneModule=Ha d'activar almenys 1 mòdul.
|
||||
ModulesSystemTools=Mòduls utilitats
|
||||
ProductVatMassChange=Modificar IVA en massa
|
||||
ProductVatMassChangeDesc=Aquesta pàgina us permet canviar el tipus d'IVA definit en els productes o serveis d'un valor a un altre. Tingueu en compte que el canvi es fa en massa sobre tota la base de dades.
|
||||
OldVATRates=Taxa d'IVA antiga
|
||||
|
||||
@ -628,6 +628,11 @@ LinkedToSpecificUsers=Enllaçat a un contacte d'usuari particular
|
||||
DeleteAFile=Eliminació d'arxiu
|
||||
ConfirmDeleteAFile=Confirme l'eliminació de l'arxiu
|
||||
NoResults=Cap resultat
|
||||
ModulesSystemTools=Mòduls utilitats
|
||||
View=Veure
|
||||
Test=Prova
|
||||
Element=Element
|
||||
|
||||
# Week day
|
||||
Monday=Dilluns
|
||||
Tuesday=Dimarts
|
||||
@ -657,6 +662,3 @@ ShortThursday=Dj
|
||||
ShortFriday=Dv
|
||||
ShortSaturday=Ds
|
||||
ShortSunday=Dg
|
||||
View=Veure
|
||||
Test=Prova
|
||||
Element=Element
|
||||
|
||||
@ -333,7 +333,6 @@ SecurityTokenIsUnique=Use a unique securekey parameter for each URL
|
||||
EnterRefToBuildUrl=Enter reference for object %s
|
||||
GetSecuredUrl=Get calculated URL
|
||||
ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons
|
||||
ModulesSystemTools=Modules tools
|
||||
ProductVatMassChange=Mass VAT change
|
||||
ProductVatMassChangeDesc=This page can be used to modify a VAT rate defined on products or services from a value to another. Warning, this change is done on all database.
|
||||
OldVATRates=Old VAT rate
|
||||
|
||||
@ -627,6 +627,7 @@ LinkedToSpecificUsers=Linked to a particular user contact
|
||||
DeleteAFile=Delete a file
|
||||
ConfirmDeleteAFile=Are you sure you want to delete file
|
||||
NoResults=No results
|
||||
ModulesSystemTools=Modules tools
|
||||
|
||||
# Week day
|
||||
Monday=Monday
|
||||
|
||||
@ -151,6 +151,7 @@ DiscountQtyMin=Discount quantity min. (by default)
|
||||
NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product
|
||||
NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product
|
||||
RecordedProducts=Products recorded
|
||||
RecordedServices=Services recorded
|
||||
RecordedProductsAndServices=Products/services recorded
|
||||
GenerateThumb=Generate thumb
|
||||
ProductCanvasAbility=Use special "canvas" addons
|
||||
|
||||
@ -339,7 +339,6 @@ GetSecuredUrl=Obtener la URL calculada
|
||||
ButtonHideUnauthorized=Ocultar los botones de acciones no autorizadas en vez de mostrarlos atenuados
|
||||
TotalNumberOfActivatedModules=Número total de módulos activados: <b>%s</b>
|
||||
YouMustEnableOneModule=Debe activar al menos 1 módulo.
|
||||
ModulesSystemTools=Módulos utilidades
|
||||
ProductVatMassChange=Modificar IVA en masa
|
||||
ProductVatMassChangeDesc=Esta página le permite cambiar el tipo de IVA definido en los productos o servicios de un valor a otro. Tenga en cuenta que el cambio se lleva a cabo en masa sobre toda la base de datos.
|
||||
OldVATRates=Tasa de IVA antigua
|
||||
|
||||
@ -628,6 +628,11 @@ LinkedToSpecificUsers=Enlazado a un contacto de usuario particular
|
||||
DeleteAFile=Eliminación de archivo
|
||||
ConfirmDeleteAFile=Confirme la eliminación del archivo
|
||||
NoResults=Ningún resultado
|
||||
ModulesSystemTools=Módulos utilidades
|
||||
View=Ver
|
||||
Test=Prueba
|
||||
Element=Elemento
|
||||
|
||||
# Week day
|
||||
Monday=Lunes
|
||||
Tuesday=Martes
|
||||
@ -658,6 +663,3 @@ ShortFriday=V
|
||||
ShortSaturday=S
|
||||
ShortSunday=D
|
||||
|
||||
View=Ver
|
||||
Test=Prueba
|
||||
Element=Elemento
|
||||
@ -335,7 +335,6 @@ GetSecuredUrl=Obtenir l'URL calculée
|
||||
ButtonHideUnauthorized=Cacher les boutons non autorisés (au lieu de les voir grisés)
|
||||
TotalNumberOfActivatedModules=Nombre total de modules fonctionnels activés: <b>%s</b>
|
||||
YouMustEnableOneModule=Vous devez activer au moins une fonctionnalité
|
||||
ModulesSystemTools=Outils Modules
|
||||
ProductVatMassChange=Modif TVA en masse
|
||||
ProductVatMassChangeDesc=Cette page permet de modifier les taux de TVA définis sur les produits ou services d'une valeur vers une autre. Attention, la modification est réalisée en masse sur toute la base de donnée.
|
||||
OldVATRates=Ancien taux de TVA
|
||||
|
||||
@ -629,6 +629,8 @@ LinkedToSpecificUsers=Liés à un contact utilisateur particulier
|
||||
DeleteAFile=Suppression de fichier
|
||||
ConfirmDeleteAFile=Confirmez-vous la suppression du fichier
|
||||
NoResults=Aucun résultat
|
||||
ModulesSystemTools=Outils Modules
|
||||
View=Voir
|
||||
|
||||
# Week day
|
||||
Monday=Lundi
|
||||
@ -659,5 +661,3 @@ ShortThursday=J
|
||||
ShortFriday=V
|
||||
ShortSaturday=S
|
||||
ShortSunday=D
|
||||
|
||||
View=Voir
|
||||
|
||||
@ -151,6 +151,7 @@ VATRateForSupplierProduct=Taux TVA (pour ce produit/fournisseur)
|
||||
NoPriceDefinedForThisSupplier=Aucun prix/qté défini pour ce fournisseur/produit
|
||||
NoSupplierPriceDefinedForThisProduct=Aucun prix/qté fournisseur défini pour ce produit
|
||||
RecordedProducts=Produits en vente
|
||||
RecordedServices=Services en vente
|
||||
RecordedProductsAndServices=Produits/Services en vente
|
||||
GenerateThumb=Générer la vignette
|
||||
ProductCanvasAbility=Utiliser les extensions spéciales "canvas"
|
||||
|
||||
@ -69,11 +69,6 @@ $parameters=array();
|
||||
$object=(object) 'nothing';
|
||||
$reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
/*
|
||||
$demoprofiles[]=array('default'=>'0', 'key'=>'profdemomed', 'lang'=>'cabinetmed@cabinetmed', 'label'=>'DemoCabinetMed', 'url'=>'http://demodolimed.dolibarr.org',
|
||||
'disablemodules'=>'adherent,boutique,don,externalsite',
|
||||
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png');
|
||||
*/
|
||||
|
||||
$alwayscheckedmodules=array('barcode','bookmark','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want
|
||||
$alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want
|
||||
@ -242,16 +237,21 @@ jQuery(document).ready(function () {
|
||||
jQuery('tr.moduleline').hide();
|
||||
// Enable this to allow personalized setup
|
||||
jQuery('.modulelineshow').attr('href','#');
|
||||
jQuery('.cursorpointer').css('cursor','pointer');
|
||||
jQuery(".modulelineshow").click(function() {
|
||||
var currentId = $(this).attr('id').substring(2);
|
||||
jQuery('tr.moduleline').hide();
|
||||
if (currentId != openedId)
|
||||
var idstring=$(this).attr('id');
|
||||
if (typeof idstring != "undefined")
|
||||
{
|
||||
openedId=currentId;
|
||||
jQuery("#tr1"+currentId).show();
|
||||
jQuery("#tr2"+currentId).show();
|
||||
var currentId = idstring.substring(2);
|
||||
jQuery('tr.moduleline').hide();
|
||||
if (currentId != openedId)
|
||||
{
|
||||
openedId=currentId;
|
||||
jQuery("#tr1"+currentId).show();
|
||||
jQuery("#tr2"+currentId).show();
|
||||
}
|
||||
else openedId = '';
|
||||
}
|
||||
else openedId = '';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -302,8 +302,8 @@ foreach ($demoprofiles as $profilearray)
|
||||
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
|
||||
// Title
|
||||
print '<tr>';
|
||||
print '<td width="50"><a href="'.$urlwithmod.'" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img src="'.$profilearray['icon'].'" width="48" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
|
||||
print '<td><a href="'.$urlwithmod.'" id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
|
||||
print '<td width="50" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img src="'.$profilearray['icon'].'" width="48" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
|
||||
print '<td id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
|
||||
print '</tr>'."\n";
|
||||
// Modules
|
||||
if (empty($profilearray['url']))
|
||||
@ -368,18 +368,8 @@ print '<tr><td>';
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Button
|
||||
/*
|
||||
print '<tr><td align="center">';
|
||||
print '<input type="hidden" name="action" value="gotodemo">';
|
||||
print '<input class="button" type="submit" value=" < '.$langs->trans("GoToDemo").' > ">';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
// Google Adsense (need Google module)
|
||||
if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
||||
{
|
||||
@ -399,6 +389,8 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
|
||||
|
||||
llxFooterVierge();
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
/**
|
||||
* Show header for demo
|
||||
@ -449,11 +441,11 @@ border-radius: 8px;
|
||||
-webkit-box-shadow: 4px 4px 4px #EEE;
|
||||
box-shadow: 4px 4px 4px #EEE;
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
|
||||
}';
|
||||
// print '.CTableRow1 { background: #f0f0f0; color: #000000; }';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user