mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/tva/card.php htdocs/langs/en_US/admin.lang
This commit is contained in:
@@ -8,12 +8,13 @@ This files describe steps made by Dolibarr packaging team to make a
|
||||
beta version of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||
Recopy the content of the output file into the file ChangeLog.
|
||||
- Note: To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z-w in file htdocs/filefunc.inc.php
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
@@ -24,7 +25,6 @@ To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dol
|
||||
(/home/dolibarr/wwwroot/files/lastbuild).
|
||||
|
||||
- Post a news on dolibarr.org/dolibarr.fr + social networks
|
||||
- Send mail on mailings-list
|
||||
|
||||
|
||||
***** Actions to do a RELEASE *****
|
||||
@@ -32,12 +32,13 @@ This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||
Recopy the content of the output file into the file ChangeLog.
|
||||
- Note: To know the number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z in file htdocs/filefunc.inc.php
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
@@ -52,4 +53,3 @@ To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dol
|
||||
on server to point to new files (used by some web sites).
|
||||
|
||||
- Post a news on dolibarr.org/dolibarr.fr + social networks
|
||||
- Send mail on mailings-list
|
||||
|
||||
@@ -435,7 +435,8 @@ foreach ($configfileparameters as $key => $value) {
|
||||
if (empty($valuetoshow)) {
|
||||
print img_warning("EditConfigFileToAddEntry", 'dolibarr_main_instance_unique_id');
|
||||
}
|
||||
print ' <span class="opacitymedium">('.$langs->trans("HashForPing").'='.md5('dolibarr'.$valuetoshow).')</span>';
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td></td><td> => '.$langs->trans("HashForPing").'</td><td>'.md5('dolibarr'.$valuetoshow).'</td></tr>'."\n";
|
||||
} elseif ($newkey == 'dolibarr_main_prod') {
|
||||
print ${$newkey};
|
||||
|
||||
|
||||
@@ -611,6 +611,16 @@ class Documents extends DolibarrApi
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$object = new FactureFournisseur($this->db);
|
||||
} elseif ($modulepart == 'commande' || $modulepart == 'order') {
|
||||
$modulepart = 'commande';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$object = new Commande($this->db);
|
||||
} elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') {
|
||||
$modulepart = 'supplier_order';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
$object = new CommandeFournisseur($this->db);
|
||||
} elseif ($modulepart == 'project') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$object = new Project($this->db);
|
||||
@@ -669,7 +679,7 @@ class Documents extends DolibarrApi
|
||||
}
|
||||
|
||||
// Special cases that need to use get_exdir to get real dir of object
|
||||
// If future, all object should use this to define path of documents.
|
||||
// In future, all object should use this to define path of documents.
|
||||
if ($modulepart == 'supplier_invoice') {
|
||||
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
|
||||
}
|
||||
|
||||
@@ -778,13 +778,13 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->prelevement->enabled) {
|
||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("StandingOrder").')</td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||
print '<td>'.$object->ics.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if ($conf->paymentbybanktransfer->enabled) {
|
||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("BankTransfer").')</td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||
print '<td>'.$object->ics_transfer.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -1082,12 +1082,12 @@ if ($action == 'create') {
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>';
|
||||
|
||||
if ($conf->prelevement->enabled) {
|
||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("StandingOrder").')</td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.(GETPOSTISSET('ics') ? GETPOST('ics', 'alphanohtml') : $object->ics).'"></td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->paymentbybanktransfer->enabled) {
|
||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("BankTransfer").')</td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>';
|
||||
|
||||
@@ -32,8 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php';
|
||||
$langs->loadLangs(array('compta', 'banks', 'bills'));
|
||||
|
||||
$id = GETPOST("id", 'int');
|
||||
$action = GETPOST("action", "alpha");
|
||||
$cancel = GETPOST('cancel');
|
||||
$action = GETPOST("action", "aZ09");
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
|
||||
$refund = GETPOST("refund", "int");
|
||||
if (empty($refund)) {
|
||||
@@ -143,7 +143,7 @@ $form = new Form($db);
|
||||
|
||||
$title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
|
||||
$help_url = '';
|
||||
llxHeader("", $title, $helpurl);
|
||||
llxHeader('', $title, $helpurl);
|
||||
|
||||
if ($action == 'create') {
|
||||
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
|
||||
@@ -157,11 +157,13 @@ if ($action == 'create') {
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Date of payment
|
||||
print "<tr>";
|
||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
|
||||
print $form->selectDate($datep, "datep", '', '', '', 'add', 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// End date of period
|
||||
print '<tr><td class="fieldrequired">'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).'</td><td>';
|
||||
print $form->selectDate($datev, "datev", '', '', '', 'add', 1, 1);
|
||||
print '</td></tr>';
|
||||
@@ -173,20 +175,24 @@ if ($action == 'create') {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.GETPOST("amount").'"></td></tr>';
|
||||
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
||||
$form->select_comptes(GETPOST("accountid", "int"), "accountid", 0, "courant=1", 2); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
|
||||
// Type payment
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$form->select_types_paiements(GETPOST("paiementtype"), "paiementtype");
|
||||
$form->select_types_paiements(GETPOST("paiementtype"), "paiementtype", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx');
|
||||
print "</td>\n";
|
||||
print "</tr>";
|
||||
|
||||
// Bank account
|
||||
print '<tr><td class="fieldrequired" id="label_fk_account">'.$langs->trans("Account").'</td><td>';
|
||||
print img_picto('', 'bank_account', 'pictofixedwidth');
|
||||
$form->select_comptes(GETPOST("accountid", "int"), "accountid", 0, "courant=1", 2, '', 0, 'maxwidth500 widthcentpercentminusx'); // Affiche liste des comptes courant
|
||||
print '</td></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();
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
@@ -63,6 +63,7 @@ if ($result) {
|
||||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="nowrap" align="left">'.$langs->trans("Ref").'</td>';
|
||||
@@ -85,7 +86,7 @@ if ($result) {
|
||||
print '<td class="left">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
||||
$total = $total + $obj->amount;
|
||||
|
||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
@@ -94,6 +95,8 @@ if ($result) {
|
||||
print '<td class="right"><span class="amount">'.price($total).'</span></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
||||
@@ -207,14 +207,15 @@ if ($action == 'create') {
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype", "int") : $tva->paiementtype, "paiementtype");
|
||||
$form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype", "int") : $tva->paiementtype, "paiementtype", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx');
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
$form->select_comptes(GETPOST("accountid") ? GETPOST("accountid", "int") : $tva->accountid, "accountid", 0, '', 1); // Show opend bank account list
|
||||
print img_picto('', 'bank_account', 'pictofixedwidth');
|
||||
$form->select_comptes(GETPOST("accountid", "int") ? GETPOST("accountid", "int") : $tva->accountid, "accountid", 0, '', 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
@@ -225,7 +226,7 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
||||
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
||||
print '<td class="tdtop"><textarea name="note" class="quatrevingtpercent" wrap="soft" rows="'.ROWS_3.'"></textarea></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -238,6 +239,7 @@ if ($action == 'create') {
|
||||
$num = 1;
|
||||
$i = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
||||
@@ -259,14 +261,14 @@ if ($action == 'create') {
|
||||
if ($objp->datev > 0) {
|
||||
print '<td class="left">'.dol_print_date($objp->datev, 'day').'</td>'."\n";
|
||||
} else {
|
||||
print "<td align=\"center\"><b>!!!</b></td>\n";
|
||||
print '<td class="center"><b>!!!</b></td>'."\n";
|
||||
}
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount)."</span></td>";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($objp->amount)."</span></td>";
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($sumpaid)."</span></td>";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($sumpaid)."</span></td>";
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount - $sumpaid)."</span></td>";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($objp->amount - $sumpaid)."</span></td>";
|
||||
|
||||
print '<td class="center">';
|
||||
|
||||
@@ -279,7 +281,7 @@ if ($action == 'create') {
|
||||
} */
|
||||
$remaintopay = $objp->amount - $sumpaid;
|
||||
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||
print '<input type="text" class="right width100" name="'.$namef.'" id="'.$namef.'" value="'.$remaintopay.'">';
|
||||
print '<input type="text" class="right width75" name="'.$namef.'" id="'.$namef.'" value="'.$remaintopay.'">';
|
||||
} else {
|
||||
print '-';
|
||||
}
|
||||
@@ -303,6 +305,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
// Bouton Save payment
|
||||
print '<br><div class="center"><input type="checkbox" checked name="closepaidvat"> '.$langs->trans("ClosePaidVATAutomatically");
|
||||
|
||||
@@ -922,7 +922,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
$sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX"
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons";
|
||||
$sql .= " WHERE ref LIKE '%".$this->db->escape($ref)."%'";
|
||||
$sql .= " WHERE ref LIKE '_".$this->db->escape($ref)."%'";
|
||||
$sql .= " AND entity = ".((int) $conf->entity);
|
||||
$sql .= " ORDER BY ref DESC LIMIT 1";
|
||||
|
||||
@@ -933,7 +933,7 @@ class BonPrelevement extends CommonObject
|
||||
$row = $this->db->fetch_row($resql);
|
||||
|
||||
// Build the new ref
|
||||
$ref = "T".$ref.str_pad(dol_substr("00".(intval($row[0]) + 1), 0, 2), 2, "0", STR_PAD_LEFT);
|
||||
$ref = "T".$ref.sprintf("%02d", (intval($row[0]) + 1));
|
||||
|
||||
// $conf->abc->dir_output may be:
|
||||
// /home/ldestailleur/git/dolibarr_15.0/documents/abc/
|
||||
|
||||
@@ -460,7 +460,7 @@ if ($action == 'create') {
|
||||
print '</div>';
|
||||
|
||||
print '</td>';
|
||||
//print "<br>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
// Label
|
||||
if ($refund == 1) {
|
||||
@@ -490,14 +490,15 @@ if ($action == 'create') {
|
||||
|
||||
// Type payment
|
||||
print '<tr><td class="fieldrequired" id="label_type_payment">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$form->select_types_paiements(GETPOST("type_payment"), "type_payment");
|
||||
$form->select_types_paiements(GETPOST("type_payment", 'int'), "type_payment", '', 0, 1, 0, 0, 1, 'maxwidth500 widthcentpercentminusx');
|
||||
print "</td>\n";
|
||||
print "</tr>";
|
||||
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
// Bank account
|
||||
print '<tr><td class="fieldrequired" id="label_fk_account">'.$langs->trans("BankAccount").'</td><td>';
|
||||
print img_picto('', 'bank_account', 'pictofixedwidth');
|
||||
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available
|
||||
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // List of bank account available
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -509,7 +510,7 @@ if ($action == 'create') {
|
||||
// Comments
|
||||
print '<tr class="hide_if_no_auto_create_payment">';
|
||||
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
||||
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">'.GETPOST('note', 'restricthtml').'</textarea></td>';
|
||||
print '<td class="tdtop"><textarea name="note" wrap="soft" rows="'.ROWS_3.'" class="quatrevingtpercent">'.GETPOST('note', 'restricthtml').'</textarea></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Other attributes
|
||||
|
||||
@@ -9228,12 +9228,12 @@ class Form
|
||||
if (!empty($conf->gravatar->enabled) && $email && empty($noexternsourceoverwrite)) {
|
||||
// see https://gravatar.com/site/implement/images/php/
|
||||
$ret .= '<!-- Put link to gravatar -->';
|
||||
$ret .= '<img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="https://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash
|
||||
$ret .= '<img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="" title="'.$email.' Gravatar avatar" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="https://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash
|
||||
} else {
|
||||
if ($nophoto == 'company') {
|
||||
$ret .= '<div class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="No photo" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').'">'.img_picto('', 'company').'</div>';
|
||||
$ret .= '<div class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').'">'.img_picto('', 'company').'</div>';
|
||||
} else {
|
||||
$ret .= '<img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="No photo" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
$ret .= '<img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,11 +227,16 @@ class RssParser
|
||||
} else {
|
||||
try {
|
||||
$result = getURLContent($this->_urlRSS, 'GET', '', 1, array(), array('http', 'https'), 0);
|
||||
|
||||
if (!empty($result['content'])) {
|
||||
$str = $result['content'];
|
||||
} elseif (!empty($result['curl_error_msg'])) {
|
||||
$this->error = 'Error retrieving URL '.$this->_urlRSS.' - '.$result['curl_error_msg'];
|
||||
return -1;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
print 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage();
|
||||
$this->error = 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +253,8 @@ class RssParser
|
||||
}
|
||||
|
||||
$xmlparser = xml_parser_create('');
|
||||
if (!is_resource($xmlparser)) {
|
||||
|
||||
if (!is_resource($xmlparser) && !is_object($xmlparser)) {
|
||||
$this->error = "ErrorFailedToCreateParser";
|
||||
return -1;
|
||||
}
|
||||
@@ -256,10 +262,11 @@ class RssParser
|
||||
xml_set_object($xmlparser, $this);
|
||||
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
|
||||
xml_set_character_data_handler($xmlparser, 'feed_cdata');
|
||||
|
||||
$status = xml_parse($xmlparser, $str);
|
||||
xml_parser_free($xmlparser);
|
||||
$rss = $this;
|
||||
//var_dump($rss->_format);exit;
|
||||
//var_dump($status.' '.$rss->_format);exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1904,7 +1904,7 @@ if ($action == 'create') {
|
||||
$currency_code = $conf->currency;
|
||||
|
||||
$societe = '';
|
||||
if (GETPOST('socid') > 0) {
|
||||
if (GETPOST('socid', 'int') > 0) {
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch(GETPOST('socid', 'int'));
|
||||
if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) {
|
||||
@@ -3466,10 +3466,9 @@ if ($action == 'create') {
|
||||
// Remainder to pay
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche >= 0) {
|
||||
print $langs->trans('RemainderToPay');
|
||||
} else {
|
||||
print $langs->trans('ExcessPaid');
|
||||
if ($resteapayeraffiche < 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessPaid').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
@@ -3479,10 +3478,9 @@ if ($action == 'create') {
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche <= 0) {
|
||||
print $langs->trans('RemainderToPayBackMulticurrency');
|
||||
} else {
|
||||
print $langs->trans('ExcessPaidMulticurrency');
|
||||
print $langs->trans('RemainderToPayMulticurrency');
|
||||
if ($resteapayeraffiche < 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessPaid').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
@@ -3503,10 +3501,9 @@ if ($action == 'create') {
|
||||
// Remainder to pay back
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche <= 0) {
|
||||
print $langs->trans('RemainderToPayBack');
|
||||
} else {
|
||||
print $langs->trans('ExcessPaid');
|
||||
if ($resteapayeraffiche > 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||
}
|
||||
print '</td>';
|
||||
print '</span>';
|
||||
@@ -3516,10 +3513,9 @@ if ($action == 'create') {
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche <= 0) {
|
||||
print $langs->trans('RemainderToPayBackMulticurrency');
|
||||
} else {
|
||||
print $langs->trans('ExcessPaidMulticurrency');
|
||||
if ($resteapayeraffiche> 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
|
||||
@@ -615,12 +615,13 @@ jQuery(document).ready(function() {
|
||||
|
||||
function init_needroot()
|
||||
{
|
||||
console.log("init_needroot force_install_noedit=<?php echo $force_install_noedit?>");
|
||||
/*alert(jQuery("#db_create_database").prop("checked")); */
|
||||
if (jQuery("#db_create_database").is(":checked") || jQuery("#db_create_user").is(":checked"))
|
||||
{
|
||||
jQuery(".hideroot").show();
|
||||
<?php
|
||||
if ($force_install_noedit == 0) { ?>
|
||||
if (empty($force_install_noedit)) { ?>
|
||||
jQuery(".needroot").removeAttr('disabled');
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
@@ -559,6 +559,13 @@ DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
|
||||
|
||||
|
||||
-- Sequence to fix the content of llx_bank.amount_main_currency
|
||||
-- Note: amount is amount in currency of bank account
|
||||
-- Note: pamount is always amount into the main currency
|
||||
-- Note: pmulticurrencyamount is in currency of invoice
|
||||
-- Note: amount_main_currency must be amount in main currency
|
||||
-- DROP TABLE tmp_bank;
|
||||
-- CREATE TABLE tmp_bank SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment' INNER JOIN llx_paiement as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
|
||||
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
|
||||
-- DROP TABLE tmp_bank2;
|
||||
-- CREATE TABLE tmp_bank2 SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment_supplier' INNER JOIN llx_paiementfourn as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
|
||||
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank2 as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
|
||||
|
||||
@@ -2234,3 +2234,4 @@ TemplateforBusinessCards=Template for a business card in different size
|
||||
InventorySetup= Inventory Setup
|
||||
ExportUseLowMemoryMode=Use a low memory mode
|
||||
ExportUseLowMemoryModeHelp=Use the low memory mode to execute the exec of the dump (compression is done through a pipe instead of into the PHP memory). This method does not allow to check that file is completed and error message can't be reported if it fails.
|
||||
HashForPing=Hash used for ping
|
||||
|
||||
@@ -137,6 +137,7 @@ SEPAFRST=SEPA FRST
|
||||
ExecutionDate=Execution date
|
||||
CreateForSepa=Create direct debit file
|
||||
ICS=Creditor Identifier - ICS
|
||||
IDS=Debitor Identifier
|
||||
END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction
|
||||
USTRD="Unstructured" SEPA XML tag
|
||||
ADDDAYS=Add days to Execution Date
|
||||
@@ -155,3 +156,4 @@ ErrorICSmissing=Missing ICS in Bank account %s
|
||||
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines
|
||||
WarningSomeDirectDebitOrdersAlreadyExists=Warning: There is already some pending Direct Debit orders (%s) requested for an amount of %s
|
||||
WarningSomeCreditTransferAlreadyExists=Warning: There is already some pending Credit Transfer (%s) requested for an amount of %s
|
||||
UsedFor=Used for %s
|
||||
@@ -109,10 +109,11 @@ function testSqlAndScriptInject($val, $type)
|
||||
// We check string because some hacks try to obfuscate evil strings by inserting non printable chars. Example: 'java(ascci09)scr(ascii00)ipt' is processed like 'javascript' (whatever is place of evil ascii char)
|
||||
// We should use dol_string_nounprintableascii but function is not yet loaded/available
|
||||
// Example of valid UTF8 chars:
|
||||
// utf8=utf8mb3: '\x0A', '\x0D', '\x7E'
|
||||
// utf8=utf8mb3: '\x09', '\x0A', '\x0D', '\x7E'
|
||||
// utf8=utf8mb3: '\xE0\xA0\x80'
|
||||
// utf8mb4: '\xF0\x9D\x84\x9E' (but this may be refused by the database insert if pagecode is utf8=utf8mb3)
|
||||
$newval = preg_replace('/[\x00-\x09\x0B-\x0C\x0E-\x1F\x7F]/u', '', $val); // /u operator makes UTF8 valid characters being ignored so are not included into the replace
|
||||
$newval = preg_replace('/[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F]/u', '', $val); // /u operator makes UTF8 valid characters being ignored so are not included into the replace
|
||||
|
||||
// Note that $newval may also be completely empty '' when non valid UTF8 are found.
|
||||
if ($newval != $val) {
|
||||
// If $val has changed after removing non valid UTF8 chars, it means we have an evil string.
|
||||
|
||||
@@ -1564,8 +1564,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Quality control
|
||||
if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
print '<tr><td>'.$langs->trans("LifeTime").'</td><td><input name="lifetime" class="maxwidth100onsmartphone" value="'.GETPOST('lifetime').'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("QCFrequency").'</td><td><input name="qc_frequency" class="maxwidth100onsmartphone" value="'.GETPOST('qc_frequency').'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("LifeTime").'</td><td><input name="lifetime" class="maxwidth50" value="'.GETPOST('lifetime').'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("QCFrequency").'</td><td><input name="qc_frequency" class="maxwidth50" value="'.GETPOST('qc_frequency').'"></td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
@@ -2611,19 +2611,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Custom code
|
||||
if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) {
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td>'.$object->customcode.'</td>';
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td>'.$object->customcode.'</td></tr>';
|
||||
|
||||
// Origin country code
|
||||
print '<tr><td>'.$langs->trans("Origin").'</td><td>'.getCountry($object->country_id, 0, $db);
|
||||
if (!empty($object->state_id)) {
|
||||
print ' - '.getState($object->state_id, 0, $db);
|
||||
}
|
||||
print '</td>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Quality Control
|
||||
if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
print '<tr><td>'.$langs->trans("LifeTime").'</td><td">'.$object->lifetime.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("LifeTime").'</td><td>'.$object->lifetime.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("QCFrequency").'</td><td>'.$object->qc_frequency.'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user