Debug v19

This commit is contained in:
Laurent Destailleur 2023-07-31 03:00:05 +02:00
parent 6277cb836f
commit 9302a427a9
5 changed files with 12 additions and 8 deletions

View File

@ -3448,7 +3448,7 @@ class Propal extends CommonObject
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @param User $user Object user
* @param int $mode "opened" for proposal to close, "signed" for proposal to invoice
* @param string $mode "opened" for proposal to close, "signed" for proposal to invoice
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
public function load_board($user, $mode)

View File

@ -3571,7 +3571,7 @@ class Commande extends CommonOrder
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @param User $user Object user
* @param String $mode Mode (toship, tobill, shippedtobill)
* @param string $mode Mode ('toship', 'tobill', 'shippedtobill')
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
public function load_board($user, $mode)

View File

@ -211,8 +211,10 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
$board = new Commande($db);
// Number of customer orders to be shipped (validated and in progress)
$dashboardlines[$board->element.'_toship'] = $board->load_board($user, 'toship');
// Number of customer orders to be billed
$dashboardlines[$board->element.'_tobill'] = $board->load_board($user, 'tobill');
// Number of customer orders to be billed (not visible by default, does not match a lot of organization).
if (getDolGlobalInt('ORDER_BILL_AFTER_VALIDATION')) {
$dashboardlines[$board->element.'_tobill'] = $board->load_board($user, 'tobill');
}
// Number of customer orders to be billed (delivered but not billed)
$dashboardlines[$board->element.'_shippedtobill'] = $board->load_board($user, 'shippedtobill');
}

View File

@ -384,7 +384,9 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->salaries->write)
}
}
if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; }
if ($action == 'confirm_clone' && $confirm != 'yes') {
$action = '';
}
if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->salaries->write)) {
$db->begin();
@ -733,9 +735,9 @@ if ($id > 0) {
//$formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1);
$formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1);
$formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), 'value' => -1);
$formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100');
$formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100 right');
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 280);
}
if ($action == 'paid') {

View File

@ -2222,7 +2222,7 @@ class SupplierProposal extends CommonObject
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @param User $user Object user
* @param int $mode "opened" for askprice to close, "signed" for proposal to invoice
* @param string $mode "opened" for askprice to close, "signed" for proposal to invoice
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
public function load_board($user, $mode)