Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
0b97ee42
Commit
0b97ee42
authored
7 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
NEW Can use a credit note into a "down payment/deposit".
parent
1748f1d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/compta/facture/card.php
+8
-7
8 additions, 7 deletions
htdocs/compta/facture/card.php
with
8 additions
and
7 deletions
htdocs/compta/facture/card.php
+
8
−
7
View file @
0b97ee42
...
...
@@ -3156,7 +3156,7 @@ else if ($id > 0 || ! empty($ref))
$addabsolutediscount
=
'<a href="'
.
DOL_URL_ROOT
.
'/comm/remx.php?id='
.
$soc
->
id
.
'&backtopage='
.
urlencode
(
$_SERVER
[
"PHP_SELF"
])
.
'?facid='
.
$object
->
id
.
'">'
.
$langs
->
trans
(
"EditGlobalDiscounts"
)
.
'</a>'
;
$addcreditnote
=
'<a href="'
.
DOL_URL_ROOT
.
'/compta/facture/card.php?action=create&socid='
.
$soc
->
id
.
'&type=2&backtopage='
.
urlencode
(
$_SERVER
[
"PHP_SELF"
])
.
'?facid='
.
$object
->
id
.
'">'
.
$langs
->
trans
(
"AddCreditNote"
)
.
'</a>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'Discounts'
);
print
'<
!-- Discounts --><
tr><td>'
.
$langs
->
trans
(
'Discounts'
);
print
'</td><td>'
;
if
(
$soc
->
remise_percent
)
print
$langs
->
trans
(
"CompanyHasRelativeDiscount"
,
$soc
->
remise_percent
);
...
...
@@ -3164,6 +3164,7 @@ else if ($id > 0 || ! empty($ref))
print
$langs
->
trans
(
"CompanyHasNoRelativeDiscount"
);
// print ' ('.$addrelativediscount.')';
// Is there commercial discount or down payment available ?
if
(
$absolute_discount
>
0
)
{
print
'. '
;
if
(
$object
->
statut
>
0
||
$object
->
type
==
Facture
::
TYPE_CREDIT_NOTE
||
$object
->
type
==
Facture
::
TYPE_DEPOSIT
)
{
...
...
@@ -3195,21 +3196,21 @@ else if ($id > 0 || ! empty($ref))
}
else
print
'. '
;
}
// Is there credit notes availables ?
if
(
$absolute_creditnote
>
0
)
{
// If validated, we show link "add credit note to payment"
if
(
$object
->
statut
!=
1
||
$object
->
type
==
Facture
::
TYPE_CREDIT_NOTE
||
$object
->
type
==
Facture
::
TYPE_DEPOSIT
)
{
if
(
$object
->
statut
!=
1
||
$object
->
type
==
Facture
::
TYPE_CREDIT_NOTE
)
{
if
(
$object
->
statut
==
0
&&
$object
->
type
!=
Facture
::
TYPE_DEPOSIT
)
{
$text
=
$langs
->
trans
(
"CompanyHasCreditNote"
,
price
(
$absolute_creditnote
),
$langs
->
transnoentities
(
"Currency"
.
$conf
->
currency
));
print
$form
->
textwithpicto
(
$text
,
$langs
->
trans
(
"CreditNoteDepositUse"
));
}
else
{
print
$langs
->
trans
(
"CompanyHasCreditNote"
,
price
(
$absolute_creditnote
),
$langs
->
transnoentities
(
"Currency"
.
$conf
->
currency
))
.
'.'
;
}
}
else
{
// Remise dispo de type avoir
if
(
!
$absolute_discount
)
print
'<br>'
;
// $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer
}
else
{
// We can add a credit note on a down payment or standard invoice or situation invoice
// There is credit notes discounts available
if
(
!
$absolute_discount
)
print
'<br>'
;
// $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer);
$more
=
' ('
.
$addcreditnote
.
')'
;
$form
->
form_remise_dispo
(
$_SERVER
[
"PHP_SELF"
]
.
'?facid='
.
$object
->
id
,
0
,
'remise_id_for_payment'
,
$soc
->
id
,
$absolute_creditnote
,
$filtercreditnote
,
0
,
$more
);
// We allow credit note even if amount is higher
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment