Code was corrupted with very bad commits. I restore files manually.
This commit is contained in:
parent
a2e9832c8d
commit
91caea5707
@ -24,9 +24,7 @@ Dolibarr 4.0 should be compatible with PHP 7 but more feedbacks are still expect
|
||||
|
||||
Following changes may create regression for some external modules, but were necessary to make
|
||||
Dolibarr better:
|
||||
- Method FormBank::select_type_comptes_financiers() has been renamed into FormBank::selectTypeOfBankAccount()
|
||||
- Method Form::form_date() has been renamed into Form::formDate()
|
||||
- Method Form::select_date() has been renamed into Form::selectDate()
|
||||
- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount()
|
||||
|
||||
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete'))
|
||||
dol_fiche_head();
|
||||
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
|
||||
@ -370,7 +370,7 @@ if ($resql)
|
||||
}*/
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -62,7 +62,7 @@ if (! $sortorder)
|
||||
$sortorder = "ASC";
|
||||
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
|
||||
@ -162,12 +162,12 @@ if ($action == 'create') {
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||
print Form::selectDate(($date_start ? $date_start : ''), 'fiscalyear');
|
||||
print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||
print Form::selectDate(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||
print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
@ -216,12 +216,12 @@ if ($action == 'create') {
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
|
||||
print Form::selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
||||
print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
|
||||
print Form::selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
||||
print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
@ -245,7 +245,7 @@ if ($action == 'create') {
|
||||
* Confirm delete
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete");
|
||||
}
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
|
||||
@ -263,23 +263,23 @@ if ($action == 'create') {
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">';
|
||||
print Form::editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print '</td><td colspan="2">';
|
||||
print Form::editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print "</td></tr>";
|
||||
|
||||
// Date start
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print '</td><td colspan="2">';
|
||||
print Form::editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print '</td><td colspan="2">';
|
||||
print Form::editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@ -161,9 +161,9 @@ else {
|
||||
|
||||
print '<div class="liste_titre">';
|
||||
print $langs->trans('DateStart') . ': ';
|
||||
print Form::selectDate($search_date_start, 'date_start', 0, 0, 1);
|
||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||
print $langs->trans('DateEnd') . ': ';
|
||||
print Form::selectDate($search_date_end, 'date_end', 0, 0, 1);
|
||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -203,7 +203,7 @@ $formventilation = new FormVentilation($db);
|
||||
* Confirmation to delete the command
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ if ($action == 'create') {
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Docdate") . '</td>';
|
||||
print '<td>';
|
||||
print Form::selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -340,7 +340,7 @@ else {
|
||||
}
|
||||
|
||||
if ($action == 'delmouv') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
if ($action == 'delbookkeepingyear') {
|
||||
@ -361,7 +361,7 @@ else {
|
||||
'default' => $delyear
|
||||
);
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
@ -394,10 +394,10 @@ else {
|
||||
print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
|
||||
print '<td class="liste_titre">';
|
||||
print $langs->trans('From') . ': ';
|
||||
print Form::selectDate($search_date_start, 'date_start', 0, 0, 1);
|
||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
print $langs->trans('To') . ': ';
|
||||
print Form::selectDate($search_date_end, 'date_end', 0, 0, 1);
|
||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||
print '</td>';
|
||||
print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
|
||||
print '<td>';
|
||||
|
||||
@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da
|
||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
print '<div class="liste_titre">';
|
||||
print $langs->trans('DateStart') . ': ';
|
||||
print Form::selectDate($search_date_start, 'date_start');
|
||||
print $form->select_date($search_date_start, 'date_start');
|
||||
print $langs->trans('DateEnd') . ': ';
|
||||
print Form::selectDate($search_date_end, 'date_end');
|
||||
print $form->select_date($search_date_end, 'date_end');
|
||||
print '</div>';
|
||||
print '<div class="liste_titre">';
|
||||
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
|
||||
@ -220,7 +220,7 @@ print '<input type="text" size=7 class="flat" name="search_doc_type" value="' .
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
print Form::selectDate($search_doc_date, 'doc_date', 0, 0, 1);
|
||||
print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
|
||||
@ -52,9 +52,8 @@ require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php';
|
||||
$langs->load("companies");
|
||||
$langs->load("other");
|
||||
$langs->load("compta");
|
||||
$langs->load("banks");
|
||||
$langs->load("bank");
|
||||
$langs->load('bills');
|
||||
$langs->load('donations');
|
||||
$langs->load("accountancy");
|
||||
|
||||
$id_bank_account = GETPOST('id_account', 'int');
|
||||
@ -131,12 +130,11 @@ if ($result) {
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
// Variables
|
||||
$account_supplier = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||
$account_customer = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||
$account_employee = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||
$account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$account_transfer = (! empty($conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH) ? $conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH : $langs->trans("CodeNotDef"));
|
||||
$cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef"));
|
||||
|
||||
$tabpay = array ();
|
||||
$tabbq = array ();
|
||||
@ -156,9 +154,11 @@ if ($result) {
|
||||
// Controls
|
||||
$compta_bank = $obj->account_number;
|
||||
if ($obj->label == '(SupplierInvoicePayment)')
|
||||
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier);
|
||||
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $cptfour);
|
||||
if ($obj->label == '(CustomerInvoicePayment)')
|
||||
$compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $account_customer);
|
||||
$compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $cptcli);
|
||||
if ($obj->typeop == '(BankTransfert)')
|
||||
$compta_soc = $conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH;
|
||||
|
||||
// Variable bookkeeping
|
||||
$tabpay[$obj->rowid]["date"] = $obj->do;
|
||||
@ -226,23 +226,25 @@ if ($result) {
|
||||
$paymentdonstatic->id = $links[$key]['url_id'];
|
||||
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation");
|
||||
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
|
||||
$tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_vat') {
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$paymentvatstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
|
||||
$tabtp[$obj->rowid][$account_pay_vat] += $obj->amount;
|
||||
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_salary') {
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsalstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$account_employee ] += $obj->amount;
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("BankTransfer");
|
||||
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -539,7 +541,7 @@ else {
|
||||
$nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1);
|
||||
$builddate = time();
|
||||
$description = $langs->trans("DescFinanceJournal") . '<br>';
|
||||
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
|
||||
$varlink = 'id_account=' . $id_bank_account;
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
|
||||
@ -586,30 +588,24 @@ else {
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
$reflabel = $val["ref"];
|
||||
if ($reflabel == '(SupplierInvoicePayment)') {
|
||||
$reflabel = $langs->trans('Supplier');
|
||||
if ($val["lib"] == '(SupplierInvoicePayment)') {
|
||||
$reflabel = $langs->trans('SupplierInvoicePayment');
|
||||
}
|
||||
if ($reflabel == '(CustomerInvoicePayment)') {
|
||||
$reflabel = $langs->trans('Customer');
|
||||
}
|
||||
if ($reflabel == '(SocialContributionPayment)') {
|
||||
$reflabel = $langs->trans('SocialContribution');
|
||||
}
|
||||
if ($reflabel == '(DonationPayment)') {
|
||||
$reflabel = $langs->trans('Donation');
|
||||
if ($val["lib"] == '(CustomerInvoicePayment)') {
|
||||
$reflabel = $langs->trans('CustomerInvoicePayment');
|
||||
}
|
||||
|
||||
// Bank
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . length_accountg($k) . "</td>";
|
||||
// print "<td>" . $langs->trans('Bank') . "</td>";
|
||||
if ($val['soclib'] == '') {
|
||||
print "<td>" . $bank_code_journal->label . " - " . $val["ref"] . "</td>";
|
||||
print "<td>" . $langs->trans('Bank') . " - " . $val["ref"] . "</td>";
|
||||
} else {
|
||||
print "<td>" . $bank_code_journal->label . " - " . $val['soclib'] . "</td>";
|
||||
print "<td>" . $langs->trans("Bank") . " - " . $val['soclib'] . "</td>";
|
||||
}
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
@ -623,9 +619,19 @@ else {
|
||||
if ($k != 'type') {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
print "<td>" . $val["soclib"] . "</td>";
|
||||
// print "<td>" . length_accounta($k) . "</td>";
|
||||
if (length_accounta($k) == '') {
|
||||
print "<td>" . length_accounta($conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH) . "</td>";
|
||||
} else {
|
||||
print "<td>" . length_accounta($k) . "</td>";
|
||||
print "<td>" . $reflabel . ' ' . $val['soclib'] . "</td>";
|
||||
}
|
||||
// print "<td>" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")</td>";
|
||||
if ($val['soclib'] == '') {
|
||||
print "<td>" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "</td>";
|
||||
} else {
|
||||
print "<td>" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . "</td>";
|
||||
}
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
@ -636,9 +642,14 @@ else {
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
print "<td>" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "</td>";
|
||||
// print "<td>" . $langs->trans('ThirdParty') . "</td>";
|
||||
if ($val['soclib'] == '') {
|
||||
print "<td>" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "</td>";
|
||||
} else {
|
||||
print "<td>" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . "</td>";
|
||||
}
|
||||
print "<td> </td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
|
||||
@ -403,7 +403,7 @@ if ($action == 'export_csv') {
|
||||
$description .= $langs->trans("DepositsAreIncluded");
|
||||
}
|
||||
|
||||
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
|
||||
'action' => ''
|
||||
));
|
||||
|
||||
@ -418,7 +418,7 @@ if ($action == 'export_csv') {
|
||||
$description .= $langs->trans("DepositsAreNotIncluded");
|
||||
else
|
||||
$description .= $langs->trans("DepositsAreIncluded");
|
||||
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
|
||||
'action' => ''
|
||||
));
|
||||
|
||||
@ -221,7 +221,7 @@ if ($result) {
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="15" name="search_account" value="' . $search_account . '"></td>';
|
||||
print '<td class="liste_titre" colspan="2"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -134,7 +134,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
||||
print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
|
||||
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
@ -147,7 +147,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_MAIL_REQUIRED">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
|
||||
print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1);
|
||||
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
@ -160,7 +160,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_DEFAULT_SENDINFOBYMAIL">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
|
||||
print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1);
|
||||
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -149,7 +149,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td align="right">';
|
||||
print Form::selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
|
||||
print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Type
|
||||
@ -158,7 +158,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' class="drag"><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td width="60" align="center">';
|
||||
print Form::selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
|
||||
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
|
||||
print "</td></tr>\n"; */
|
||||
|
||||
// Amount
|
||||
@ -176,7 +176,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' id="tredit"><td>';
|
||||
print $langs->trans("CanEditAmount");
|
||||
print '</td><td align="right">';
|
||||
print Form::selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
|
||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
|
||||
@ -338,7 +338,7 @@ abstract class ActionsAdherentCardCommon
|
||||
|
||||
if ($action == 'view' || $action == 'delete')
|
||||
{
|
||||
$this->tpl['showrefnav'] = Form::showrefnav($this->object,'id');
|
||||
$this->tpl['showrefnav'] = $form->showrefnav($this->object,'id');
|
||||
|
||||
if ($this->object->socid > 0)
|
||||
{
|
||||
@ -385,7 +385,7 @@ abstract class ActionsAdherentCardCommon
|
||||
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login),
|
||||
array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password));
|
||||
|
||||
$this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no');
|
||||
$this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
// Confirm delete contact
|
||||
if ($action == 'delete' && $user->rights->adherent->supprimer)
|
||||
{
|
||||
$this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1);
|
||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -900,12 +900,12 @@ else
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Public profil
|
||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||
print Form::selectyesno("public",$object->public,1);
|
||||
print $form->selectyesno("public",$object->public,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Categories
|
||||
@ -1154,12 +1154,12 @@ else
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Public profil
|
||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||
print Form::selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1);
|
||||
print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Categories
|
||||
@ -1278,7 +1278,7 @@ else
|
||||
if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
}
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
}
|
||||
|
||||
// Confirm create third party
|
||||
@ -1297,7 +1297,7 @@ else
|
||||
// Create a form array
|
||||
$formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
|
||||
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
// Confirm validate member
|
||||
@ -1333,13 +1333,13 @@ else
|
||||
if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) {
|
||||
$formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>'');
|
||||
}
|
||||
print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1);
|
||||
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1);
|
||||
}
|
||||
|
||||
// Confirm send card by mail
|
||||
if ($action == 'sendinfo')
|
||||
{
|
||||
print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1);
|
||||
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1);
|
||||
}
|
||||
|
||||
// Confirm terminate
|
||||
@ -1370,7 +1370,7 @@ else
|
||||
$formquestion=array();
|
||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
|
||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||
print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1);
|
||||
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1);
|
||||
}
|
||||
|
||||
// Confirm remove member
|
||||
@ -1378,7 +1378,7 @@ else
|
||||
{
|
||||
$formquestion=array();
|
||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||
print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1386,7 +1386,7 @@ else
|
||||
*/
|
||||
if ($action == 'add_spip')
|
||||
{
|
||||
print Form::formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1394,7 +1394,7 @@ else
|
||||
*/
|
||||
if ($action == 'del_spip')
|
||||
{
|
||||
print Form::formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
}
|
||||
|
||||
$rowspan=17;
|
||||
|
||||
@ -929,7 +929,7 @@ if ($rowid > 0)
|
||||
// Create a form array
|
||||
$formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
|
||||
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
|
||||
@ -974,7 +974,7 @@ if ($rowid > 0)
|
||||
$datefrom=$object->datevalid;
|
||||
}
|
||||
}
|
||||
print Form::selectDate($datefrom,'','','','',"cotisation",1,1,1);
|
||||
print $form->select_date($datefrom,'','','','',"cotisation",1,1,1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Date end subscription
|
||||
@ -987,7 +987,7 @@ if ($rowid > 0)
|
||||
$dateto=-1; // By default, no date is suggested
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td>';
|
||||
print Form::selectDate($dateto,'end','','','',"cotisation",1,0,1);
|
||||
print $form->select_date($dateto,'end','','','',"cotisation",1,0,1);
|
||||
print "</td></tr>";
|
||||
|
||||
if ($adht->cotisation)
|
||||
@ -1088,7 +1088,7 @@ if ($rowid > 0)
|
||||
|
||||
// Date of payment
|
||||
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
|
||||
print Form::selectDate(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1);
|
||||
print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="bankswitchclass2"><td>'.$langs->trans('Numero');
|
||||
|
||||
@ -200,7 +200,7 @@ if ($result)
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur" colspan="3">';
|
||||
print Form::showrefnav($subscription, 'rowid', $linkback, 1);
|
||||
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Member
|
||||
@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
|
||||
// Date start subscription
|
||||
print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">';
|
||||
Form::selectDate($subscription->dateh,'datesub',1,1,0,'update',1);
|
||||
$form->select_date($subscription->dateh,'datesub',1,1,0,'update',1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date end subscription
|
||||
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="2">';
|
||||
Form::selectDate($subscription->datef,'datesubend',0,0,0,'update',1);
|
||||
$form->select_date($subscription->datef,'datesubend',0,0,0,'update',1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -295,7 +295,7 @@ if ($rowid && $action != 'edit')
|
||||
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
||||
$text=$langs->trans("ConfirmDeleteSubscription");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
@ -307,7 +307,7 @@ if ($rowid && $action != 'edit')
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur" colspan="3">';
|
||||
print Form::showrefnav($subscription, 'rowid', $linkback, 1);
|
||||
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Member
|
||||
|
||||
@ -287,7 +287,7 @@ if ($resql)
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre" colspan="2" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -236,11 +236,11 @@ if ($action == 'create')
|
||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
print Form::selectyesno("cotisation",1,1);
|
||||
print $form->selectyesno("cotisation",1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
print Form::selectyesno("vote",0,1);
|
||||
print $form->selectyesno("vote",0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
@ -297,7 +297,7 @@ if ($rowid > 0)
|
||||
// Ref
|
||||
print '<tr><td width="15%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td>';
|
||||
print Form::showrefnav($object, 'rowid', $linkback);
|
||||
print $form->showrefnav($object, 'rowid', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
@ -634,11 +634,11 @@ if ($rowid > 0)
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40" value="'.dol_escape_htmltag($object->libelle).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
print Form::selectyesno("cotisation",$object->cotisation,1);
|
||||
print $form->selectyesno("cotisation",$object->cotisation,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
print Form::selectyesno("vote",$object->vote,1);
|
||||
print $form->selectyesno("vote",$object->vote,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
|
||||
@ -472,7 +472,7 @@ print '</tr>';
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
|
||||
print Form::selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1);
|
||||
print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ print "</tr>\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ClickToDialUseTelLink").'</td><td>';
|
||||
print Form::selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'<br>';
|
||||
print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'<br>';
|
||||
print '<br>';
|
||||
print $langs->trans("ClickToDialUseTelLinkDesc");
|
||||
print '</td></tr>';
|
||||
|
||||
@ -184,7 +184,7 @@ if ($action == 'edit')
|
||||
|
||||
$var=false;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .Form::selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '</td></tr>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
@ -78,7 +78,7 @@ $hookmanager->initHooks(array('admin'));
|
||||
// Put here declaration of dictionaries properties
|
||||
|
||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26,0,31,32,0);
|
||||
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26);
|
||||
|
||||
// Name of SQL tables of dictionaries
|
||||
$tabname=array();
|
||||
@ -112,8 +112,6 @@ $tabname[27]= MAIN_DB_PREFIX."c_stcomm";
|
||||
$tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
|
||||
$tabname[29]= MAIN_DB_PREFIX."c_lead_status";
|
||||
$tabname[30]= MAIN_DB_PREFIX."c_format_cards";
|
||||
$tabname[31]= MAIN_DB_PREFIX."accounting_system";
|
||||
$tabname[32]= MAIN_DB_PREFIX."c_accountancy_category";
|
||||
|
||||
// Dictionary labels
|
||||
$tablib=array();
|
||||
@ -147,8 +145,6 @@ $tablib[27]= "DictionaryProspectStatus";
|
||||
$tablib[28]= "DictionaryHolidayTypes";
|
||||
$tablib[29]= "DictionaryOpportunityStatus";
|
||||
$tablib[30]= "DictionaryFormatCards";
|
||||
$tablib[31]= "DictionaryAccountancysystem";
|
||||
$tablib[32]= "DictionaryAccountancyCategory";
|
||||
|
||||
// Requests to extract data
|
||||
$tabsql=array();
|
||||
@ -182,8 +178,6 @@ $tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREF
|
||||
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
||||
$tabsql[30]= "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
|
||||
$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, c.code as country_code, c.label as country, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_country as c WHERE s.fk_pays=c.rowid and c.active=1";
|
||||
$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range, a.position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accountancy_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
|
||||
|
||||
// Criteria to sort dictionaries
|
||||
$tabsqlsort=array();
|
||||
@ -217,8 +211,6 @@ $tabsqlsort[27]="code ASC";
|
||||
$tabsqlsort[28]="country ASC, code ASC";
|
||||
$tabsqlsort[29]="position ASC";
|
||||
$tabsqlsort[30]="code ASC";
|
||||
$tabsqlsort[31]="pcg_version ASC";
|
||||
$tabsqlsort[32]="code ASC, label ASC";
|
||||
|
||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||
$tabfield=array();
|
||||
@ -252,8 +244,6 @@ $tabfield[27]= "code,libelle";
|
||||
$tabfield[28]= "code,label,affect,delay,newByMonth,country_id,country";
|
||||
$tabfield[29]= "code,label,percent,position";
|
||||
$tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
$tabfield[31]= "pcg_version,country_id,country,label";
|
||||
$tabfield[32]= "code,label,range,position,country_id,country";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
$tabfieldvalue=array();
|
||||
@ -287,8 +277,6 @@ $tabfieldvalue[27]= "code,libelle";
|
||||
$tabfieldvalue[28]= "code,label,affect,delay,newByMonth,country";
|
||||
$tabfieldvalue[29]= "code,label,percent,position";
|
||||
$tabfieldvalue[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
$tabfieldvalue[31]= "pcg_version,country,label";
|
||||
$tabfieldvalue[32]= "code,label,range,position,country";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
$tabfieldinsert=array();
|
||||
@ -322,8 +310,6 @@ $tabfieldinsert[27]= "code,libelle";
|
||||
$tabfieldinsert[28]= "code,label,affect,delay,newByMonth,fk_country";
|
||||
$tabfieldinsert[29]= "code,label,percent,position";
|
||||
$tabfieldinsert[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
$tabfieldinsert[31]= "pcg_version,fk_pays,label";
|
||||
$tabfieldinsert[32]= "code,label,range,position,fk_country";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
@ -359,8 +345,6 @@ $tabrowid[27]= "id";
|
||||
$tabrowid[28]= "";
|
||||
$tabrowid[29]= "";
|
||||
$tabrowid[30]= "";
|
||||
$tabrowid[31]= "";
|
||||
$tabrowid[32]= "";
|
||||
|
||||
// Condition to show dictionary in setup page
|
||||
$tabcond=array();
|
||||
@ -394,8 +378,6 @@ $tabcond[27]= ! empty($conf->societe->enabled);
|
||||
$tabcond[28]= ! empty($conf->holiday->enabled);
|
||||
$tabcond[29]= ! empty($conf->projet->enabled);
|
||||
$tabcond[30]= ! empty($conf->label->enabled);
|
||||
$tabcond[31]= ! empty($conf->accounting->enabled);
|
||||
$tabcond[32]= ! empty($conf->accounting->enabled);
|
||||
|
||||
// List of help for fields
|
||||
$tabhelp=array();
|
||||
@ -429,8 +411,6 @@ $tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically"));
|
||||
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
|
||||
$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck=array();
|
||||
@ -464,8 +444,6 @@ $tabfieldcheck[27] = array();
|
||||
$tabfieldcheck[28] = array();
|
||||
$tabfieldcheck[29] = array();
|
||||
$tabfieldcheck[30] = array();
|
||||
$tabfieldcheck[31] = array();
|
||||
$tabfieldcheck[32] = array();
|
||||
|
||||
// Complete all arrays with entries found into modules
|
||||
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
|
||||
@ -482,7 +460,6 @@ if ($id == 11)
|
||||
$langs->load("propal");
|
||||
$langs->load("bills");
|
||||
$langs->load("interventions");
|
||||
$langs->load("accountancy");
|
||||
$elementList = array(
|
||||
'' => '',
|
||||
'societe' => $langs->trans('ThirdParty'),
|
||||
@ -557,7 +534,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$ok=1;
|
||||
foreach ($listfield as $f => $value)
|
||||
{
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancysystem','DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
@ -873,7 +850,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
@ -975,7 +952,6 @@ if ($id)
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range') { $valuetoshow=$langs->trans("Range"); }
|
||||
|
||||
if ($id == 2) // Special cas for state page
|
||||
{
|
||||
@ -1143,7 +1119,6 @@ if ($id)
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range') { $valuetoshow=$langs->trans("Range"); }
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
@ -1595,7 +1570,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') {
|
||||
print '<td>';
|
||||
print Form::selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1);
|
||||
print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1);
|
||||
print '</td>';
|
||||
}
|
||||
elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) {
|
||||
|
||||
@ -744,7 +744,7 @@ print '<input type="hidden" name="action" value="setforcedate" />';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ForceInvoiceDate");
|
||||
print '</td><td width="60" align="center">';
|
||||
print Form::selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1);
|
||||
print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
@ -758,7 +758,7 @@ print '<input type="hidden" name="action" value="set_FAC_AUTO_FILLJS" />';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("JSOnPaimentBill");
|
||||
print '</td><td width="60" align="center">';
|
||||
print Form::selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1);
|
||||
print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -170,7 +170,7 @@ if ($action == 'edit') // Edit
|
||||
// Multilangual GUI
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||
print Form::selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
||||
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -191,7 +191,7 @@ if ($action == 'edit') // Edit
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
||||
print Form::selectyesno($searchform[$key],$searchformconst[$key],1);
|
||||
print $form->selectyesno($searchform[$key],$searchformconst[$key],1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
@ -207,7 +207,7 @@ if ($action == 'edit') // Edit
|
||||
// Show logo
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableShowLogo").'</td><td>';
|
||||
print Form::selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
|
||||
print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -227,7 +227,7 @@ if ($action == 'edit') // Edit
|
||||
// Disable javascript and ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print Form::selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
|
||||
print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -237,7 +237,7 @@ if ($action == 'edit') // Edit
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
||||
print Form::selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
|
||||
print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -279,7 +279,7 @@ if ($action == 'edit') // Edit
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
print Form::selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1);
|
||||
print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -287,7 +287,7 @@ if ($action == 'edit') // Edit
|
||||
// Hide helpcenter link on login page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||
print Form::selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
||||
print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -295,7 +295,7 @@ if ($action == 'edit') // Edit
|
||||
// Hide wiki link on login page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
||||
print Form::selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||
print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@ -303,7 +303,7 @@ if ($action == 'edit') // Edit
|
||||
// Show bugtrack link
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print Form::selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
||||
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -343,7 +343,7 @@ if ($action == 'edit')
|
||||
// Disable
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>';
|
||||
print Form::selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1);
|
||||
print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
@ -482,7 +482,7 @@ if ($action == 'edit')
|
||||
{
|
||||
if (function_exists('openssl_open'))
|
||||
{
|
||||
print Form::selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1);
|
||||
print $form->selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1);
|
||||
}
|
||||
else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
|
||||
}
|
||||
@ -496,7 +496,7 @@ if ($action == 'edit')
|
||||
{
|
||||
if (function_exists('openssl_open'))
|
||||
{
|
||||
print Form::selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1);
|
||||
print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1);
|
||||
}
|
||||
else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ if ($action == 'delete')
|
||||
$result = $db->query($sql);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print Form::formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ print '<td align="right" width="400">';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_RATE_ON_INVOICE_DATE">';
|
||||
print Form::selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1);
|
||||
print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
@ -186,7 +186,7 @@ print '<td align="right" width="400">';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_ORIGIN_TX">';
|
||||
print Form::selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1);
|
||||
print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
@ -199,7 +199,7 @@ print '<td align="right" width="400">';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_MULTICURRENCY_BUY_PRICE_IN_CURRENCY">';
|
||||
print Form::selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1);
|
||||
print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -139,7 +139,7 @@ if ($action == 'edit') // Edit
|
||||
// Hide VAT Intra on address
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td>';
|
||||
print Form::selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1);
|
||||
print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
@ -156,7 +156,7 @@ if ($action == 'edit') // Edit
|
||||
if ($pid1)
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
|
||||
print Form::selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ if ($action == 'edit') // Edit
|
||||
if ($pid2)
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
|
||||
print Form::selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ if ($action == 'edit') // Edit
|
||||
if ($pid3)
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
|
||||
print Form::selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ if ($action == 'edit') // Edit
|
||||
if ($pid4)
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
|
||||
print Form::selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -227,31 +227,31 @@ if ($action == 'edit') // Edit
|
||||
// Hide any PDF informations
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Desc
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDescOnPDF").'</td><td>';
|
||||
print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1);
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Ref
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideRefOnPDF").'</td><td>';
|
||||
print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1);
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Details
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDetailsOnPDF").'</td><td>';
|
||||
print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1);
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Place customer adress to the ISO location
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("PlaceCustomerAddressToIsoLocation").'</td><td>';
|
||||
print Form::selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1);
|
||||
print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
@ -565,7 +565,7 @@ print '<input type="hidden" name="action" value="setusecustomercontactasrecipien
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("UseCustomerContactAsPropalRecipientIfExist");
|
||||
print '</td><td width="60" align="center">';
|
||||
print Form::selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1);
|
||||
print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -158,7 +158,7 @@ print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_PROXY_USE").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print Form::selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1);
|
||||
print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ if ($action == 'edit')
|
||||
// Disable
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>';
|
||||
print Form::selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
|
||||
print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
@ -150,7 +150,7 @@ if (! empty($conf->facture->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -170,7 +170,7 @@ if (! empty($conf->commande->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -192,7 +192,7 @@ if (! empty($conf->expedition->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -234,7 +234,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -255,7 +255,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">";
|
||||
print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -314,7 +314,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_INVOICE\">";
|
||||
print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1);
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
@ -329,7 +329,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_ORDER\">";
|
||||
print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1);
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
@ -344,7 +344,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT\">";
|
||||
print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1);
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
@ -373,7 +373,7 @@ if ($virtualdiffersfromphysical)
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USE_VIRTUAL_STOCK\">";
|
||||
print Form::selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1);
|
||||
print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
@ -399,7 +399,7 @@ print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USERSTOCK_AUTOCREATE\">";
|
||||
print Form::selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
|
||||
print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
@ -419,7 +419,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS)
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"INDEPENDANT_SUBPRODUCT_STOCK\">";
|
||||
print Form::selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1);
|
||||
print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
|
||||
@ -180,7 +180,7 @@ if ($result)
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@ -198,7 +198,7 @@ if ($result)
|
||||
// Lignes des champs de filtres
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre" width="15%">'.Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1).'</td>';
|
||||
print '<td class="liste_titre" width="15%">'.$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).$form->select_date($date_end,'date_end',0,0,0,'',1,0,1).'</td>';
|
||||
|
||||
print '<td align="left" class="liste_titre">';
|
||||
print '<input class="flat" type="text" size="10" name="search_code" value="'.$search_code.'">';
|
||||
|
||||
@ -116,12 +116,12 @@ print '<br>';
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
}
|
||||
else if ($action == 'lock')
|
||||
{
|
||||
$formquestion=array();
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
if ($savehandler == 'files')
|
||||
|
||||
@ -108,7 +108,7 @@ if (preg_match('/^confirm/i',$choice))
|
||||
{
|
||||
print '<br>';
|
||||
$formquestion=array();
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -321,7 +321,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ if (! empty($conf->stock->enabled))
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value)
|
||||
print '<td colspan="2">';
|
||||
if (empty($conf->productbatch->enabled)) {
|
||||
print Form::selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
|
||||
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -166,7 +166,7 @@ if (! empty($conf->service->enabled))
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("CashdeskShowServices");
|
||||
print '<td colspan="2">';
|
||||
print Form::selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
||||
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ if (! empty($conf->receiptprinter->enabled))
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')';
|
||||
print '<td colspan="2">';
|
||||
print Form::selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1);
|
||||
print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -43,10 +43,10 @@ $langs->load("cashdesk");
|
||||
<tr>
|
||||
<!-- Affichage de la reference et de la designation -->
|
||||
<td><input class="texte_ref" type="text" id ="txtRef" name="txtRef" value="<?php echo $obj_facturation->ref() ?>"
|
||||
onchange="setSource('REF');"
|
||||
onkeyup="verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onfocus="this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onBlur="document.getElementById('resultats_dhtml').innerHTML = '';"/>
|
||||
onchange="javascript: setSource('REF');"
|
||||
onkeyup="javascript: verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
|
||||
</td>
|
||||
<td class="select_design">
|
||||
<?php /*
|
||||
@ -60,7 +60,7 @@ $langs->load("cashdesk");
|
||||
*/
|
||||
?>
|
||||
|
||||
<select id="selProduit" name="selProduit" onchange="setSource('LISTE');">
|
||||
<select id="selProduit" name="selProduit" onchange="javascript: setSource('LISTE');">
|
||||
<?php
|
||||
print '<option value="0">'.$top_liste_produits.'</option>'."\n";
|
||||
|
||||
@ -93,7 +93,7 @@ $langs->load("cashdesk");
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<form id="frmQte" class="formulaire1" method="post" action="facturation_verif.php?action=ajout_article" onsubmit ="return verifSaisie();">
|
||||
<form id="frmQte" class="formulaire1" method="post" action="facturation_verif.php?action=ajout_article" onsubmit ="javascript: return verifSaisie();">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<table>
|
||||
<tr><th><?php echo $langs->trans("Qty"); ?></th>
|
||||
@ -106,7 +106,7 @@ $langs->load("cashdesk");
|
||||
<th><?php echo $langs->trans("VATRate"); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input class="texte1" type="text" id="txtQte" name="txtQte" value="1" onkeyup="modif();" onfocus="this.select();" />
|
||||
<td><input class="texte1" type="text" id="txtQte" name="txtQte" value="1" onkeyup="javascript: modif();" onfocus="javascript: this.select();" />
|
||||
<?php print genkeypad("txtQte", "frmQte");?>
|
||||
</td>
|
||||
<!-- Affichage du stock pour l'article courant -->
|
||||
@ -115,10 +115,10 @@ $langs->load("cashdesk");
|
||||
</td>
|
||||
<!-- Show unit price -->
|
||||
<?php // TODO Remove the disabled and use this value when adding product into cart ?>
|
||||
<td><input class="texte1_off" type="text" name="txtPrixUnit" value="<?php echo price2num($obj_facturation->prix(), 'MU'); ?>" onchange="modif();" disabled /></td>
|
||||
<td><input class="texte1_off" type="text" name="txtPrixUnit" value="<?php echo price2num($obj_facturation->prix(), 'MU'); ?>" onchange="javascript: modif();" disabled /></td>
|
||||
<td></td>
|
||||
<!-- Choix de la remise -->
|
||||
<td><input class="texte1" type="text" id="txtRemise" name="txtRemise" value="0" onkeyup="modif();" onfocus="this.select();"/>
|
||||
<td><input class="texte1" type="text" id="txtRemise" name="txtRemise" value="0" onkeyup="javascript: modif();" onfocus="javascript: this.select();"/>
|
||||
<?php print genkeypad("txtRemise", "frmQte");?>
|
||||
</td>
|
||||
<!-- Affichage du total HT -->
|
||||
@ -126,7 +126,7 @@ $langs->load("cashdesk");
|
||||
<!-- Choix du taux de TVA -->
|
||||
<td class="select_tva">
|
||||
<?php //var_dump($tab_tva); ?>
|
||||
<select name="selTva" onchange="modif();" >
|
||||
<select name="selTva" onchange="javascript: modif();" >
|
||||
<?php
|
||||
$tva_tx = $obj_facturation->tva(); // Try to get a previously entered VAT rowid. First time, this will return empty.
|
||||
|
||||
@ -151,7 +151,7 @@ $langs->load("cashdesk");
|
||||
</fieldset>
|
||||
|
||||
<!-- ========================= Cadre "Amount" ============================= -->
|
||||
<form id="frmDifference" class="formulaire1" method="post" onsubmit="return verifReglement()" action="validation_verif.php?action=valide_achat">
|
||||
<form id="frmDifference" class="formulaire1" method="post" onsubmit="javascript: return verifReglement()" action="validation_verif.php?action=valide_achat">
|
||||
<input type="hidden" name="hdnChoix" value="" />
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Amount"); ?></legend>
|
||||
@ -161,7 +161,7 @@ $langs->load("cashdesk");
|
||||
<!-- Affichage du montant du -->
|
||||
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prixTotalTtc(), 'MT'); ?>" disabled /></td>
|
||||
<!-- Choix du montant encaisse -->
|
||||
<td><input class="texte2" type="text" id="txtEncaisse" name="txtEncaisse" value="" onkeyup="verifDifference();" onfocus="this.select();" />
|
||||
<td><input class="texte2" type="text" id="txtEncaisse" name="txtEncaisse" value="" onkeyup="javascript: verifDifference();" onfocus="javascript: this.select();" />
|
||||
<?php print genkeypad("txtEncaisse", "frmDifference");?>
|
||||
</td>
|
||||
<!-- Affichage du montant rendu -->
|
||||
@ -201,10 +201,10 @@ $langs->load("cashdesk");
|
||||
print '<div class="clearboth">';
|
||||
print '<div class="inline-block" style="margin: 6px;">';
|
||||
?>
|
||||
<input class="button bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="verifClic('DIF');" />
|
||||
<input class="button bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="javascript: verifClic('DIF');" />
|
||||
<?php
|
||||
print $langs->trans("DateEcheance").' :';
|
||||
print Form::selectDate(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1);
|
||||
print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1);
|
||||
print '</div>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -248,7 +248,7 @@ if ($socid)
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
||||
print Form::showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type);
|
||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type);
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
@ -358,7 +358,7 @@ else if ($id || $ref)
|
||||
// Ref
|
||||
print "<tr>";
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td>';
|
||||
print Form::showrefnav($product,'ref','',1,'ref');
|
||||
print $form->showrefnav($product,'ref','',1,'ref');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -418,7 +418,7 @@ else if ($id || $ref)
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print Form::showrefnav($member,'id','','1','rowid','ref','','&type='.$type);
|
||||
print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type);
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
@ -492,7 +492,7 @@ else if ($id || $ref)
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print Form::showrefnav($object,'rowid');
|
||||
print $form->showrefnav($object,'rowid');
|
||||
print '</td></tr>';
|
||||
|
||||
// Name
|
||||
|
||||
@ -108,7 +108,7 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
print($mesg);
|
||||
|
||||
@ -182,7 +182,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category');
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
|
||||
}
|
||||
|
||||
print '<table border="0" width="100%" class="border">';
|
||||
|
||||
@ -665,9 +665,9 @@ if ($action == 'create')
|
||||
$datep=($datep?$datep:$object->datep);
|
||||
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
||||
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
|
||||
if (GETPOST("afaire") == 1) Form::selectDate($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
@ -678,9 +678,9 @@ if ($action == 'create')
|
||||
$datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h');
|
||||
}
|
||||
print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
|
||||
if (GETPOST("afaire") == 1) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
@ -893,7 +893,7 @@ if ($id > 0)
|
||||
// Confirmation suppression action
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
if ($action == 'edit')
|
||||
@ -955,16 +955,16 @@ if ($id > 0)
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td colspan="3">';
|
||||
if (GETPOST("afaire") == 1) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart');
|
||||
else if (GETPOST("afaire") == 2) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
else Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart');
|
||||
else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||
print '</td></tr>';
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (GETPOST("afaire") == 1) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
//else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap');
|
||||
else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
//else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap');
|
||||
else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||
print '</td></tr>';
|
||||
|
||||
$userepeatevent=0; // Dev in progress
|
||||
@ -1168,7 +1168,7 @@ if ($id > 0)
|
||||
// Clone event
|
||||
if($action == 'clone')
|
||||
{
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
|
||||
print $formconfirm;
|
||||
}
|
||||
@ -1180,7 +1180,7 @@ if ($id > 0)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Type
|
||||
|
||||
@ -130,7 +130,7 @@ if ($object->id > 0)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Type
|
||||
|
||||
@ -142,7 +142,7 @@ $form=new Form($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$nav='';
|
||||
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
|
||||
$now=dol_now();
|
||||
@ -320,10 +320,10 @@ if ($resql)
|
||||
//print '<td class="liste_titre"><input type="text" name="search_type" value="'.$search_type.'"></td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print Form::selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1);
|
||||
print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print Form::selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1);
|
||||
print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
|
||||
@ -261,7 +261,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">';
|
||||
$nav.='<input type="hidden" name="end_d" value="' . $end_d . '">';
|
||||
$nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
|
||||
|
||||
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav.='</form>';
|
||||
|
||||
|
||||
@ -264,7 +264,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">';
|
||||
$nav.='<input type="hidden" name="end_d" value="' . $end_d . '">';
|
||||
$nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
|
||||
|
||||
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav.='</form>';
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ else
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
}
|
||||
|
||||
$nblines = count($object->lines);
|
||||
|
||||
@ -255,9 +255,9 @@ if ($id > 0)
|
||||
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print Form::editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print '</td><td colspan="3">';
|
||||
print Form::editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -371,10 +371,10 @@ if ($id > 0)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print Form::editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
|
||||
print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
|
||||
print '</td><td colspan="3">';
|
||||
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
|
||||
print Form::editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
|
||||
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
|
||||
if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -726,17 +726,17 @@ else
|
||||
// Confirmation de la validation du mailing
|
||||
if ($action == 'valid')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
}
|
||||
// Confirm reset
|
||||
else if ($action == 'reset')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||
}
|
||||
// Confirm delete
|
||||
else if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
|
||||
@ -783,7 +783,7 @@ else
|
||||
}
|
||||
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
|
||||
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||
print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
|
||||
}
|
||||
}
|
||||
|
||||
@ -793,22 +793,22 @@ else
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object,'id', $linkback);
|
||||
print $form->showrefnav($object,'id', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td>'.Form::editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print Form::editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '<tr><td>'.$form->editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print $form->editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '</td></tr>';
|
||||
|
||||
// From
|
||||
print '<tr><td>'.Form::editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print Form::editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '</td></tr>';
|
||||
|
||||
// Errors to
|
||||
print '<tr><td>'.Form::editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print Form::editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
@ -864,7 +864,7 @@ else
|
||||
array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0)
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -184,7 +184,7 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object,'id', $linkback);
|
||||
print $form->showrefnav($object,'id', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||
|
||||
@ -1368,7 +1368,7 @@ if ($action == 'create')
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
|
||||
Form::selectDate('', '', '', '', '', "addprop", 1, 1);
|
||||
$form->select_date('', '', '', '', '', "addprop", 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Validaty duration
|
||||
@ -1416,9 +1416,9 @@ if ($action == 'create')
|
||||
$syear = date("Y", $tmpdte);
|
||||
$smonth = date("m", $tmpdte);
|
||||
$sday = date("d", $tmpdte);
|
||||
Form::selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
|
||||
$form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
|
||||
} else {
|
||||
Form::selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
|
||||
$form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1671,22 +1671,22 @@ if ($action == 'create')
|
||||
// 1),
|
||||
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)')));
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
}
|
||||
|
||||
// Confirm delete
|
||||
else if ($action == 'delete') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirm reopen
|
||||
else if ($action == 'reopen') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirmation delete product/service line
|
||||
else if ($action == 'ask_deleteline') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirm validate proposal
|
||||
@ -1714,7 +1714,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1);
|
||||
}
|
||||
|
||||
if (! $formconfirm) {
|
||||
@ -1733,7 +1733,7 @@ if ($action == 'create')
|
||||
|
||||
// Ref
|
||||
print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
@ -1804,7 +1804,7 @@ if ($action == 'create')
|
||||
print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
Form::selectDate($object->date, 're', '', '', 0, "editdate");
|
||||
$form->select_date($object->date, 're', '', '', 0, "editdate");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
@ -1830,7 +1830,7 @@ if ($action == 'create')
|
||||
print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setecheance">';
|
||||
Form::selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
|
||||
$form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
@ -1865,9 +1865,9 @@ if ($action == 'create')
|
||||
// Delivery date
|
||||
$langs->load('deliveries');
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer);
|
||||
print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer);
|
||||
print '</td><td colspan="5">';
|
||||
print Form::editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day');
|
||||
print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref client
|
||||
|
||||
@ -161,7 +161,7 @@ if ($object->id > 0)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref client
|
||||
|
||||
@ -106,7 +106,7 @@ if ($object->id > 0)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref client
|
||||
|
||||
@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref client
|
||||
|
||||
@ -296,7 +296,7 @@ if ($socid > 0)
|
||||
|
||||
if ($_GET['action'] == 'remove')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -403,7 +403,7 @@ if ($socid > 0)
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$langs->load("dict");
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -70,7 +70,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref cde client
|
||||
|
||||
@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
|
||||
Form::selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
|
||||
$form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
|
||||
print '</td></tr>';
|
||||
|
||||
// Delivery date planed
|
||||
@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:'';
|
||||
}
|
||||
Form::selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
|
||||
$form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Conditions de reglement
|
||||
@ -1775,7 +1775,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
* Confirmation de la suppression de la commande
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1825,7 +1825,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1)));
|
||||
}
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
|
||||
}
|
||||
|
||||
// Confirm back to draft status
|
||||
@ -1857,14 +1857,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1)));
|
||||
}
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220);
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirmation de la cloture
|
||||
*/
|
||||
if ($action == 'shipped') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1898,13 +1898,13 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1)));
|
||||
}
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1);
|
||||
}
|
||||
|
||||
// Confirmation to delete line
|
||||
if ($action == 'ask_deleteline')
|
||||
{
|
||||
$formconfirm=Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -1918,7 +1918,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
// => 1),
|
||||
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)')));
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
}
|
||||
|
||||
if (! $formconfirm) {
|
||||
@ -1951,7 +1951,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
// Ref
|
||||
print '<tr><td width="18%">' . $langs->trans('Ref') . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
Form::selectDate($object->date, 'order_', '', '', '', "setdate");
|
||||
$form->select_date($object->date, 'order_', '', '', '', "setdate");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||
Form::selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
|
||||
$form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
|
||||
@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print "</td></tr>";
|
||||
|
||||
// Ref commande client
|
||||
|
||||
@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
||||
|
||||
@ -403,11 +403,11 @@ if ($resql)
|
||||
if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print Form::selectyesno('billed', $billed, 1, 0, 1);
|
||||
print $form->selectyesno('billed', $billed, 1, 0, 1);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print "</td></tr>";
|
||||
|
||||
// Ref commande client
|
||||
|
||||
@ -427,7 +427,7 @@ if ($action == 'create' && !$error)
|
||||
|
||||
// Date invoice
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
|
||||
Form::selectDate('','','','','',"add",1,1);
|
||||
$html->select_date('','','','','',"add",1,1);
|
||||
print '</td></tr>';
|
||||
// Payment term
|
||||
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
|
||||
@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
$num = $db->num_rows($resql);
|
||||
print load_fiche_titre($title);
|
||||
$i = 0;
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,1,'',1,0,1);
|
||||
$periodely=Form::selectDate($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::selectDate($date_endy,'date_end_dely',0,0,1,'',1,0,1);
|
||||
$period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1);
|
||||
$periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1);
|
||||
|
||||
if (! empty($socid))
|
||||
{
|
||||
|
||||
@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
@ -404,7 +404,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$text=$langs->trans('ConfirmDeleteTransaction');
|
||||
print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<td class="nowrap" colspan="2">';
|
||||
Form::selectDate($dateop,'op',0,0,0,'transaction');
|
||||
$form->select_date($dateop,'op',0,0,0,'transaction');
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
$form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1);
|
||||
@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="action" value="search">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
$period_filter .= $langs->trans('From').' '.Form::selectDate($req_stdt,'req_stdt',0,0,1,null,1,1,1);
|
||||
$period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1);
|
||||
$period_filter .= ' ';
|
||||
$period_filter .= $langs->trans('to').' '.Form::selectDate($req_enddt,'req_enddt',0,0,1,null,1,1,1);
|
||||
$period_filter .= $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$period_filter.'</td>';
|
||||
@ -539,7 +539,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$req_credit.'" size="4"></td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -150,7 +150,7 @@ if ($_GET["account"])
|
||||
{
|
||||
if (! preg_match('/,/', $id))
|
||||
{
|
||||
print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -365,7 +365,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">';
|
||||
Form::selectDate('', 're', 0, 0, 0, 'formsoc');
|
||||
$form->select_date('', 're', 0, 0, 0, 'formsoc');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
@ -558,7 +558,7 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ else
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($account, 'ref', $linkback, 1, 'ref');
|
||||
print $form->showrefnav($account, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">' . $langs->trans("Ref") . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', '', 1, 'ref');
|
||||
print $form->showrefnav($object, 'ref', '', 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
@ -200,7 +200,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
* Confirmation suppression fichier
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
$ret = $formForm::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]),
|
||||
$ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'), 'confirm_deletefile',
|
||||
'', 0, 1);
|
||||
|
||||
@ -770,7 +770,7 @@ if ($account)
|
||||
if ($_GET["option"]!='all')
|
||||
{
|
||||
$morehtml='<a href="'.$_SERVER["PHP_SELF"].'?account='.$account.'&option=all'.$moreparam.'">'.$langs->trans("ShowAllAccounts").'</a>';
|
||||
print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam);
|
||||
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -259,7 +259,7 @@ if ($result)
|
||||
// Confirmations
|
||||
if ($action == 'delete_categ')
|
||||
{
|
||||
print Form::formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ if ($result)
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref")."</td>";
|
||||
print '<td colspan="4">';
|
||||
print Form::showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');
|
||||
print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -451,7 +451,7 @@ if ($result)
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print Form::selectDate($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
|
||||
print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@ -467,7 +467,7 @@ if ($result)
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print Form::selectDate($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
|
||||
print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print ' ';
|
||||
|
||||
@ -131,7 +131,7 @@ if (empty($num))
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@ -191,9 +191,9 @@ if ($resql)
|
||||
$moreforfilter = '';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' ';
|
||||
$moreforfilter .= Form::selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||
$moreforfilter .= ' - ';
|
||||
$moreforfilter .= $langs->trans('EndDate') . ' ' . Form::selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||
$moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if ($moreforfilter)
|
||||
@ -238,7 +238,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -97,7 +97,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
|
||||
@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1);
|
||||
print "</td>\n";
|
||||
|
||||
print "<td>";
|
||||
Form::selectDate((! empty($dateo)?$dateo:''),'','','','','add');
|
||||
$form->select_date((! empty($dateo)?$dateo:''),'','','','','add');
|
||||
print "</td>\n";
|
||||
print '<td><input name="label" class="flat" type="text" size="40" value="'.$label.'"></td>';
|
||||
print '<td><input name="amount" class="flat" type="text" size="8" value="'.$amount.'"></td>';
|
||||
|
||||
@ -262,7 +262,7 @@ if ($action == 'create')
|
||||
|
||||
print "<tr>";
|
||||
print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
print Form::selectDate($datec?$datec:-1,'','','','','add',1,1,1);
|
||||
print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Km
|
||||
@ -358,7 +358,7 @@ else if ($id)
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
print Form::selectDate($object->date,'',0,0,0,'update',1,0,1);
|
||||
print $form->select_date($object->date,'',0,0,0,'update',1,0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Km
|
||||
@ -416,7 +416,7 @@ else if ($id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
||||
|
||||
}
|
||||
|
||||
@ -429,16 +429,16 @@ else if ($id)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>';
|
||||
print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
$form->load_cache_types_fees();
|
||||
|
||||
// Type
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
|
||||
print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
|
||||
print '</td><td>';
|
||||
print Form::editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
|
||||
print $form->editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
|
||||
print '</td></tr>';
|
||||
|
||||
// Who
|
||||
@ -450,16 +450,16 @@ else if ($id)
|
||||
|
||||
// Date
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
|
||||
print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
|
||||
print '</td><td>';
|
||||
print Form::editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
|
||||
print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Km/Price
|
||||
print '<tr><td valign="top">';
|
||||
print Form::editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
|
||||
print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
|
||||
print '</td><td>';
|
||||
print Form::editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
|
||||
print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
|
||||
print "</td></tr>";
|
||||
|
||||
// Where
|
||||
|
||||
@ -108,7 +108,7 @@ if ($object->id)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||
print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Societe
|
||||
|
||||
@ -165,7 +165,7 @@ if ($resql)
|
||||
// print '<input class="flat" size="10" type="text" name="search_amount" value="'.$search_amount.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -2354,7 +2354,7 @@ if ($action == 'create')
|
||||
// Date invoice
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
|
||||
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
print Form::selectDate($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
|
||||
print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Payment term
|
||||
@ -2548,12 +2548,12 @@ if ($action == 'create')
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print '</td><td class="nobordernopadding nowrap">';
|
||||
print Form::selectDate('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
|
||||
print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print '</td><td class="nobordernopadding nowrap">';
|
||||
print Form::selectDate('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
|
||||
print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -2664,7 +2664,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
// Confirmation de la conversion de l'avoir en reduc
|
||||
if ($action == 'converttoreduc') {
|
||||
$text = $langs->trans('ConfirmConvertToReduc');
|
||||
$formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2);
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2);
|
||||
}
|
||||
|
||||
// Confirmation to delete invoice
|
||||
@ -2692,9 +2692,9 @@ else if ($id > 0 || ! empty($ref))
|
||||
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value'
|
||||
// => 1),
|
||||
array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction"))));
|
||||
$formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1);
|
||||
} else {
|
||||
$formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2758,7 +2758,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$text .= '<br>' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive");
|
||||
}
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2);
|
||||
}
|
||||
|
||||
// Confirm back to draft status
|
||||
@ -2795,12 +2795,12 @@ else if ($id > 0 || ! empty($ref))
|
||||
array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value));
|
||||
}
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1);
|
||||
}
|
||||
|
||||
// Confirmation du classement paye
|
||||
if ($action == 'paid' && $resteapayer <= 0) {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1);
|
||||
}
|
||||
if ($action == 'paid' && $resteapayer > 0) {
|
||||
// Code
|
||||
@ -2829,7 +2829,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
// Cree un tableau formulaire
|
||||
$formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100'));
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes");
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes");
|
||||
}
|
||||
|
||||
// Confirmation du classement abandonne
|
||||
@ -2860,13 +2860,13 @@ else if ($id > 0 || ! empty($ref))
|
||||
// Cree un tableau formulaire
|
||||
$formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100'));
|
||||
|
||||
$formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes");
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes");
|
||||
}
|
||||
}
|
||||
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
if ($action == 'ask_deleteline') {
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -2878,7 +2878,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1)));
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
}
|
||||
|
||||
if (! $formconfirm)
|
||||
@ -2910,7 +2910,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
|
||||
if ($action == 'editinvoicedate') {
|
||||
Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate');
|
||||
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate');
|
||||
} else {
|
||||
print dol_print_date($object->date, 'daytext');
|
||||
}
|
||||
@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
if ($action == 'editpaymentterm') {
|
||||
Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
|
||||
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
|
||||
} else {
|
||||
print dol_print_date($object->date_lim_reglement, 'daytext');
|
||||
if ($object->hasDelay()) {
|
||||
|
||||
@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
|
||||
@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
|
||||
@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
|
||||
@ -349,7 +349,7 @@ if ($action == 'create')
|
||||
// First date of execution for cron
|
||||
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
|
||||
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
|
||||
print Form::selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
|
||||
print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Number max of generation
|
||||
@ -609,7 +609,7 @@ else
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $discount->error);
|
||||
}*/
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -669,9 +669,9 @@ else
|
||||
|
||||
|
||||
print '<tr><td>';
|
||||
print Form::editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
||||
print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
||||
print '</td><td colspan="5">';
|
||||
print Form::editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -771,7 +771,7 @@ else
|
||||
print '<tr><td>';
|
||||
if ($action == 'date_when' || $object->frequency > 0)
|
||||
{
|
||||
print Form::editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day');
|
||||
print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -780,7 +780,7 @@ else
|
||||
print '</td><td colspan="5">';
|
||||
if ($action == 'date_when' || $object->frequency > 0)
|
||||
{
|
||||
print Form::editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day');
|
||||
print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -789,7 +789,7 @@ else
|
||||
print '<tr><td>';
|
||||
if ($action == 'nb_gen_max' || $object->frequency > 0)
|
||||
{
|
||||
print Form::editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer);
|
||||
print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -798,7 +798,7 @@ else
|
||||
print '</td><td colspan="5">';
|
||||
if ($action == 'nb_gen_max' || $object->frequency > 0)
|
||||
{
|
||||
print Form::editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer);
|
||||
print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -810,14 +810,14 @@ else
|
||||
// Status of generated invoices
|
||||
print '<tr><td>';
|
||||
if ($action == 'auto_validate' || $object->frequency > 0)
|
||||
print Form::editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer);
|
||||
print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer);
|
||||
else
|
||||
print $langs->trans("StatusOfGeneratedInvoices");
|
||||
print '</td><td colspan="5">';
|
||||
$select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated');
|
||||
if ($action == 'auto_validate' || $object->frequency > 0)
|
||||
{
|
||||
print Form::editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select);
|
||||
print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -719,7 +719,7 @@ if ($resql)
|
||||
if ($show_files) $param.='&show_files=' .$show_files;
|
||||
$param.=(! empty($option)?"&option=".$option:"");
|
||||
|
||||
$massactionbutton=Form::selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
|
||||
$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
@ -924,7 +924,7 @@ if ($resql)
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons(1, 'checkforselect', 1);
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref customer
|
||||
|
||||
@ -167,7 +167,7 @@ if ($object->id > 0)
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
|
||||
print "</td></tr>";
|
||||
|
||||
// Ref customer
|
||||
@ -300,7 +300,7 @@ if ($object->id > 0)
|
||||
{
|
||||
if ($action == 'editinvoicedate')
|
||||
{
|
||||
Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate');
|
||||
$form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ if ($object->id > 0)
|
||||
{
|
||||
if ($action == 'editpaymentterm')
|
||||
{
|
||||
Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm');
|
||||
$form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -92,7 +92,7 @@ $builddate=time();
|
||||
$description=$langs->trans("DescPurchasesJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
|
||||
@ -96,7 +96,7 @@ $builddate=time();
|
||||
$description=$langs->trans("DescSellsJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file htdocs/compta/localtax/card.php
|
||||
* \ingroup tax
|
||||
* \brief Page of second or third tax payments (like IRPF for spain, ...)
|
||||
* \brief Page of IRPF payments
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -30,25 +30,17 @@ $langs->load("compta");
|
||||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
|
||||
$id=GETPOST("id",'int');
|
||||
$action=GETPOST("action","alpha");
|
||||
$refund=GETPOST("refund","int");
|
||||
if (empty($refund)) $refund=0;
|
||||
|
||||
$id=$_REQUEST["id"];
|
||||
$lttype=GETPOST('localTaxType', 'int');
|
||||
$mesg = '';
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
$localtax = new Localtax($db);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('localtaxvatcard','globalcard'));
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -58,8 +50,9 @@ if($_POST["cancel"] == $langs->trans("Cancel")){
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$localtax = new Localtax($db);
|
||||
|
||||
$db->begin();
|
||||
|
||||
@ -90,9 +83,10 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
}
|
||||
|
||||
//delete payment of localtax
|
||||
if ($action == 'delete')
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$result=$localtax->fetch($id);
|
||||
$localtax = new Localtax($db);
|
||||
$result=$localtax->fetch($_GET['id']);
|
||||
|
||||
if ($localtax->rappro == 0)
|
||||
{
|
||||
@ -105,10 +99,10 @@ if ($action == 'delete')
|
||||
{
|
||||
$accountline=new AccountLine($db);
|
||||
$result=$accountline->fetch($localtax->fk_bank);
|
||||
if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing)
|
||||
$result=$accountline->delete($user);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt);
|
||||
@ -155,26 +149,26 @@ if ($id)
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'create')
|
||||
if ($_GET["action"] == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code));
|
||||
|
||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n";
|
||||
print "<form name='add' action=\"card.php\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="localTaxType" value="'.$lttype.'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
dol_fiche_head();
|
||||
print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code));
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr>";
|
||||
print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
|
||||
print Form::selectDate($datep,"datep",'','','','add',1,1);
|
||||
print $form->select_date($datep,"datep",'','','','add');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
|
||||
print Form::selectDate($datev,"datev",'','','','add',1,1);
|
||||
print $form->select_date($datev,"datev",'','','','add');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
@ -190,22 +184,13 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$form->select_types_paiements(GETPOST("paiementtype"), "paiementtype");
|
||||
$form->select_types_paiements($_POST["paiementtype"], "paiementtype");
|
||||
print "</td>\n";
|
||||
print "</tr>";
|
||||
|
||||
// Number
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
||||
print '<td><input name="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
|
||||
}
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="1"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
print "<br>";
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
@ -225,6 +210,8 @@ if ($action == 'create')
|
||||
|
||||
if ($id)
|
||||
{
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$vatpayment->id;
|
||||
$head[$h][1] = $langs->trans('Card');
|
||||
@ -268,14 +255,9 @@ if ($id)
|
||||
}
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Boutons d'actions
|
||||
|
||||
@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
|
||||
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
|
||||
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$calcmode=$langs->trans("CalcModeLT2Debt");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
|
||||
@ -27,15 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("compta");
|
||||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
|
||||
$localTaxType=GETPOST('localTaxType', 'int');
|
||||
|
||||
$year=GETPOST("year","int");
|
||||
if ($year == 0)
|
||||
{
|
||||
$year=$_GET["year"];
|
||||
if ($year == 0 ) {
|
||||
$year_current = strftime("%Y",time());
|
||||
$year_start = $year_current;
|
||||
} else {
|
||||
@ -127,24 +122,25 @@ if($localTaxType==1) {
|
||||
$textprevyear="<a href=\"index.php?localTaxType=".$localTaxType."&year=" . ($year_current-1) . "\">".img_previous()."</a>";
|
||||
$textnextyear=" <a href=\"index.php?localTaxType=".$localTaxType."&year=" . ($year_current+1) . "\">".img_next()."</a>";
|
||||
|
||||
print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png');
|
||||
print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
|
||||
|
||||
print $langs->trans("LTReportBuildWithOptionDefinedInModule").'<br>';
|
||||
print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')<br>';
|
||||
print '<br>';
|
||||
|
||||
print '<table width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td class="notopnoleft width="50%">';
|
||||
print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code), '', '');
|
||||
print '</td><td> </td><td>';
|
||||
print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code), '', '');
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr><td>';
|
||||
print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code));
|
||||
|
||||
print '</td><td width="5"> </td><td>';
|
||||
print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code));
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="notopnoleft" width="50%" valign="top">';
|
||||
print '<tr><td width="50%" valign="top">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="30%">'.$langs->trans("Year")." ".$y."</td>";
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td width=\"30%\">".$langs->trans("Year")." $y</td>";
|
||||
if($CalcLT==0) {
|
||||
print "<td align=\"right\">".$langs->transcountry($LTCustomer,$mysoc->country_code)."</td>";
|
||||
print "<td align=\"right\">".$langs->transcountry($LTSupplier,$mysoc->country_code)."</td>";
|
||||
@ -275,7 +271,7 @@ $sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
|
||||
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
|
||||
$sql.= " AND localtaxtype=".$localTaxType;
|
||||
$sql.= " GROUP BY dm ASC ORDER BY dm ASC";
|
||||
$sql.= " GROUP BY dm ASC";
|
||||
|
||||
pt($db, $sql,$langs->trans("Year")." $y");
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
|
||||
$nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
else { $prevquarter=4; $prevyear--; }
|
||||
@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
|
||||
$nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
else { $prevquarter=4; $prevyear--; }
|
||||
|
||||
@ -462,7 +462,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('Date').'</span></td><td>';
|
||||
$datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
$datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment);
|
||||
Form::selectDate($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
|
||||
$form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('Comments').'</td></tr>';
|
||||
|
||||
@ -773,7 +773,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$text.='<br>'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed");
|
||||
print '<input type="hidden" name="closepaidinvoices" value="'.GETPOST('closepaidinvoices').'">';
|
||||
}
|
||||
print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
|
||||
}
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
@ -185,7 +185,7 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'pa
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ if ($action == 'delete')
|
||||
if ($action == 'valide')
|
||||
{
|
||||
$facid = $_GET['facid'];
|
||||
print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
|
||||
}
|
||||
|
||||
@ -206,12 +206,12 @@ $linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php">' . $langs-
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date payment
|
||||
print '<tr><td>'.Form::editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).'</td><td colspan="3">';
|
||||
print Form::editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
|
||||
print '<tr><td>'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).'</td><td colspan="3">';
|
||||
print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Payment type (VIR, LIQ, ...)
|
||||
@ -219,16 +219,16 @@ $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$obje
|
||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$labeltype.'</td></tr>';
|
||||
|
||||
// Payment numero
|
||||
print '<tr><td>'.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
||||
print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
|
||||
print '<tr><td>'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
||||
print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->montant,'',$langs,0,0,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
// Note
|
||||
print '<tr><td class="tdtop">'.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).'</td><td colspan="3">';
|
||||
print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea');
|
||||
print '<tr><td class="tdtop">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).'</td><td colspan="3">';
|
||||
print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea');
|
||||
print '</td></tr>';
|
||||
|
||||
$disable_delete = 0;
|
||||
|
||||
@ -339,7 +339,7 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
|
||||
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ else
|
||||
*/
|
||||
if ($action == 'valide')
|
||||
{
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
|
||||
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ else
|
||||
array('type' => 'hidden','name' => 'bankid','value' => GETPOST('lineid')),
|
||||
array('type' => 'date','name' => 'rejectdate_','label' => $langs->trans("RejectCheckDate"),'value' => dol_now())
|
||||
);
|
||||
print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ if ($action == 'new')
|
||||
//print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>';
|
||||
// Filter
|
||||
print '<tr><td width="200">'.$langs->trans("DateChequeReceived").'</td><td>';
|
||||
print Form::selectDate($filterdate,'fd',0,0,1,'',1,1,1);
|
||||
print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("BankAccount").'</td><td>';
|
||||
$form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
|
||||
@ -582,7 +582,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print Form::showrefnav($object,'ref',$linkback, 1, 'number');
|
||||
print $form->showrefnav($object,'ref',$linkback, 1, 'number');
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
@ -601,7 +601,7 @@ else
|
||||
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
Form::selectDate($object->date_bordereau,'datecreate_','','','',"setdate");
|
||||
$form->select_date($object->date_bordereau,'datecreate_','','','',"setdate");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ class RemiseCheque extends CommonObject
|
||||
|
||||
dol_syslog("RemiseCheque::generatePdf model=".$model." id=".$this->id, LOG_DEBUG);
|
||||
|
||||
$dir=DOL_DOCUMENT_ROOT ."/core/modules/cheque/doc/";
|
||||
$dir=DOL_DOCUMENT_ROOT ."/core/modules/cheque/pdf/";
|
||||
|
||||
// Charge le modele
|
||||
$file = "pdf_".$model.".class.php";
|
||||
|
||||
@ -162,7 +162,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=Form::showFilterAndCheckAddButtons();
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user