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)
|
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);
|
$ret=$object->fetch($id);
|
||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
@ -286,11 +297,11 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pu_ht=GETPOST('pu');
|
$pu_ht=GETPOST('price_ht');
|
||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
$tva_tx=str_replace('*','',GETPOST('tva_tx'));
|
$tva_tx=str_replace('*','',GETPOST('tva_tx'));
|
||||||
$tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0;
|
$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);
|
$localtax1_tx=get_localtax($tva_tx,1,$object->societe);
|
||||||
@ -310,12 +321,12 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
|||||||
$result = $object->addline(
|
$result = $object->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$pu_ht,
|
$pu_ht,
|
||||||
GETPOST('pqty'),
|
GETPOST('qty'),
|
||||||
$tva_tx,
|
$tva_tx,
|
||||||
$localtax1_tx,
|
$localtax1_tx,
|
||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
GETPOST('idprod'),
|
GETPOST('idprod'),
|
||||||
GETPOST('premise'),
|
GETPOST('remise_percent'),
|
||||||
$date_start,
|
$date_start,
|
||||||
$date_end,
|
$date_end,
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
@ -343,6 +354,14 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
|||||||
contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -372,7 +391,7 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST(
|
|||||||
$localtax1_tx=get_localtax(GETPOST('eltva_tx'),1,$object->thirdparty);
|
$localtax1_tx=get_localtax(GETPOST('eltva_tx'),1,$object->thirdparty);
|
||||||
$localtax2_tx=get_localtax(GETPOST('eltva_tx'),2,$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->price_ht=GETPOST('elprice');
|
||||||
$objectline->subprice=GETPOST('elprice');
|
$objectline->subprice=GETPOST('elprice');
|
||||||
$objectline->qty=GETPOST('elqty');
|
$objectline->qty=GETPOST('elqty');
|
||||||
@ -898,7 +917,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td>".nl2br($objp->description)."</td>\n";
|
print "<td>".dol_htmlentitiesbr($objp->description)."</td>\n";
|
||||||
}
|
}
|
||||||
// TVA
|
// TVA
|
||||||
print '<td align="center">'.vatrate($objp->tva_tx,'%',$objp->info_bits).'</td>';
|
print '<td align="center">'.vatrate($objp->tva_tx,'%',$objp->info_bits).'</td>';
|
||||||
@ -997,7 +1016,16 @@ else
|
|||||||
{
|
{
|
||||||
print $objp->label?$objp->label.'<br>':'';
|
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 '<td align="right">';
|
||||||
print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->thirdparty);
|
print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->thirdparty);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1252,108 +1280,60 @@ else
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
/*
|
// Form to add new line
|
||||||
* Ajouter une ligne produit/service
|
|
||||||
*/
|
|
||||||
if ($user->rights->contrat->creer && ($object->statut >= 0))
|
if ($user->rights->contrat->creer && ($object->statut >= 0))
|
||||||
{
|
{
|
||||||
|
$dateSelector=1;
|
||||||
|
|
||||||
print '<br>';
|
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\">";
|
// Trick to not show product entries
|
||||||
print '<td>'.$langs->trans("Service").'</td>';
|
$savproductenabled=$conf->product->enabled;
|
||||||
print '<td align="center">'.$langs->trans("VAT").'</td>';
|
$conf->product->enabled = 0;
|
||||||
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>';
|
|
||||||
|
|
||||||
|
// 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 '</form>';
|
||||||
|
|
||||||
print '</table>';
|
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>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************
|
/*
|
||||||
* Boutons Actions
|
* Buttons
|
||||||
*************************************************************/
|
*/
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
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>';
|
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 "</div>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -1410,5 +1394,6 @@ else
|
|||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$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->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->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->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->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', '', 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->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 ('$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 ('! 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__);
|
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.
|
// 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))
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
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")
|
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||||
{
|
if ($leftmenu=="modulesadmintools" && $user->admin)
|
||||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",$langs->trans("ProductVatMassChange"),1);
|
{
|
||||||
}
|
$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
|
// Modules system tools
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
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")
|
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||||
{
|
if ($leftmenu=="modulesadmintools" && $user->admin)
|
||||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",$langs->trans("ProductVatMassChange"),1);
|
{
|
||||||
}
|
$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, ...)
|
* $this (invoice, order, ...)
|
||||||
* $line defined
|
* $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 -->
|
<!-- BEGIN PHP TEMPLATE freeproductline_create.tpl.php -->
|
||||||
@ -37,23 +41,23 @@
|
|||||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($usemargins))
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
$colspan++;
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
|
||||||
$colspan++;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<form name="addproduct" id="addproduct" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id; ?>#add" method="POST">
|
<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="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||||
<input type="hidden" name="action" value="addline" />
|
<input type="hidden" name="action" value="addline">
|
||||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>" />
|
<input type="hidden" name="mode" value="libre">
|
||||||
|
<input type="hidden" name="id" value="<?php echo $this->id; ?>">
|
||||||
|
|
||||||
<tr <?php echo $bcnd[$var]; ?>>
|
<tr <?php echo $bcnd[$var]; ?>>
|
||||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
|
<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>
|
<td align="right" nowrap><input type="text" size="1" value="<?php echo $buyer->remise_client; ?>" name="remise_percent">%</td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($usemargins))
|
||||||
?>
|
{
|
||||||
|
?>
|
||||||
<td align="right"><input type="text" size="5" name="buying_price"
|
<td align="right"><input type="text" size="5" name="buying_price"
|
||||||
value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
$colspan++;
|
if (! empty($conf->global->DISPLAY_MARK_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>
|
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>"><input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (! empty($conf->service->enabled) && $dateSelector) {
|
<?php
|
||||||
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
if (! empty($conf->service->enabled) && $dateSelector)
|
||||||
$colspan = 10;
|
{
|
||||||
else
|
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||||
$colspan = 9;
|
else $colspan = 9;
|
||||||
if (! empty($conf->margin->enabled)) {
|
|
||||||
|
if (! empty($usemargins))
|
||||||
|
{
|
||||||
$colspan++; // For the buying price
|
$colspan++; // For the buying price
|
||||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
if($conf->global->DISPLAY_MARGIN_RATES) $colspan++;
|
||||||
$colspan++;
|
if($conf->global->DISPLAY_MARK_RATES) $colspan++;
|
||||||
if($conf->global->DISPLAY_MARK_RATES)
|
|
||||||
$colspan++;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $bcnd[$var]; ?>>
|
<tr <?php echo $bcnd[$var]; ?>>
|
||||||
<td colspan="<?php echo $colspan; ?>"><?php
|
<td colspan="<?php echo $colspan; ?>"><?php
|
||||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
if (! empty($object->element) && $object->element == 'contrat')
|
||||||
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').' ';
|
print $langs->trans("DateStartPlanned").' ';
|
||||||
echo $form->select_date('','date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct");
|
$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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -24,6 +24,10 @@
|
|||||||
* $this (invoice, order, ...)
|
* $this (invoice, order, ...)
|
||||||
* $line defined
|
* $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 -->
|
<!-- 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"'); ?>>
|
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>>
|
||||||
<?php
|
<?php
|
||||||
echo $langs->trans("AddNewLine").' - ';
|
echo $langs->trans("AddNewLine").' - ';
|
||||||
if (! empty($conf->service->enabled))
|
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('RecordedProducts');
|
||||||
echo $langs->trans('RecordedProductsAndServices');
|
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('RecordedServices');
|
||||||
else
|
else echo $langs->trans('RecordedProductsAndServices');
|
||||||
echo $langs->trans('RecordedProducts');
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right"><?php echo $langs->trans('Qty'); ?></td>
|
<td align="right"><?php echo $langs->trans('Qty'); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
?>
|
?>
|
||||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<form name="addpredefinedproduct" id="addpredefinedproduct" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id; ?>#add" method="POST">
|
<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="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||||
<input type="hidden" name="action" value="addline" />
|
<input type="hidden" name="action" value="addline">
|
||||||
<input type="hidden" name="id" value="<?php echo $this->id; ?>" />
|
<input type="hidden" name="mode" value="predefined">
|
||||||
|
<input type="hidden" name="id" value="<?php echo $this->id; ?>">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
@ -72,7 +76,9 @@ jQuery(document).ready(function() {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo '<span>';
|
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>';
|
echo '</span>';
|
||||||
|
|
||||||
if (is_object($hookmanager))
|
if (is_object($hookmanager))
|
||||||
@ -94,20 +100,20 @@ jQuery(document).ready(function() {
|
|||||||
</td>
|
</td>
|
||||||
<td align="right"><input type="text" size="2" name="qty" value="1"></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>
|
<td align="right" nowrap><input type="text" size="1" name="remise_percent" value="<?php echo $buyer->remise_client; ?>">%</td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
?>
|
?>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<select id="fournprice" name="fournprice" style="display: none;"></select>
|
<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"]:''); ?>">
|
<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>">
|
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>">
|
||||||
<input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>" name="addline">
|
<input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>" name="addline">
|
||||||
</td>
|
</td>
|
||||||
@ -118,7 +124,7 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||||
else $colspan = 9;
|
else $colspan = 9;
|
||||||
if (! empty($conf->margin->enabled))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
$colspan++; // For the buying price
|
$colspan++; // For the buying price
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
@ -128,10 +134,20 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
|||||||
<tr <?php echo $bcnd[$var]; ?>>
|
<tr <?php echo $bcnd[$var]; ?>>
|
||||||
<td colspan="<?php echo $colspan; ?>">
|
<td colspan="<?php echo $colspan; ?>">
|
||||||
<?php
|
<?php
|
||||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
if (! empty($object->element) && $object->element == 'contrat')
|
||||||
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').' ';
|
print $langs->trans("DateStartPlanned").' ';
|
||||||
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");
|
$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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -142,42 +158,42 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->margin->enabled))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#idprod").change(function() {
|
$("#idprod").change(function() {
|
||||||
$("#fournprice options").remove();
|
$("#fournprice options").remove();
|
||||||
$("#fournprice").hide();
|
$("#fournprice").hide();
|
||||||
$("#buying_price").val("").show();
|
$("#buying_price").val("").show();
|
||||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) {
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
var options = '';
|
var options = '';
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$(data).each(function() {
|
$(data).each(function() {
|
||||||
i++;
|
i++;
|
||||||
options += '<option value="'+this.id+'" price="'+this.price+'"';
|
options += '<option value="'+this.id+'" price="'+this.price+'"';
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
options += ' selected';
|
options += ' selected';
|
||||||
$("#buying_price").val(this.price);
|
$("#buying_price").val(this.price);
|
||||||
}
|
}
|
||||||
options += '>'+this.label+'</option>';
|
options += '>'+this.label+'</option>';
|
||||||
});
|
});
|
||||||
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||||
$("#buying_price").hide();
|
$("#buying_price").hide();
|
||||||
$("#fournprice").html(options).show();
|
$("#fournprice").html(options).show();
|
||||||
$("#fournprice").change(function() {
|
$("#fournprice").change(function() {
|
||||||
var selval = $(this).find('option:selected').attr("price");
|
var selval = $(this).find('option:selected').attr("price");
|
||||||
if (selval)
|
if (selval)
|
||||||
$("#buying_price").val(selval).hide();
|
$("#buying_price").val(selval).hide();
|
||||||
else
|
else
|
||||||
$('#buying_price').show();
|
$('#buying_price').show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'json');
|
'json');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -340,7 +340,6 @@ SecurityTokenIsUnique=Използвайте уникална параметър
|
|||||||
EnterRefToBuildUrl=Въведете справка за обект %s
|
EnterRefToBuildUrl=Въведете справка за обект %s
|
||||||
GetSecuredUrl=Изчислява URL
|
GetSecuredUrl=Изчислява URL
|
||||||
ButtonHideUnauthorized=Скриване на бутоните за неправомерни действия, вместо да се показва с увреждания бутони
|
ButtonHideUnauthorized=Скриване на бутоните за неправомерни действия, вместо да се показва с увреждания бутони
|
||||||
ModulesSystemTools=Модули инструменти
|
|
||||||
ProductVatMassChange=Промяната в масата ДДС
|
ProductVatMassChange=Промяната в масата ДДС
|
||||||
ProductVatMassChangeDesc=Тази страница може да се използва за промяна на ДДС ставката, определена за продукти или услуги от стойността на друг. Внимание, тази промяна се прави на цялата база данни.
|
ProductVatMassChangeDesc=Тази страница може да се използва за промяна на ДДС ставката, определена за продукти или услуги от стойността на друг. Внимание, тази промяна се прави на цялата база данни.
|
||||||
OldVATRates=Old ставка на ДДС
|
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
|
ButtonHideUnauthorized=Amaga els botons d'accions no autoritzades en compte de mostrar-los atenuats
|
||||||
TotalNumberOfActivatedModules=Nombre total de mòduls activats: <b>%s</b>
|
TotalNumberOfActivatedModules=Nombre total de mòduls activats: <b>%s</b>
|
||||||
YouMustEnableOneModule=Ha d'activar almenys 1 mòdul.
|
YouMustEnableOneModule=Ha d'activar almenys 1 mòdul.
|
||||||
ModulesSystemTools=Mòduls utilitats
|
|
||||||
ProductVatMassChange=Modificar IVA en massa
|
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.
|
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
|
OldVATRates=Taxa d'IVA antiga
|
||||||
|
|||||||
@ -628,6 +628,11 @@ LinkedToSpecificUsers=Enllaçat a un contacte d'usuari particular
|
|||||||
DeleteAFile=Eliminació d'arxiu
|
DeleteAFile=Eliminació d'arxiu
|
||||||
ConfirmDeleteAFile=Confirme l'eliminació de l'arxiu
|
ConfirmDeleteAFile=Confirme l'eliminació de l'arxiu
|
||||||
NoResults=Cap resultat
|
NoResults=Cap resultat
|
||||||
|
ModulesSystemTools=Mòduls utilitats
|
||||||
|
View=Veure
|
||||||
|
Test=Prova
|
||||||
|
Element=Element
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Dilluns
|
Monday=Dilluns
|
||||||
Tuesday=Dimarts
|
Tuesday=Dimarts
|
||||||
@ -657,6 +662,3 @@ ShortThursday=Dj
|
|||||||
ShortFriday=Dv
|
ShortFriday=Dv
|
||||||
ShortSaturday=Ds
|
ShortSaturday=Ds
|
||||||
ShortSunday=Dg
|
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
|
EnterRefToBuildUrl=Enter reference for object %s
|
||||||
GetSecuredUrl=Get calculated URL
|
GetSecuredUrl=Get calculated URL
|
||||||
ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons
|
ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons
|
||||||
ModulesSystemTools=Modules tools
|
|
||||||
ProductVatMassChange=Mass VAT change
|
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.
|
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
|
OldVATRates=Old VAT rate
|
||||||
|
|||||||
@ -627,6 +627,7 @@ LinkedToSpecificUsers=Linked to a particular user contact
|
|||||||
DeleteAFile=Delete a file
|
DeleteAFile=Delete a file
|
||||||
ConfirmDeleteAFile=Are you sure you want to delete file
|
ConfirmDeleteAFile=Are you sure you want to delete file
|
||||||
NoResults=No results
|
NoResults=No results
|
||||||
|
ModulesSystemTools=Modules tools
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Monday
|
Monday=Monday
|
||||||
|
|||||||
@ -151,6 +151,7 @@ DiscountQtyMin=Discount quantity min. (by default)
|
|||||||
NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product
|
NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product
|
||||||
NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product
|
NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product
|
||||||
RecordedProducts=Products recorded
|
RecordedProducts=Products recorded
|
||||||
|
RecordedServices=Services recorded
|
||||||
RecordedProductsAndServices=Products/services recorded
|
RecordedProductsAndServices=Products/services recorded
|
||||||
GenerateThumb=Generate thumb
|
GenerateThumb=Generate thumb
|
||||||
ProductCanvasAbility=Use special "canvas" addons
|
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
|
ButtonHideUnauthorized=Ocultar los botones de acciones no autorizadas en vez de mostrarlos atenuados
|
||||||
TotalNumberOfActivatedModules=Número total de módulos activados: <b>%s</b>
|
TotalNumberOfActivatedModules=Número total de módulos activados: <b>%s</b>
|
||||||
YouMustEnableOneModule=Debe activar al menos 1 módulo.
|
YouMustEnableOneModule=Debe activar al menos 1 módulo.
|
||||||
ModulesSystemTools=Módulos utilidades
|
|
||||||
ProductVatMassChange=Modificar IVA en masa
|
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.
|
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
|
OldVATRates=Tasa de IVA antigua
|
||||||
|
|||||||
@ -628,6 +628,11 @@ LinkedToSpecificUsers=Enlazado a un contacto de usuario particular
|
|||||||
DeleteAFile=Eliminación de archivo
|
DeleteAFile=Eliminación de archivo
|
||||||
ConfirmDeleteAFile=Confirme la eliminación del archivo
|
ConfirmDeleteAFile=Confirme la eliminación del archivo
|
||||||
NoResults=Ningún resultado
|
NoResults=Ningún resultado
|
||||||
|
ModulesSystemTools=Módulos utilidades
|
||||||
|
View=Ver
|
||||||
|
Test=Prueba
|
||||||
|
Element=Elemento
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Lunes
|
Monday=Lunes
|
||||||
Tuesday=Martes
|
Tuesday=Martes
|
||||||
@ -658,6 +663,3 @@ ShortFriday=V
|
|||||||
ShortSaturday=S
|
ShortSaturday=S
|
||||||
ShortSunday=D
|
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)
|
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>
|
TotalNumberOfActivatedModules=Nombre total de modules fonctionnels activés: <b>%s</b>
|
||||||
YouMustEnableOneModule=Vous devez activer au moins une fonctionnalité
|
YouMustEnableOneModule=Vous devez activer au moins une fonctionnalité
|
||||||
ModulesSystemTools=Outils Modules
|
|
||||||
ProductVatMassChange=Modif TVA en masse
|
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.
|
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
|
OldVATRates=Ancien taux de TVA
|
||||||
|
|||||||
@ -629,6 +629,8 @@ LinkedToSpecificUsers=Liés à un contact utilisateur particulier
|
|||||||
DeleteAFile=Suppression de fichier
|
DeleteAFile=Suppression de fichier
|
||||||
ConfirmDeleteAFile=Confirmez-vous la suppression du fichier
|
ConfirmDeleteAFile=Confirmez-vous la suppression du fichier
|
||||||
NoResults=Aucun résultat
|
NoResults=Aucun résultat
|
||||||
|
ModulesSystemTools=Outils Modules
|
||||||
|
View=Voir
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Lundi
|
Monday=Lundi
|
||||||
@ -659,5 +661,3 @@ ShortThursday=J
|
|||||||
ShortFriday=V
|
ShortFriday=V
|
||||||
ShortSaturday=S
|
ShortSaturday=S
|
||||||
ShortSunday=D
|
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
|
NoPriceDefinedForThisSupplier=Aucun prix/qté défini pour ce fournisseur/produit
|
||||||
NoSupplierPriceDefinedForThisProduct=Aucun prix/qté fournisseur défini pour ce produit
|
NoSupplierPriceDefinedForThisProduct=Aucun prix/qté fournisseur défini pour ce produit
|
||||||
RecordedProducts=Produits en vente
|
RecordedProducts=Produits en vente
|
||||||
|
RecordedServices=Services en vente
|
||||||
RecordedProductsAndServices=Produits/Services en vente
|
RecordedProductsAndServices=Produits/Services en vente
|
||||||
GenerateThumb=Générer la vignette
|
GenerateThumb=Générer la vignette
|
||||||
ProductCanvasAbility=Utiliser les extensions spéciales "canvas"
|
ProductCanvasAbility=Utiliser les extensions spéciales "canvas"
|
||||||
|
|||||||
@ -69,11 +69,6 @@ $parameters=array();
|
|||||||
$object=(object) 'nothing';
|
$object=(object) 'nothing';
|
||||||
$reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
$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;
|
$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
|
$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
|
$alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want
|
||||||
@ -242,16 +237,21 @@ jQuery(document).ready(function () {
|
|||||||
jQuery('tr.moduleline').hide();
|
jQuery('tr.moduleline').hide();
|
||||||
// Enable this to allow personalized setup
|
// Enable this to allow personalized setup
|
||||||
jQuery('.modulelineshow').attr('href','#');
|
jQuery('.modulelineshow').attr('href','#');
|
||||||
|
jQuery('.cursorpointer').css('cursor','pointer');
|
||||||
jQuery(".modulelineshow").click(function() {
|
jQuery(".modulelineshow").click(function() {
|
||||||
var currentId = $(this).attr('id').substring(2);
|
var idstring=$(this).attr('id');
|
||||||
jQuery('tr.moduleline').hide();
|
if (typeof idstring != "undefined")
|
||||||
if (currentId != openedId)
|
|
||||||
{
|
{
|
||||||
openedId=currentId;
|
var currentId = idstring.substring(2);
|
||||||
jQuery("#tr1"+currentId).show();
|
jQuery('tr.moduleline').hide();
|
||||||
jQuery("#tr2"+currentId).show();
|
if (currentId != openedId)
|
||||||
|
{
|
||||||
|
openedId=currentId;
|
||||||
|
jQuery("#tr1"+currentId).show();
|
||||||
|
jQuery("#tr2"+currentId).show();
|
||||||
|
}
|
||||||
|
else openedId = '';
|
||||||
}
|
}
|
||||||
else openedId = '';
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</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";
|
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
|
// Title
|
||||||
print '<tr>';
|
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 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><a href="'.$urlwithmod.'" id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($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";
|
print '</tr>'."\n";
|
||||||
// Modules
|
// Modules
|
||||||
if (empty($profilearray['url']))
|
if (empty($profilearray['url']))
|
||||||
@ -368,18 +368,8 @@ print '<tr><td>';
|
|||||||
|
|
||||||
print '</td></tr>';
|
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>';
|
print '</table>';
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
// Google Adsense (need Google module)
|
// Google Adsense (need Google module)
|
||||||
if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
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();
|
llxFooterVierge();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show header for demo
|
* Show header for demo
|
||||||
@ -449,11 +441,11 @@ border-radius: 8px;
|
|||||||
-webkit-box-shadow: 4px 4px 4px #EEE;
|
-webkit-box-shadow: 4px 4px 4px #EEE;
|
||||||
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: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 85%, 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) 85%, 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) 85%, 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) 85%, 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; }';
|
// print '.CTableRow1 { background: #f0f0f0; color: #000000; }';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user