mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge remote-tracking branch 'Dolibarr/develop' into develop
This commit is contained in:
commit
259c8ed60d
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -24,3 +24,4 @@ Thumbs.db
|
|||
htdocs/includes/autoload.php
|
||||
htdocs/includes/bin/
|
||||
htdocs/includes/composer/
|
||||
/.pydevproject
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ if ($resql)
|
|||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create">' . $langs->trans("Addanaccount");
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
|
|
@ -132,6 +132,18 @@ if ($action == 'setdisabledirectinput') {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'setenabledraftexport') {
|
||||
$setenabledraftexport = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
|
@ -213,6 +225,19 @@ if (! empty($user->admin))
|
|||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ $button.= '</a>';
|
|||
|
||||
|
||||
$groupby = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt");
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ if ($action == 'delbookkeepingyear') {
|
|||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt");
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
llxHeader('', $langs->trans("FinanceJournal"));
|
||||
|
||||
$nom = $langs->trans("FinanceJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
|
||||
$nom = $langs->trans("FinanceJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0,1,1,'',1);
|
||||
$builddate=dol_now();
|
||||
//$description = $langs->trans("DescFinanceJournal") . '<br>';
|
||||
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
||||
|
|
@ -882,7 +882,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
|
||||
print '<div class="tabsAction tabsActionNoBottom">';
|
||||
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
||||
else print '<a class="butActionRefused" name="writebookkeeping">' . $langs->trans("WriteBookKeeping") . '</a>';
|
||||
print '</div>';
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
llxHeader('', $langs->trans("ExpenseReportsJournal"));
|
||||
|
||||
$nom = $langs->trans("ExpenseReportsJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
|
||||
$nom = $langs->trans("ExpenseReportsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0,1,1,'',1);
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
llxHeader('', $langs->trans("PurchasesJournal"));
|
||||
|
||||
$nom = $langs->trans("PurchasesJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
|
||||
$nom = $langs->trans("PurchasesJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0,1,1,'',1);
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
|
|
@ -738,7 +738,7 @@ if (empty($action) || $action == 'view') {
|
|||
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
}
|
||||
print '<div class="tabsAction tabsActionNoBottom">';
|
||||
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
|
||||
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
llxHeader('', $langs->trans("SellsJournal"));
|
||||
|
||||
$nom = $langs->trans("SellsJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
|
||||
$nom = $langs->trans("SellsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0,1,1,'',1);
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
|
|
@ -668,7 +668,7 @@ if (empty($action) || $action == 'view') {
|
|||
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
}
|
||||
print '<div class="tabsAction tabsActionNoBottom">';
|
||||
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
|
||||
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ if ($object->id > 0)
|
|||
$newcardbutton = '';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'">'.$langs->trans("AddAction");
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
|||
$newcardbutton='';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create">'.$langs->trans('NewMember');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMember').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ if ($result)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1">'.$langs->trans('NewSubscription');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||
$newcardbutton='';
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create">'.$langs->trans('NewMemberType');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMemberType').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ else
|
|||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -178,24 +178,30 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
|||
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||
$newmodule=new modFournisseur($db);
|
||||
// clear default rights array
|
||||
$newmodule->rights=array();
|
||||
// add new right
|
||||
$r=0;
|
||||
$newmodule->rights[$r][0] = 1190;
|
||||
$newmodule->rights[$r][1] = $langs->trans("Permission1190");
|
||||
$newmodule->rights[$r][2] = 'w';
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
|
||||
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
||||
{
|
||||
// clear default rights array
|
||||
$newmodule->rights=array();
|
||||
// add new right
|
||||
$r=0;
|
||||
$newmodule->rights[$r][0] = 1190;
|
||||
$newmodule->rights[$r][1] = $langs->trans("Permission1190");
|
||||
$newmodule->rights[$r][2] = 'w';
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
// Insert
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove all rights with Permission1190
|
||||
$newmodule->delete_permissions();
|
||||
|
||||
// Add all right without Permission1190
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ llxHeader('', $langs->trans("ListOfBookmarks"));
|
|||
$newcardbutton='';
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create">'.$langs->trans('NewBookmark');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewBookmark').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ if ($resql)
|
|||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d",$tmpforcreatebutton['year'],$tmpforcreatebutton['mon'],$tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'">'.$langs->trans("AddAction");
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d",$tmpforcreatebutton['year'],$tmpforcreatebutton['mon'],$tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ if ($result)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->mailing->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create">'.$langs->trans('NewMailing');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMailing').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ class Propal extends CommonObject
|
|||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
|
|
@ -635,6 +636,7 @@ class Propal extends CommonObject
|
|||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create">'.$langs->trans('NewPropal');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewPropal').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1278,6 +1278,7 @@ class Commande extends CommonOrder
|
|||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
|
|
@ -2844,6 +2845,7 @@ class Commande extends CommonOrder
|
|||
$qty=price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create">'.$langs->trans('NewOrder');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,6 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||
}
|
||||
print '</tr>';
|
||||
|
||||
$var=true;
|
||||
for ($mois = 1 ; $mois < 13 ; $mois++)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ if ($resql)
|
|||
if (! empty($conf->global->BANK_USE_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$search_account).'">'.$langs->trans("AddBankRecord");
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ if ($result)
|
|||
$num = $db->num_rows($result);
|
||||
$i = 0; $total = 0; $totalnb = 0;
|
||||
|
||||
$var=true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
|||
$newcardbutton='';
|
||||
if ($user->rights->banque->configurer)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create">'.$langs->trans("NewFinancialAccount");
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle">'.$langs->trans("NewFinancialAccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -402,7 +402,7 @@ print "</tr>\n";
|
|||
|
||||
|
||||
$total = array(); $found = 0; $i=0; $lastcurrencycode='';
|
||||
$var=true;
|
||||
|
||||
foreach ($accounts as $key=>$type)
|
||||
{
|
||||
if ($i >= $limit) break;
|
||||
|
|
@ -412,7 +412,6 @@ foreach ($accounts as $key=>$type)
|
|||
$obj = new Account($db);
|
||||
$obj->fetch($key);
|
||||
|
||||
$var = !$var;
|
||||
$solde = $obj->solde(1);
|
||||
|
||||
if (! empty($lastcurrencycode) && $lastcurrencycode != $obj->currency_code)
|
||||
|
|
@ -554,7 +553,7 @@ foreach ($accounts as $key=>$type)
|
|||
if (! empty($arrayfields['balance']['checked']))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$obj->id.'">'.price($solde, 0, $langs, 0, 0, -1, $obj->currency_code).'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$obj->id.'">'.price($solde, 0, $langs, 0, -1, -1, $obj->currency_code).'</a>';
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalbalancefield']=$totalarray['nbfield'];
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
|||
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=true;
|
||||
|
||||
// Current balance
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ if ($result)
|
|||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$total = 0 ;
|
||||
$var=true;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
|
|
@ -157,7 +156,7 @@ if ($result)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create">'.$langs->trans('MenuNewVariousPayment');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuNewVariousPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,12 +166,10 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||
$total = 0;
|
||||
$totalnb = 0;
|
||||
$totalpaye = 0;
|
||||
$var=true;
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven">';
|
||||
// Date
|
||||
$date=$obj->periode;
|
||||
|
|
@ -417,14 +415,13 @@ while($j<$numlt)
|
|||
print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"pv.datep","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
$var=1;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$total = $total + $obj->amount;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td align="left">'.dol_print_date($db->jdate($obj->dm),'day').'</td>'."\n";
|
||||
|
||||
|
|
@ -501,7 +498,7 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read)
|
|||
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account",$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
$var=1;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ if ($resql)
|
|||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
|
@ -177,7 +176,6 @@ if ($resql)
|
|||
$soc = new Societe($db);
|
||||
if ($obj->socid) $soc->fetch($obj->socid);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Id
|
||||
print '<td><a href="card.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ if (empty($reshook))
|
|||
|
||||
//var_dump($object->getRemainToPay(0));
|
||||
//var_dump($discount->amount_ttc);exit;
|
||||
if ($discount->amount_ttc > $object->getRemainToPay(0))
|
||||
if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0)))
|
||||
{
|
||||
// TODO Split the discount in 2 automatically
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -2608,6 +2608,7 @@ class Facture extends CommonInvoice
|
|||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva=price2num($txtva);
|
||||
|
|
@ -2832,6 +2833,7 @@ class Facture extends CommonInvoice
|
|||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ else if ($search_year > 0)
|
|||
{
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
if ($month_lim > 0)
|
||||
if ($search_month_lim > 0)
|
||||
{
|
||||
if ($search_year_lim > 0 && empty($search_day_lim))
|
||||
$sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_get_first_day($search_year_lim,$search_month_lim,false))."' AND '".$db->idate(dol_get_last_day($search_year_lim,$search_month_lim,false))."'";
|
||||
|
|
@ -514,7 +514,8 @@ else
|
|||
|
||||
$sql.= ' ORDER BY ';
|
||||
$listfield=explode(',',$sortfield);
|
||||
foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.$sortorder.',';
|
||||
$listorder=explode(',',$sortorder);
|
||||
foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.($listorder[$key]?$listorder[$key]:'DESC').',';
|
||||
$sql.= ' f.rowid DESC ';
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
|
|
@ -603,7 +604,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if($user->rights->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create">'.$langs->trans('NewBill');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -893,7 +894,7 @@ if ($resql)
|
|||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"f.fk_statut,f.paye,f.type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ if($calc ==0 || $calc == 2)
|
|||
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
$var=true;
|
||||
$total = 0; $totalamount = 0;
|
||||
$i = 1;
|
||||
foreach($coll_list as $coll)
|
||||
|
|
@ -256,7 +255,6 @@ if($calc ==0 || $calc == 1){
|
|||
$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
$var=true;
|
||||
$total = 0; $totalamount = 0;
|
||||
$i = 1;
|
||||
foreach($coll_list as $coll)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $localtax_static = new Localtax($db);
|
|||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt.'">'.$langs->trans('NewVATPayment');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt.'"><span class="valignmiddle">'.$langs->trans('NewLocalTaxPayment', ($ltt+1)).'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ print "</tr>\n";
|
|||
|
||||
if ($resql)
|
||||
{
|
||||
$var=false;
|
||||
if ($row = $db->fetch_row($resql) )
|
||||
{
|
||||
$num = $row[0];
|
||||
|
|
@ -114,7 +113,6 @@ if ($resql)
|
|||
print '<th align="right">'.$langs->trans("Status").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
{
|
||||
$checkdepositstatic->id=$objp->rowid;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new">'.$langs->trans('NewCheckDeposit');
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new"><span class="valignmiddle">'.$langs->trans('NewCheckDeposit').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -195,7 +195,6 @@ if ($resql)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ if ($result)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php">'.$langs->trans('NewStandingOrder');
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php"><span class="valignmiddle">'.$langs->trans('NewStandingOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ if ($result)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->salaries->payment->write)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/salaries/card.php?action=create">'.$langs->trans('NewSalaryPayment');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/salaries/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewSalaryPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
|||
$newcardbutton='';
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?action=create">'.$langs->trans('NewContactAddress');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewContactAddress').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
|||
$newcardbutton='';
|
||||
if ($user->rights->contrat->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create">'.$langs->trans('NewContractSubscription');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewContractSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -388,6 +388,7 @@ print '<input type="hidden" name="action" value="list">';
|
|||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
|
|
|
|||
|
|
@ -1457,7 +1457,16 @@ abstract class CommonObject
|
|||
{
|
||||
if ($trigkey)
|
||||
{
|
||||
$result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
||||
// call trigger with updated object values
|
||||
if (empty($this->fields) && method_exists($this, 'fetch'))
|
||||
{
|
||||
$result = $this->fetch($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->fetchCommon($id);
|
||||
}
|
||||
if ($result >= 0) $result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
||||
if ($result < 0) $error++;
|
||||
}
|
||||
|
||||
|
|
@ -6019,7 +6028,9 @@ abstract class CommonObject
|
|||
*/
|
||||
function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0)
|
||||
{
|
||||
global $_POST, $conf, $langs, $action;
|
||||
global $db, $conf, $langs, $action, $form;
|
||||
|
||||
if (! is_object($form)) $form=new Form($db);
|
||||
|
||||
$out = '';
|
||||
|
||||
|
|
@ -6128,12 +6139,12 @@ abstract class CommonObject
|
|||
|
||||
$labeltoshow = $langs->trans($label);
|
||||
|
||||
if ($extrafields->attributes[$this->table_element]['required'][$key])
|
||||
{
|
||||
$labeltoshow = '<span'.($mode != 'view' ? ' class="fieldrequired"':'').'>'.$labeltoshow.'</span>';
|
||||
}
|
||||
|
||||
$out .= '<td>'.$labeltoshow.'</td>';
|
||||
$out .= '<td class="titlefield';
|
||||
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
|
||||
$out .= '">';
|
||||
if (! empty($extrafields->attributes[$object->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$object->table_element]['help'][$key]);
|
||||
else $out .= $labeltoshow;
|
||||
$out .= '</td>';
|
||||
|
||||
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
||||
$out .='<td id="'.$html_id.'" class="'.$this->element.'_extras_'.$key.'" '.($colspan?' colspan="'.$colspan.'"':'').'>';
|
||||
|
|
|
|||
|
|
@ -519,10 +519,10 @@ class Conf
|
|||
|
||||
// Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal"
|
||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent,blockedlog'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||
|
||||
// Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list
|
||||
if (! empty($this->modules_parts['moduleforexternal']))
|
||||
foreach($this->modules_parts['moduleforexternal'] as $key=>$value) $this->global->MAIN_MODULES_FOR_EXTERNAL.=",$key";
|
||||
if (! empty($this->modules_parts['moduleforexternal'])) // Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list
|
||||
{
|
||||
foreach($this->modules_parts['moduleforexternal'] as $key=>$value) $this->global->MAIN_MODULES_FOR_EXTERNAL.=",".$key;
|
||||
}
|
||||
|
||||
// Enable select2
|
||||
if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT='select2';
|
||||
|
|
|
|||
|
|
@ -880,10 +880,17 @@ class DolGraph
|
|||
$this->stringtoshow.='<script id="'.$tag.'">'."\n";
|
||||
$this->stringtoshow.='$(function () {'."\n";
|
||||
$i=$firstlot;
|
||||
while ($i < $nblot)
|
||||
if ($nblot < 0)
|
||||
{
|
||||
$this->stringtoshow.=$serie[$i];
|
||||
$i++;
|
||||
$this->stringtoshow.='<!-- No series of data -->';
|
||||
}
|
||||
else
|
||||
{
|
||||
while ($i < $nblot)
|
||||
{
|
||||
$this->stringtoshow.=$serie[$i];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$this->stringtoshow.="\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -1434,7 +1434,8 @@ class ExtraFields
|
|||
$perms=dol_eval($this->attributes[$extrafieldsobjectkey]['perms'][$key], 1);
|
||||
$langfile=$this->attributes[$extrafieldsobjectkey]['langfile'][$key];
|
||||
$list=dol_eval($this->attributes[$extrafieldsobjectkey]['list'][$key], 1);
|
||||
$hidden=(empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
$help=$this->attributes[$extrafieldsobjectkey]['help'][$key];
|
||||
$hidden=(empty($list) ? 1 : 0); // If $list empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
}
|
||||
else // Old usage
|
||||
{
|
||||
|
|
@ -1449,7 +1450,8 @@ class ExtraFields
|
|||
$perms=dol_eval($this->attribute_perms[$key], 1);
|
||||
$langfile=$this->attribute_langfile[$key];
|
||||
$list=dol_eval($this->attribute_list[$key], 1);
|
||||
$hidden=(empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
$help=''; // Not supported with old syntax
|
||||
$hidden=(empty($list) ? 1 : 0); // If $list empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
}
|
||||
|
||||
if ($hidden) return ''; // This is a protection. If field is hidden, we should just not call this method.
|
||||
|
|
|
|||
|
|
@ -2651,7 +2651,7 @@ class Form
|
|||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('productprice').")";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productprice').")";
|
||||
$sql.= " AND p.tobuy = 1";
|
||||
$sql.= " AND s.fournisseur = 1";
|
||||
$sql.= " AND p.rowid = ".$productid;
|
||||
|
|
@ -3795,7 +3795,7 @@ class Form
|
|||
if ($("#" + inputname).attr("type") == "radio") { more = ":checked"; }
|
||||
var inputvalue = $("#" + inputname + more).val();
|
||||
if (typeof inputvalue == "undefined") { inputvalue=""; }
|
||||
options += "&" + inputname + "=" + inputvalue;
|
||||
options += "&" + inputname + "=" + encodeURIComponent(inputvalue);
|
||||
});
|
||||
}
|
||||
var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options;
|
||||
|
|
@ -3813,7 +3813,7 @@ class Form
|
|||
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
||||
var inputvalue = $("#" + inputname + more).val();
|
||||
if (typeof inputvalue == "undefined") { inputvalue=""; }
|
||||
options += "&" + inputname + "=" + inputvalue;
|
||||
options += "&" + inputname + "=" + encodeURIComponent(inputvalue);
|
||||
});
|
||||
}
|
||||
var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class FormActions
|
|||
$newcardbutton='';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(),'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:'').($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage).'">'.$langs->trans("AddEvent");
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(),'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:'').($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage).'"><span class="valignmiddle">'.$langs->trans("AddEvent").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ class FormMail extends Form
|
|||
* This search into table c_email_templates. Used by the get_form function.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $type_template Get message for type=$type_template, type='all' also included.
|
||||
* @param string $type_template Get message for model/type=$type_template, type='all' also included.
|
||||
* @param string $user Get template public or limited to this user
|
||||
* @param Translate $outputlangs Output lang object
|
||||
* @param int $id Id of template to find, or -1 for first found with position 0, or 0 for first found whatever is position (priority order depends on lang provided or not) or -2 for exact match with label (no answer if not found)
|
||||
|
|
@ -1100,7 +1100,8 @@ class FormMail extends Form
|
|||
}
|
||||
else { // If there is no template at all
|
||||
$defaultmessage='';
|
||||
if ($type_template=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
|
||||
if ($type_template=='body') { $defaultmessage=$this->withbody; } // Special case to use this->withbody as content
|
||||
elseif ($type_template=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
|
||||
elseif ($type_template=='facture_relance') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
|
||||
elseif ($type_template=='propal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendProposal"); }
|
||||
elseif ($type_template=='supplier_proposal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); }
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||
$newcardbutton='';
|
||||
if (! empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink))
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'">'.$langs->trans("AddProject");
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'"><span class="valignmiddle">'.$langs->trans("AddProject").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -931,7 +931,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress"));
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'">'.$addcontact;
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'"><span class="valignmiddle">'.$addcontact.'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -1185,7 +1185,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
|||
$newcardbutton='';
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/address.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'">'.$langs->trans("AddAddress");
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/address.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage).'"><span class="valignmiddle">'.$langs->trans("AddAddress").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4423,7 +4423,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
|
|||
* @param integer $form Type of format, HTML or not (not by default)
|
||||
* @param Translate $outlangs Object langs for output
|
||||
* @param int $trunc 1=Truncate if there is more decimals than MAIN_MAX_DECIMALS_SHOWN (default), 0=Does not truncate. Deprecated because amount are rounded (to unit or total amount accurancy) before beeing inserted into database or after a computation, so this parameter should be useless.
|
||||
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOTAL)
|
||||
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
|
||||
* @param int $forcerounding Force the number of decimal to forcerounding decimal (-1=do not force)
|
||||
* @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency)
|
||||
* @return string Chaine avec montant formate
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ function dolWebsiteOutput($content)
|
|||
}
|
||||
}
|
||||
|
||||
$content=preg_replace('/ contenteditable="true"/', ' contenteditable="false"', $content, -1, $nbrep);
|
||||
|
||||
dol_syslog("dolWebsiteOutput end");
|
||||
|
||||
print $content;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ class printing_printgcp extends PrintingDriver
|
|||
global $bc, $conf, $langs;
|
||||
$error = 0;
|
||||
$langs->load('printing');
|
||||
$var=true;
|
||||
|
||||
$html = '<tr class="liste_titre">';
|
||||
$html.= '<td>'.$langs->trans('GCP_Name').'</td>';
|
||||
|
|
@ -190,11 +189,9 @@ class printing_printgcp extends PrintingDriver
|
|||
$html.= '</tr>'."\n";
|
||||
$list = $this->getlist_available_printers();
|
||||
//$html.= '<td><pre>'.print_r($list,true).'</pre></td>';
|
||||
$var = true;
|
||||
foreach ($list['available'] as $printer_det)
|
||||
{
|
||||
$var = !$var;
|
||||
$html.= "<tr ".$bc[$var].">";
|
||||
$html.= '<tr class="oddeven">';
|
||||
$html.= '<td>'.$printer_det['name'].'</td>';
|
||||
$html.= '<td>'.$printer_det['displayName'].'</td>';
|
||||
$html.= '<td>'.$printer_det['id'].'</td>'; // id to identify printer to use
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ class printing_printipp extends PrintingDriver
|
|||
{
|
||||
global $bc, $conf, $langs;
|
||||
$error = 0;
|
||||
$var=true;
|
||||
|
||||
$html = '<tr class="liste_titre">';
|
||||
$html.= '<td>'.$langs->trans('IPP_Uri').'</td>';
|
||||
|
|
@ -160,12 +159,11 @@ class printing_printipp extends PrintingDriver
|
|||
$html.= '<td align="center">'.$langs->trans("Select").'</td>';
|
||||
$html.= "</tr>\n";
|
||||
$list = $this->getlist_available_printers();
|
||||
$var = true;
|
||||
foreach ($list as $value)
|
||||
{
|
||||
|
||||
$printer_det = $this->get_printer_detail($value);
|
||||
$html.= "<tr ".$bc[$var].">";
|
||||
$html.= '<tr class="oddeven">';
|
||||
$html.= '<td>'.$value.'</td>';
|
||||
//$html.= '<td><pre>'.print_r($printer_det,true).'</pre></td>';
|
||||
$html.= '<td>'.$printer_det->printer_name->_value0.'</td>';
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||
function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies", "main"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "ODT templates";
|
||||
|
|
@ -951,7 +951,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||
$elementarray = $object->get_element_list($keyref, $tablename);
|
||||
if (count($elementarray)>0 && is_array($elementarray))
|
||||
{
|
||||
$var=true;
|
||||
$var=true;
|
||||
$total_ht = 0;
|
||||
$total_ttc = 0;
|
||||
$num=count($elementarray);
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||
function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("errors");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies", "errors"));
|
||||
|
||||
$form = new Form($this->db);
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||
}
|
||||
catch(OdfException $e)
|
||||
{
|
||||
// setVars failed, probably because key not found
|
||||
// setVars failed, probably because key not found
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -378,8 +378,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||
}
|
||||
}
|
||||
|
||||
// Call the beforeODTSave hook
|
||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
// Call the beforeODTSave hook
|
||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Write new file
|
||||
|
|
@ -418,7 +418,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||
$odfHandler=null; // Destroy object
|
||||
|
||||
$this->result = array('fullpath'=>$file);
|
||||
|
||||
|
||||
return 1; // Success
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -158,11 +158,21 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
|
||||
// Define position of columns
|
||||
$this->posxdesc=$this->marge_gauche+1;
|
||||
$this->posxtva=102;
|
||||
$this->posxup=126;
|
||||
$this->posxqty=145;
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
|
||||
if ($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
$this->posxtva=101;
|
||||
$this->posxup=118;
|
||||
$this->posxqty=135;
|
||||
$this->posxunit=151;
|
||||
} else {
|
||||
$this->posxtva=102;
|
||||
$this->posxup=126;
|
||||
$this->posxqty=145;
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva;
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
|
|
@ -326,7 +336,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
|
|
@ -505,7 +515,23 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); // Enough for 6 chars
|
||||
// Enough for 6 chars
|
||||
if($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 3, $qty, 0, 'R');
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R');
|
||||
}
|
||||
|
||||
// Unit
|
||||
if($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxunit-0.8, 4, $unit, 0, 'L');
|
||||
}
|
||||
|
||||
// Discount on line
|
||||
/*
|
||||
|
|
@ -1196,8 +1222,24 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
if($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
$pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
}
|
||||
}
|
||||
|
||||
if($conf->global->PRODUCT_USE_UNITS) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
||||
'C');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ if (empty($conf) || ! is_object($conf))
|
|||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
if (! is_object($form)) $form=new Form($db);
|
||||
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE commonfields_edit.tpl.php -->
|
||||
|
|
@ -45,8 +46,10 @@ foreach($object->fields as $key => $val)
|
|||
print ' class="titlefieldcreate';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '">';
|
||||
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $val['help']);
|
||||
else print $langs->trans($val['label']);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOSTISSET($key)?GETPOST($key, 'int'):$object->$key;
|
||||
elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOSTISSET($key)?GETPOST($key,'none'):$object->$key;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ if (empty($conf) || ! is_object($conf))
|
|||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
if (! is_object($form)) $form=new Form($db);
|
||||
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
||||
|
|
@ -50,8 +51,10 @@ foreach($object->fields as $key => $val)
|
|||
print ' class="titlefield';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '">';
|
||||
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $val['help']);
|
||||
else print $langs->trans($val['label']);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
//print dol_escape_htmltag($object->$key, 1, 1);
|
||||
|
|
@ -87,8 +90,10 @@ foreach($object->fields as $key => $val)
|
|||
print ' class="titlefield';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '">';
|
||||
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $val['help']);
|
||||
else print $langs->trans($val['label']);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
//print dol_escape_htmltag($object->$key, 1, 1);
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ if (empty($object) || ! is_object($object))
|
|||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
if (! is_object($form)) $form=new Form($db);
|
||||
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE extrafields_view.tpl.php -->
|
||||
|
|
@ -88,13 +89,18 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr>';
|
||||
print '<td';
|
||||
print ' class="titlefield';
|
||||
//var_dump($action);exit;
|
||||
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' class="fieldrequired"';
|
||||
print '>' . $langs->trans($label) . '</td>';
|
||||
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' fieldrequired';
|
||||
print '">';
|
||||
if (! empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $extrafields->attributes[$object->table_element]['help'][$key]);
|
||||
else print $langs->trans($label);
|
||||
print '</td>';
|
||||
|
||||
//TODO Improve element and rights detection
|
||||
//var_dump($user->rights);
|
||||
|
|
@ -120,6 +126,8 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
print '<td align="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?'.$fieldid.'=' . $object->id . '&action=edit_extras&attribute=' . $key . '">' . img_edit().'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td>';
|
||||
|
||||
$html_id = !empty($object->id) ? $object->element.'_extras_'.$key.'_'.$object->id : '';
|
||||
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$key.'" colspan="'.$cols.'">';
|
||||
|
||||
|
|
@ -137,7 +145,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
}
|
||||
|
||||
//TODO Improve element and rights detection
|
||||
if ($action == 'edit_extras' && $permok && GETPOST('attribute') == $key)
|
||||
if ($action == 'edit_extras' && $permok && GETPOST('attribute','none') == $key)
|
||||
{
|
||||
$fieldid='id';
|
||||
if ($object->table_element == 'societe') $fieldid='socid';
|
||||
|
|
@ -150,7 +158,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
|
||||
print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id);
|
||||
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Modify')) . '">';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
|
@ -159,12 +167,18 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
//print $key.'-'.$value.'-'.$object->table_element;
|
||||
print $extrafields->showOutputField($key, $value, '', $object->table_element);
|
||||
}
|
||||
print '</td></tr>' . "\n";
|
||||
print '</td>';
|
||||
print '</tr>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
// Add code to manage list depending on others
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
print '
|
||||
|
||||
// Add code to manage list depending on others
|
||||
// TODO Test/enhance this with a more generic solution
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print "\n";
|
||||
print '
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function showOptions(child_list, parent_list)
|
||||
|
|
@ -193,7 +207,6 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||
setListDependencies();
|
||||
});
|
||||
</script>'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -141,17 +141,26 @@ class InterfaceStripe
|
|||
$stripeacc = $stripe->getStripeAccount($service); // No need of network access for this
|
||||
|
||||
if ($object->client != 0) {
|
||||
$customer = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||
if ($customer) {
|
||||
if (! empty($object->email))
|
||||
{
|
||||
$customer->email = $object->email;
|
||||
}
|
||||
$customer->description = $object->name;
|
||||
// TODO More data
|
||||
//$customer->vat = $object->tva_intra
|
||||
$customer = $stripe->customerStripe($object, $stripeacc, $servicestatus); // This make a network request
|
||||
if ($customer)
|
||||
{
|
||||
$namecleaned = $object->name ? $object->name : null;
|
||||
$vatcleaned = $object->tva_intra ? $object->tva_intra : null; // We force data to "null" if empty as expected by Stripe
|
||||
|
||||
$customer->save();
|
||||
// Detect if we change a Stripe info (email, description, vat id)
|
||||
$changerequested = 0;
|
||||
if (! empty($object->email) && $object->email != $customer->email) $changerequested++;
|
||||
if ($namecleaned != $customer->description) $changerequested++;
|
||||
if ($vatcleaned != $customer->business_vat_id) $changerequested++;
|
||||
|
||||
if ($changerequested)
|
||||
{
|
||||
if (! empty($object->email)) $customer->email = $object->email;
|
||||
$customer->description = $namecleaned;
|
||||
$customer->business_vat_id = $vatcleaned;
|
||||
|
||||
$customer->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,13 +341,13 @@ print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
|||
$newcardbutton='';
|
||||
if ($user->rights->cron->create)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" style="margin-right: 0px;margin-left: 0px;" href="'.DOL_URL_ROOT.'/cron/card.php?action=create">'.$langs->trans("CronCreateJob");
|
||||
$newcardbutton.='<a class="butActionNew" style="margin-right: 0px;margin-left: 0px;" href="'.DOL_URL_ROOT.'/cron/card.php?action=create"><span class="valignmiddle">'.$langs->trans("CronCreateJob").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNewRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("CronCreateJob");
|
||||
$newcardbutton.='<a class="butActionNewRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'"><span class="valignmiddle">'.$langs->trans("CronCreateJob").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -419,7 +419,6 @@ if ($num > 0)
|
|||
$style='pair';
|
||||
$now = dol_now();
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->don->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/don/card.php?action=create">'.$langs->trans('NewDonation');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/don/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewDonation').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1128,7 +1128,6 @@ if ($action == 'create')
|
|||
print "</tr>\n";
|
||||
}
|
||||
|
||||
$var=true;
|
||||
$indiceAsked = 0;
|
||||
while ($indiceAsked < $numAsked)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->expedition->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expedition/card.php?action=create2">'.$langs->trans('NewSending');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expedition/card.php?action=create2"><span class="valignmiddle">'.$langs->trans('NewSending').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
@ -461,7 +461,6 @@ if ($resql)
|
|||
print "</tr>\n";
|
||||
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -642,7 +642,6 @@ if ($id > 0 || ! empty($ref))
|
|||
}
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
$toBeShipped=array();
|
||||
$toBeShippedTotal=0;
|
||||
while ($i < $num)
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->expensereport->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create">'.$langs->trans('NewTrip');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewTrip').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@ if ($action == 'create' || empty($action))
|
|||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
$total=0;
|
||||
$totalrecu=0;
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,6 @@ print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
|||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
|
|
@ -263,7 +262,7 @@ foreach ($data as $val)
|
|||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';
|
||||
|
|
@ -272,7 +271,7 @@ foreach ($data as $val)
|
|||
}
|
||||
|
||||
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||
|
|
|
|||
|
|
@ -1397,11 +1397,11 @@ class FichinterLigne extends CommonObjectLine
|
|||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'fichinterdet');
|
||||
$this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.'fichinterdet');
|
||||
$this->rowid=$this->id;
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$this->id=$this->id;
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
|
|
@ -1472,7 +1472,6 @@ class FichinterLigne extends CommonObjectLine
|
|||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$this->id=$this->id;
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create">'.$langs->trans('NewIntervention');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewIntervention').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1458,6 +1458,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
|
|
@ -2419,6 +2420,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$qty=price2num($qty);
|
||||
if (! $qty) $qty=1;
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
|
|
|||
|
|
@ -964,6 +964,7 @@ if (empty($reshook))
|
|||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($object->error,$object->errors,'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create">'.$langs->trans('NewOrder');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create">'.$langs->trans('NewBill');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ else
|
|||
$newcardbutton='';
|
||||
if ($user->rights->holiday->write)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/holiday/card.php?action=request">'.$langs->trans('MenuAddCP');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/holiday/card.php?action=request"><span class="valignmiddle">'.$langs->trans('MenuAddCP').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,8 @@ INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES
|
|||
|
||||
-- Description of chart of account FR PCG99-ABREGE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG99-ABREGE', 'The simple accountancy french plan', 1);
|
||||
|
||||
-- Description of chart of account FR PCG99-BASE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG99-BASE', 'The base accountancy french plan', 1);
|
||||
|
||||
-- Description of chart of account FR PCG14-DEV
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG14-DEV', 'The developed accountancy french plan 2014', 1);
|
||||
|
||||
|
|
@ -53,6 +51,10 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
|
|||
-- Description of chart of account ES PCG08-PYME
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 4, 'PCG08-PYME', 'The PYME accountancy spanish plan', 1);
|
||||
|
||||
-- Description of chart of account DE SKR03
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 5, 'SKR03', 'Standardkontenrahmen SKR 03', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 5, 'SKR04', 'Standardkontenrahmen SKR 04', 1);
|
||||
|
||||
-- Description of chart of account CH PCG_SUISSE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 6, 'PCG_SUISSE', 'Switzerland plan', 1);
|
||||
|
||||
|
|
|
|||
7791
htdocs/install/mysql/data/llx_accounting_account_de.sql
Normal file
7791
htdocs/install/mysql/data/llx_accounting_account_de.sql
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -231,7 +231,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2
|
|||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 254, 25, '6','0','VAT reduced rate',1);
|
||||
|
||||
-- ROMANIA (id country=188)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1881, 188, '20','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1881, 188, '19','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1882, 188, '9','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1884, 188, '5','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1883, 188, '0','0','VAT Rate 0', 1);
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ ALTER TABLE llx_oauth_token ADD COLUMN tokenstring text;
|
|||
ALTER TABLE llx_societe_rib ADD COLUMN type varchar(32) DEFAULT 'ban' after rowid;
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN last_four varchar(4);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN card_type varchar(255);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN cvn varchar(255);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN cvn varchar(255);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN exp_date_month INTEGER;
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN exp_date_year INTEGER;
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN country_code varchar(10);
|
||||
|
|
@ -526,3 +526,9 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SS', 11801, NULL, 0, 'SS', 'Sumatera Selatan', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SU', 11801, NULL, 0, 'SU', 'Sumatera Utara ', 1);
|
||||
|
||||
-- New available chart of accounts
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (188, 'RO-BASE', 'Plan de conturi romanesc', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 5, 'SKR03', 'Standardkontenrahmen SKR 03', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 5, 'SKR04', 'Standardkontenrahmen SKR 04', 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ CREATE TABLE llx_website_page
|
|||
(
|
||||
rowid integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
fk_website integer NOT NULL,
|
||||
type_container varchar(16) NOT NULL DEFAULT 'page'
|
||||
pageurl varchar(255) NOT NULL,
|
||||
aliasalt varchar(255),
|
||||
title varchar(255),
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
|
|||
'MAIN_MODULE_PRINTING'=>'newboxdefonly',
|
||||
'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
|
||||
'MAIN_MODULE_SALARIES'=>'newboxdefonly',
|
||||
'MAIN_MODULE_SYSLOG'=>'newboxdefonly',
|
||||
'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
|
||||
'MAIN_MODULE_SERVICE'=>'newboxdefonly',
|
||||
'MAIN_MODULE_USER'=>'newboxdefonly', //This one must be always done and only into last targeted version)
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts (If you set
|
|||
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts (If you set value to 6 here, the account '401' will appear like '401000' on screen)
|
||||
ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zero at the end of an accounting account. Needed by some countries (like switzerland). If keep to off (default), you can set the 2 following parameters to ask application to add virtual zero.
|
||||
BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account
|
||||
ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal
|
||||
|
||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ ModuleCompanyCodeDigitaria=Accounting code depends on third party code. The code
|
|||
Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).<br>Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required.
|
||||
UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than...
|
||||
WarningPHPMail=WARNING: It is often better to setup outgoing emails to use the email server of your provider instead of the default setup. Some email providers (like Yahoo) does not allow you to send an email from another server than their own server. Your current setup use the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not a server of them, so few of your sent Emails may not be accepted (be carefull also to your email provider sending quota).<br>If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account).
|
||||
WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of your ERP CRM application: <strong>%s</strong>.
|
||||
WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: <strong>%s</strong>.
|
||||
ClickToShowDescription=Click to show description
|
||||
DependsOn=This module need the module(s)
|
||||
RequiredBy=This module is required by module(s)
|
||||
|
|
@ -891,7 +891,7 @@ DictionaryCivility=Personal and professional titles
|
|||
DictionaryActions=Types of agenda events
|
||||
DictionarySocialContributions=Social or fiscal taxes types
|
||||
DictionaryVAT=VAT Rates or Sales Tax Rates
|
||||
DictionaryRevenueStamp=Amount of revenue stamps
|
||||
DictionaryRevenueStamp=Amount of tax stamps
|
||||
DictionaryPaymentConditions=Payment terms
|
||||
DictionaryPaymentModes=Payment modes
|
||||
DictionaryTypeContact=Contact/Address types
|
||||
|
|
@ -919,7 +919,7 @@ SetupSaved=Setup saved
|
|||
SetupNotSaved=Setup not saved
|
||||
BackToModuleList=Back to modules list
|
||||
BackToDictionaryList=Back to dictionaries list
|
||||
TypeOfRevenueStamp=Type of revenue stamp
|
||||
TypeOfRevenueStamp=Type of tax stamp
|
||||
VATManagement=VAT Management
|
||||
VATIsUsedDesc=By default when creating prospects, invoices, orders etc the VAT rate follows the active standard rule:<br>If the seller is not subjected to VAT, then VAT defaults to 0. End of rule.<br>If the (selling country= buying country), then the VAT by default equals the VAT of the product in the selling country. End of rule. <br>If seller and buyer are both in the European Community and goods are transport products (car, ship, plane), the default VAT is 0 ( The VAT should be paid by the buyer to the customoffice of his country and not to the seller). End of rule.<br>If seller and buyer are both in the European Community and the buyer is not a company, then the VAT by defaults to the VAT of the product sold. End of rule.<br>If seller and buyer are both in the European Community and the buyer is a company, then the VAT is 0 by default . End of rule.<br>In any othe case the proposed default is VAT=0. End of rule.
|
||||
VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases like associations, individuals ou small companies.
|
||||
|
|
@ -1458,7 +1458,7 @@ SyslogFilename=File name and path
|
|||
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
|
||||
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
|
||||
OnlyWindowsLOG_USER=Windows only supports LOG_USER
|
||||
CompressSyslogs=Syslog files compression and backup
|
||||
CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug)
|
||||
SyslogFileNumberOfSaves=Log backups
|
||||
ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency
|
||||
##### Donations #####
|
||||
|
|
|
|||
|
|
@ -160,5 +160,6 @@ VariousPayment=Miscellaneous payments
|
|||
VariousPayments=Miscellaneous payments
|
||||
ShowVariousPayment=Show miscellaneous payments
|
||||
AddVariousPayment=Add miscellaneous payments
|
||||
SEPAMandate=SEPA mandate
|
||||
YourSEPAMandate=Your SEPA mandate
|
||||
FindYourSEPAMandate=This is your SEPA mandate to authorize our company to make direct debit order to your bank. Thanks to return it signed (scan of the signed document) or sent it by mail to
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ VATPayment=Sales tax payment
|
|||
VATPayments=Sales tax payments
|
||||
VATRefund=Sales tax refund
|
||||
NewVATPayment=New sales tax payment
|
||||
NewLocalTaxPayment=New tax %s payment
|
||||
Refund=Refund
|
||||
SocialContributionsPayments=Social/fiscal taxes payments
|
||||
ShowVatPayment=Show VAT payment
|
||||
|
|
|
|||
|
|
@ -46,6 +46,5 @@ ECMSelectASection=Select a directory in the tree...
|
|||
DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Resync" button first to synchronize disk and database to get content of this directory.
|
||||
ReSyncListOfDir=Resync list of directories
|
||||
HashOfFileContent=Hash of file content
|
||||
NoDirectoriesFound=No directories found
|
||||
FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it)
|
||||
FileSharedViaALink=File shared via a link
|
||||
NoDirectoriesFound=No directories found
|
||||
|
|
@ -945,3 +945,5 @@ KeyboardShortcut=Keyboard shortcut
|
|||
AssignedTo=Assigned to
|
||||
Deletedraft=Delete draft
|
||||
ConfirmMassDraftDeletion=Draft Bulk delete confirmation
|
||||
FileSharedViaALink=File shared via a link
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ ToOfferALinkForOnlinePaymentOnMemberSubscription=URL to offer a %s online paymen
|
|||
YouCanAddTagOnUrl=You can also add url parameter <b>&tag=<i>value</i></b> to any of those URL (required only for free payment) to add your own payment comment tag.
|
||||
SetupPayBoxToHavePaymentCreatedAutomatically=Setup your PayBox with url <b>%s</b> to have payment created automatically when validated by paybox.
|
||||
YourPaymentHasBeenRecorded=This page confirms that your payment has been recorded. Thank you.
|
||||
YourPaymentHasNotBeenRecorded=You payment has not been recorded and transaction has been canceled. Thank you.
|
||||
YourPaymentHasNotBeenRecorded=You payment has NOT been recorded and transaction has been canceled. Thank you.
|
||||
AccountParameter=Account parameters
|
||||
UsageParameter=Usage parameters
|
||||
InformationToFindParameters=Help to find your %s account information
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ ToOfferALinkForOnlinePaymentOnFreeAmount=URL to offer a %s online payment user i
|
|||
ToOfferALinkForOnlinePaymentOnMemberSubscription=URL to offer a %s online payment user interface for a member subscription
|
||||
YouCanAddTagOnUrl=You can also add url parameter <b>&tag=<i>value</i></b> to any of those URL (required only for free payment) to add your own payment comment tag.
|
||||
SetupStripeToHavePaymentCreatedAutomatically=Setup your Stripe with url <b>%s</b> to have payment created automatically when validated by Stripe.
|
||||
YourPaymentHasBeenRecorded=This page confirms that your payment has been recorded. Thank you.
|
||||
YourPaymentHasNotBeenRecorded=You payment has not been recorded and transaction has been canceled. Thank you.
|
||||
AccountParameter=Account parameters
|
||||
UsageParameter=Usage parameters
|
||||
InformationToFindParameters=Help to find your %s account information
|
||||
|
|
|
|||
|
|
@ -124,15 +124,6 @@ TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automaticall
|
|||
TicketNumberingModules=Tickets numbering module
|
||||
TicketNotifyTiersAtCreation=Notify thirdparty at creation
|
||||
|
||||
#
|
||||
# About page
|
||||
#
|
||||
About=About
|
||||
TicketAbout=About ticket module
|
||||
TicketAboutModule=The development of this module has been initiated by the company Libr&thic.
|
||||
TicketAboutModuleHelp=You can get help by using the contact form on the website <a href="http://librethic.io">librethic.io</a>
|
||||
TicketAboutModuleImprove=Feel free to suggest improvements! Please visit <a href="https://code.librethic.io/Dolibarr/modules/ticket">the project page</a> on Doliforge website to report bugs and add tasks.
|
||||
|
||||
#
|
||||
# Index & list page
|
||||
#
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ WEBSITE_TYPE_CONTAINER=Type of page/container
|
|||
WEBSITE_PAGE_EXAMPLE=Web page to use as example
|
||||
WEBSITE_PAGENAME=Page name/alias
|
||||
WEBSITE_ALIASALT=Alternative page names/aliases
|
||||
WEBSITE_ALIASALTDesc=Use here list of other name/aliases so the page can also be accessed using this other names/aliases (for example the old name after renaming the alias to keep backlink on old link/name working). Syntax is:<br>alternativename1, alternativename2, ...
|
||||
WEBSITE_CSS_URL=URL of external CSS file
|
||||
WEBSITE_CSS_INLINE=CSS file content (common to all pages)
|
||||
WEBSITE_JS_INLINE=Javascript file content (common to all pages)
|
||||
|
|
@ -81,4 +82,5 @@ WebsiteRootOfImages=Root directory for website images
|
|||
SubdirOfPage=Sub-directory dedicated to page
|
||||
AliasPageAlreadyExists=Alias page <strong>%s</strong> already exists
|
||||
CorporateHomePage=Corporate Home page
|
||||
EmptyPage=Empty page
|
||||
EmptyPage=Empty page
|
||||
ExternalURLMustStartWithHttp=External URL must start with http:// or https://
|
||||
|
|
@ -117,7 +117,7 @@ if ($resql)
|
|||
$newcardbutton='';
|
||||
if ($user->rights->loan->write)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/loan/card.php?action=create">'.$langs->trans('NewLoan');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/loan/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewLoan').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,8 +59,10 @@ $arrayofparameters=array('MYMODULE_MYPARAM1'=>array('css'=>'minwidth200'), 'MYMO
|
|||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
if ((float) DOL_VERSION >= 6)
|
||||
{
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ class modMyModule extends DolibarrModules
|
|||
'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
|
||||
'js' => array('/mymodule/js/mymodule.js.php'), // Set this to relative path of js file if module must load a js on all pages
|
||||
'hooks' => array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>'0') // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
'hooks' => array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>'0'), // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
'moduleforexternal' => 0 // Set this to 1 if feature of module are opened to external users
|
||||
);
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
|
|
@ -313,7 +314,8 @@ class modMyModule extends DolibarrModules
|
|||
*/
|
||||
public function init($options='')
|
||||
{
|
||||
$this->_load_tables('/mymodule/sql/');
|
||||
$result=$this->_load_tables('/mymodule/sql/');
|
||||
if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default')
|
||||
|
||||
// Create extrafields
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
|||
$newcardbutton='';
|
||||
//if ($user->rights->mymodule->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="card.php?action=create">'.$langs->trans('New');
|
||||
$newcardbutton='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ $fieldtosortuser=empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?'firstname':
|
|||
$newcardbutton='';
|
||||
if (!$user->rights->opensurvey->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/opensurvey/wizard/index.php">'.$langs->trans('NewSurvey');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/opensurvey/wizard/index.php"><span class="valignmiddle">'.$langs->trans('NewSurvey').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ if (empty($reshook))
|
|||
|
||||
if ($result >= 0)
|
||||
{
|
||||
$result = $object->setValueFrom('barcode', GETPOST('barcode'));
|
||||
$result = $object->setValueFrom('barcode', GETPOST('barcode'), '', null, 'text', '', $user, 'PRODUCT_MODIFY');
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -987,7 +987,7 @@ class Product extends CommonObject
|
|||
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("errors");
|
||||
if (empty($conf->barcode->enabled)) $this->error=$langs->trans("Error")." : ".$langs->trans("ErrorProductAlreadyExists",$this->ref);
|
||||
if (empty($conf->barcode->enabled) || empty($this->barcode)) $this->error=$langs->trans("Error")." : ".$langs->trans("ErrorProductAlreadyExists",$this->ref);
|
||||
else $this->error=$langs->trans("Error")." : ".$langs->trans("ErrorProductBarCodeAlreadyExists",$this->barcode);
|
||||
$this->errors[]=$this->error;
|
||||
$this->db->rollback();
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ else
|
|||
{
|
||||
$label='NewProduct';
|
||||
if($type == Product::TYPE_SERVICE) $label='NewService';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/product/card.php?action=create&type='.$type.'">'.$langs->trans($label);
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/product/card.php?action=create&type='.$type.'"><span class="valignmiddle">'.$langs->trans($label).'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user