Merge branch 'Dolibarr:develop' into develop

This commit is contained in:
Elísio Leonardo 2022-06-09 14:54:24 +02:00 committed by GitHub
commit bbbfc05d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 51 additions and 34 deletions

View File

@ -540,7 +540,7 @@ if ($action == 'create') {
print '</td>';
print '</tr>';
// Date document creation
// Date document export
print '<tr>';
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
print '<td>';
@ -548,7 +548,7 @@ if ($action == 'create') {
print '</td>';
print '</tr>';
// Date document creation
// Date document validation
print '<tr>';
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
print '<td>';
@ -607,6 +607,7 @@ if ($action == 'create') {
print '<br>';
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
@ -647,9 +648,14 @@ if ($action == 'create') {
print "</tr>\n";
// Add an empty line
$line = new BookKeepingLine();
$object->linesmvt[] = $line;
// Add an empty line if there is not yet
if (!empty($object->linesmvt[0])) {
$tmpline = $object->linesmvt[0];
if (!empty($tmpline->numero_compte)) {
$line = new BookKeepingLine();
$object->linesmvt[] = $line;
}
}
foreach ($object->linesmvt as $line) {
print '<tr class="oddeven">';

View File

@ -606,9 +606,13 @@ class BookKeeping extends CommonObject
if (empty($this->credit)) {
$this->credit = 0;
}
if (empty($this->montant)) {
$this->montant = 0;
}
$this->debit = price2num($this->debit, 'MT');
$this->credit = price2num($this->credit, 'MT');
$this->montant = price2num($this->montant, 'MT');
$now = dol_now();
@ -1661,11 +1665,10 @@ class BookKeeping extends CommonObject
$this->doc_date = $this->db->jdate($obj->doc_date);
$this->doc_ref = $obj->doc_ref;
$this->doc_type = $obj->doc_type;
$this->date_creation = $obj->date_creation;
$this->date_modification = $obj->date_modification;
$this->date_export = $obj->date_export;
$this->date_validation = $obj->date_validated;
$this->date_validation = $obj->date_validation;
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_modification = $this->db->jdate($obj->date_modification);
$this->date_export = $this->db->jdate($obj->date_export);
$this->date_validation = $this->db->jdate($obj->date_validation);
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(__METHOD__.$this->error, LOG_ERR);

View File

@ -113,7 +113,7 @@ if ($action != 'edit') {
print '<tr class="oddeven">';
print '<td>&nbsp;</td><td><input name="label" type="text" class="maxwidth100"></td>';
print '<td></td>';
print '<td class="center"><input type="submit" name="add" class="button button-add" value="'.$langs->trans("Add").'"></td>';
print '<td class="center"><input type="submit" name="add" class="button button-add small" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
}

View File

@ -550,7 +550,7 @@ foreach ($accounts as $key => $type) {
// Account type
if (!empty($arrayfields['accountype']['checked'])) {
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
print $objecttmp->type_lib[$objecttmp->type];
print '</td>';
if (!$i) {

View File

@ -342,7 +342,7 @@ function dol_shutdown()
$depth = $db->transaction_opened;
$disconnectdone = $db->close();
}
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ?LOG_WARNING:LOG_INFO));
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO));
}
/**

View File

@ -406,4 +406,9 @@ ALTER TABLE llx_extrafields ADD COLUMN cssview varchar(128);
ALTER TABLE llx_extrafields ADD COLUMN csslist varchar(128);
ALTER TABLE llx_cronjob ADD COLUMN email_alert varchar(128);
ALTER TABLE llx_paiement MODIFY COLUMN ext_payment_id varchar(255);
ALTER TABLE llx_payment_donation MODIFY COLUMN ext_payment_id varchar(255);
ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN ext_payment_id varchar(255);

View File

@ -32,7 +32,7 @@ create table llx_paiement
fk_paiement integer NOT NULL, -- type of payment in llx_c_paiement
num_paiement varchar(50),
note text,
ext_payment_id varchar(128), -- external id of payment (for example Stripe charge id)
ext_payment_id varchar(255), -- external id of payment (for example Stripe charge id)
ext_payment_site varchar(128), -- name of external paymentmode (for example 'stripe')
fk_bank integer NOT NULL DEFAULT 0,
fk_user_creat integer, -- utilisateur qui a cree l'info

View File

@ -27,7 +27,7 @@ create table llx_payment_donation
fk_typepayment integer NOT NULL,
num_payment varchar(50),
note text,
ext_payment_id varchar(128), -- external id of payment (for example Stripe charge id)
ext_payment_id varchar(255), -- external id of payment (for example Stripe charge id)
ext_payment_site varchar(128), -- name of external paymentmode (for example 'stripe')
fk_bank integer NOT NULL,
fk_user_creat integer, -- creation user

View File

@ -35,6 +35,6 @@ create table llx_prelevement_facture_demande
code_guichet varchar(6),
number varchar(255),
cle_rib varchar(5),
ext_payment_id varchar(128),
ext_payment_id varchar(255),
ext_payment_site varchar(128)
)ENGINE=innodb;

View File

@ -2247,7 +2247,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$btnUser = '<!-- div for user link -->
<div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block">
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown">
'.$userImage.'<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>
'.$userImage.(empty($user->photo) ? '<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>' : '').'
</a>
<div class="dropdown-menu">
<!-- User image -->

View File

@ -1076,9 +1076,9 @@ END;
// Supplier ref
if ($usercancreate) { // change required right here
print '<td>'.$productfourn->getNomUrl().'</td>';
print '<td class="tdoverflowmax150">'.$productfourn->getNomUrl().'</td>';
} else {
print '<td>'.$productfourn->fourn_ref.'</td>';
print '<td class="tdoverflowmax150">'.dol_escape_htmltag($productfourn->fourn_ref).'</td>';
}
// Availability
@ -1109,13 +1109,13 @@ END;
// Price for the quantity
print '<td class="right">';
print $productfourn->fourn_price ?price($productfourn->fourn_price) : "";
print $productfourn->fourn_price ? '<span class="amount">'.price($productfourn->fourn_price).'</span>' : "";
print '</td>';
if (!empty($conf->multicurrency->enabled)) {
// Price for the quantity in currency
print '<td class="right">';
print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : "";
print $productfourn->fourn_multicurrency_price ? '<span class="amount">'.price($productfourn->fourn_multicurrency_price).'</span>' : "";
print '</td>';
}

View File

@ -1798,14 +1798,14 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
// Price HT
print '<td class="right">';
if (empty($objp->price_by_qty)) {
print price($objp->price);
print '<span class="amount">'.price($objp->price).'</span>';
}
print "</td>";
// Price TTC
print '<td class="right">';
if (empty($objp->price_by_qty)) {
$price_ttc = $objp->price_ttc;
print price($price_ttc);
print '<span class="amount">'.price($price_ttc).'<span>';
}
print "</td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") {
@ -2175,9 +2175,9 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
//. vatrate($tva_tx, true, $line->recuperableonly) .
print "</td>";
print '<td class="right">'.price($line->price)."</td>";
print '<td class="right"><span class="amount">'.price($line->price)."</span></td>";
print '<td class="right">'.price($line->price_ttc)."</td>";
print '<td class="right"><span class="amount">'.price($line->price_ttc)."</span></td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") {
print '<td class="right">'.price($resultarray[2]).'</td>';
}
@ -2357,7 +2357,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<tr class="oddeven">';
print "<td>".$staticsoc->getNomUrl(1)."</td>";
print '<td>' . $line->ref_customer . '</td>';
print '<td>'.dol_escape_htmltag($line->ref_customer).'</td>';
print "<td>".dol_print_date($line->datec, "dayhour", 'tzuserrel')."</td>";
print '<td class="center">'.$langs->trans($line->price_base_type)."</td>";
print '<td class="right">';
@ -2379,9 +2379,9 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', ($line->tva_npr ? $line->tva_npr : $line->recuperableonly));
print "</td>";
print '<td class="right">'.price($line->price)."</td>";
print '<td class="right"><span class="amount">'.price($line->price)."</span></td>";
print '<td class="right">'.price($line->price_ttc)."</td>";
print '<td class="right"><span class="amount">'.price($line->price_ttc)."</span></td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") {
//print '<td class="right">' . price($line->price_ttc) . "</td>";
print '<td class="right">'.price($resultarray[2]).'</td>';

View File

@ -692,12 +692,12 @@ if ($id > 0 || $ref) {
} else {
// Price
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td>';
print $langs->trans("Variable");
print '<span class="opacitymedium">'.$langs->trans("Variable").'</span>';
print '</td></tr>';
// Price minimum
print '<tr><td>'.$langs->trans("MinPrice").'</td><td>';
print $langs->trans("Variable");
print '<span class="opacitymedium">'.$langs->trans("Variable").'</span>';
print '</td></tr>';
}

View File

@ -246,7 +246,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
if (!$error) {
if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task
$id = GETPOST('taskid', 'int');
$id_temp = GETPOST('taskid', 'int'); // should not overwrite $id
$object->fetchTimeSpent(GETPOST('lineid', 'int'));
@ -255,7 +256,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$result = $object->delTimeSpent($user);
}
$object->fetch($id, $ref);
$object->fetch($id_temp, $ref);
$object->timespent_note = GETPOST("timespent_note_line", 'alpha');
$object->timespent_old_duration = GETPOST("old_duration");

View File

@ -2672,7 +2672,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print dol_print_profids($object->$key, 'ProfId'.$i, $object->country_code, 1);
if ($object->$key) {
if ($object->id_prof_check($i, $object) > 0) {
print ' &nbsp; '.$object->id_prof_url($i, $object);
if (!empty($object->id_prof_url($i, $object))) {
print ' &nbsp; '.$object->id_prof_url($i, $object);
}
} else {
print ' <span class="error">('.$langs->trans("ErrorWrongValue").')</span>';
}