Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
605642d96a
@ -540,7 +540,7 @@ print "</tr>";
|
||||
|
||||
// Show fields for topic, join files and body
|
||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||
if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('content', 'content_lines'); }
|
||||
if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); }
|
||||
foreach ($fieldsforcontent as $tmpfieldlist)
|
||||
{
|
||||
print '<tr class="impair nodrag nodrop nohover"><td colspan="6" class="nobottom">';
|
||||
|
||||
@ -800,7 +800,7 @@ if ($resql)
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, 'sql'=>$sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -120,3 +120,4 @@ DefineTablePlan=Define tables plan
|
||||
GiftReceiptButton=Add a "Gift receipt" button
|
||||
GiftReceipt=Gift receipt
|
||||
ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first
|
||||
AllowDelayedPayment=Allow delayed payment
|
||||
|
||||
@ -35,7 +35,8 @@ class Tasks extends DolibarrApi
|
||||
*/
|
||||
static $FIELDS = array(
|
||||
'ref',
|
||||
'label'
|
||||
'label',
|
||||
'fk_project'
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@ -62,7 +62,7 @@ class Task extends CommonObject
|
||||
/**
|
||||
* @var int ID parent task
|
||||
*/
|
||||
public $fk_task_parent;
|
||||
public $fk_task_parent = 0;
|
||||
|
||||
/**
|
||||
* @var string Label of task
|
||||
@ -145,6 +145,9 @@ class Task extends CommonObject
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
//For the date
|
||||
$now = dol_now();
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Clean parameters
|
||||
@ -175,7 +178,7 @@ class Task extends CommonObject
|
||||
$sql .= ", ".$this->fk_task_parent;
|
||||
$sql .= ", '".$this->db->escape($this->label)."'";
|
||||
$sql .= ", '".$this->db->escape($this->description)."'";
|
||||
$sql .= ", '".$this->db->idate($this->date_c)."'";
|
||||
$sql .= ", '".$this->db->idate($now)."'";
|
||||
$sql .= ", ".$user->id;
|
||||
$sql .= ", ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
||||
$sql .= ", ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
|
||||
|
||||
@ -364,6 +364,13 @@ print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_GIFT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Delayed Pay Button
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('AllowDelayedPayment');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Numbering module
|
||||
//print '<tr class="oddeven"><td>';
|
||||
//print $langs->trans("BillsNumberingModule");
|
||||
|
||||
@ -156,7 +156,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
|
||||
}
|
||||
}
|
||||
|
||||
if ($bankaccount <= 0) {
|
||||
if ($bankaccount <= 0 && $pay != "delayed") {
|
||||
$errormsg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount"));
|
||||
$error++;
|
||||
}
|
||||
@ -249,8 +249,10 @@ if ($action == 'valid' && $user->rights->facture->creer)
|
||||
$payment->paiementid = $paiementid;
|
||||
$payment->num_payment = $invoice->ref;
|
||||
|
||||
$payment->create($user);
|
||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
if ($pay != "delayed") {
|
||||
$payment->create($user);
|
||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
}
|
||||
|
||||
$remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded
|
||||
if ($remaintopay == 0) {
|
||||
|
||||
@ -375,6 +375,10 @@ foreach ($action_buttons as $button) {
|
||||
$newclass = $class.($button["class"] ? " ".$button["class"] : "");
|
||||
print '<button type="button" class="'.$newclass.'" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOS_DELAYED_PAYMENT) {
|
||||
print '<button type="button" class="calcbutton2" onclick="Validate(\'delayed\');">'.$langs->trans("Reported").'</button>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user