Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/class/immopayment.class.php b/class/immopayment.class.php
- index a751051..5128b8f 100644
- --- a/class/immopayment.class.php
- +++ b/class/immopayment.class.php
- @@ -395,11 +395,10 @@ class ImmoPayment extends CommonObject
- $this->db->begin();
- -
- if ($totalamount != 0) {
- - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "ultimateimmo_immopayment (fk_receipt, date_creation, date_payment, amount,";
- + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "ultimateimmo_immopayment (ref, fk_receipt, date_creation, date_payment, amount,";
- $sql .= " fk_mode_reglement, fk_property, fk_renter, fk_rent, num_payment, note_public, fk_user_creat, fk_account)";
- - $sql .= " VALUES (" . $this->fk_receipt . ", '" . $this->db->idate($now) . "',";
- + $sql .= " VALUES ('".$this->ref ."'," . $this->fk_receipt . ", '" . $this->db->idate($now) . "',";
- $sql .= " '" . $this->db->idate($this->date_payment) . "',";
- $sql .= " " . $totalamount . ",";
- $sql .= " " . $this->fk_mode_reglement . ",'" . $this->db->escape($this->fk_property) . "','" . $this->db->escape($this->fk_renter) . "','" . $this->db->escape($this->fk_rent) . "', '" . $this->db->escape($this->num_payment) . "', '" . $this->db->escape($this->note_public) . "', " . $user->id . ",";
- diff --git a/class/immoreceipt.class.php b/class/immoreceipt.class.php
- index 023cc53..452fa83 100644
- --- a/class/immoreceipt.class.php
- +++ b/class/immoreceipt.class.php
- @@ -1396,6 +1396,7 @@ class ImmoReceipt extends CommonObject
- $sql .= ' WHERE rowid = ' . $this->id;
- $return = $this->db->query ( $sql );
- $this->db->commit ();
- +
- if ($return)
- return 1;
- else
- diff --git a/payment/stats.php b/payment/stats.php
- index 4fc1337..3a39c16 100644
- --- a/payment/stats.php
- +++ b/payment/stats.php
- @@ -140,7 +140,7 @@ foreach ($months_list as $month_name) {
- }
- print '<td align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
- -$sql = "SELECT 'own.firstname' AS Proprio";
- +$sql = "SELECT own.firstname AS Proprio";
- foreach ($months_list as $month_num => $month_name) {
- $sql .= ', ROUND(SUM(case when MONTH(lp.date_payment)=' . $month_num . ' then lp.amount else 0 end),2) AS month_' . $month_num;
- }
- diff --git a/receipt/immoreceipt_card.php b/receipt/immoreceipt_card.php
- index 626ddbc..0b9d4e1 100644
- --- a/receipt/immoreceipt_card.php
- +++ b/receipt/immoreceipt_card.php
- @@ -852,7 +852,7 @@ if ($action == 'createall') {
- print '<input name="balance" class="flat" size="8" value="' . $balance . '">';
- }
- }
- - elseif ($val['label'] == 'Paye')
- + elseif ($val['label'] == 'paye')
- {
- if ($totalpaye==0)
- {
- @@ -1294,6 +1294,7 @@ if ($action == 'createall') {
- print "</form>\n";
- }
- +
- if (is_file($conf->ultimateimmo->dir_output . '/receipt/quittance_' . $id . '.pdf')) {
- print ' ';
- print '<table class="border" width="100%">';
- @@ -1414,6 +1415,7 @@ if ($action == 'createall') {
- $trackid = 'immo' . $object->id;
- include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
- +die();
- }
- // End of page
- diff --git a/receipt/immoreceipt_list.php b/receipt/immoreceipt_list.php
- index 44b5631..587c704 100644
- --- a/receipt/immoreceipt_list.php
- +++ b/receipt/immoreceipt_list.php
- @@ -588,7 +588,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
- if ($balance >= 0) {
- print price($balance, 0, $outputlangs, 1, -1, -1, $conf->currency);
- }
- - } elseif ($val['label'] == 'Paye') {
- + } elseif ($val['label'] == 'paye') {
- if ($totalpaye == 0) {
- print $object->paye = $langs->trans('UnPaidReceipt');
- } elseif ($balance == 0) {
- diff --git a/receipt/payment/paiement.php b/receipt/payment/paiement.php
- index e1c4e47..9a718ac 100644
- --- a/receipt/payment/paiement.php
- +++ b/receipt/payment/paiement.php
- @@ -186,7 +186,7 @@ if ($action == 'add_payment') {
- $payment->note_public = GETPOST('note_public', 'string');
- if (!$error) {
- - $paymentid = $payment->create($user);
- + echo $paymentid = $payment->create($user);
- if ($paymentid < 0) {
- $errmsg = $payment->errors;
- setEventMessages(null, $errmsg, 'errors');
- @@ -204,7 +204,6 @@ if ($action == 'add_payment') {
- $error++;
- }
- }
- -
- if (!$error) {
- $db->commit();
- $loc = dol_buildpath('/ultimateimmo/receipt/immoreceipt_card.php', 1) . '?id=' . $id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement