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
7ac4a6f4
Commit
7ac4a6f4
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Show amount and status of supplier invoice also on document tab.
parent
8bc655b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/fourn/facture/contact.php
+47
-2
47 additions, 2 deletions
htdocs/fourn/facture/contact.php
htdocs/fourn/facture/document.php
+29
-1
29 additions, 1 deletion
htdocs/fourn/facture/document.php
with
76 additions
and
3 deletions
htdocs/fourn/facture/contact.php
+
47
−
2
View file @
7ac4a6f4
<?php
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
* Copyright (C) 2005-201
2
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-201
4
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -155,9 +155,54 @@ if ($id > 0 || ! empty($ref))
// Third party
print
"<tr><td>"
.
$langs
->
trans
(
"Supplier"
)
.
"</td>"
;
print
'<td colspan="3">'
.
$object
->
thirdparty
->
getNomUrl
(
1
,
'supplier'
)
.
'</td></tr>'
;
// Type
print
'<tr><td>'
.
$langs
->
trans
(
'Type'
)
.
'</td><td colspan="4">'
;
print
$object
->
getLibType
();
if
(
$object
->
type
==
FactureFournisseur
::
TYPE_REPLACEMENT
)
{
$facreplaced
=
new
FactureFournisseur
(
$db
);
$facreplaced
->
fetch
(
$object
->
fk_facture_source
);
print
' ('
.
$langs
->
transnoentities
(
"ReplaceInvoice"
,
$facreplaced
->
getNomUrl
(
1
))
.
')'
;
}
if
(
$object
->
type
==
FactureFournisseur
::
TYPE_CREDIT_NOTE
)
{
$facusing
=
new
FactureFournisseur
(
$db
);
$facusing
->
fetch
(
$object
->
fk_facture_source
);
print
' ('
.
$langs
->
transnoentities
(
"CorrectInvoice"
,
$facusing
->
getNomUrl
(
1
))
.
')'
;
}
$facidavoir
=
$object
->
getListIdAvoirFromInvoice
();
if
(
count
(
$facidavoir
)
>
0
)
{
print
' ('
.
$langs
->
transnoentities
(
"InvoiceHasAvoir"
);
$i
=
0
;
foreach
(
$facidavoir
as
$fid
)
{
if
(
$i
==
0
)
print
' '
;
else
print
','
;
$facavoir
=
new
FactureFournisseur
(
$db
);
$facavoir
->
fetch
(
$fid
);
print
$facavoir
->
getNomUrl
(
1
);
}
print
')'
;
}
if
(
$facidnext
>
0
)
{
$facthatreplace
=
new
FactureFournisseur
(
$db
);
$facthatreplace
->
fetch
(
$facidnext
);
print
' ('
.
$langs
->
transnoentities
(
"ReplacedByInvoice"
,
$facthatreplace
->
getNomUrl
(
1
))
.
')'
;
}
print
'</td></tr>'
;
// Label
print
'<tr><td>'
.
$form
->
editfieldkey
(
"Label"
,
'label'
,
$object
->
label
,
$object
,
0
)
.
'</td><td colspan="3">'
;
print
$form
->
editfieldval
(
"Label"
,
'label'
,
$object
->
label
,
$object
,
0
);
print
'</td></tr>'
;
print
"</table>"
;
print
'</div>'
;
dol_fiche_end
()
;
print
'<br>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/fourn/facture/document.php
+
29
−
1
View file @
7ac4a6f4
...
...
@@ -168,8 +168,36 @@ if ($object->id > 0)
print
$form
->
editfieldval
(
"Label"
,
'label'
,
$object
->
label
,
$object
,
0
);
print
'</td>'
;
// Status
$alreadypaid
=
$object
->
getSommePaiement
();
print
'<tr><td>'
.
$langs
->
trans
(
'Status'
)
.
'</td><td colspan="3">'
.
$object
->
getLibStatut
(
4
,
$alreadypaid
)
.
'</td></tr>'
;
// Amount
print
'<tr><td>'
.
$langs
->
trans
(
'AmountHT'
)
.
'</td><td colspan="3">'
.
price
(
$object
->
total_ht
,
1
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'AmountVAT'
)
.
'</td><td colspan="3">'
.
price
(
$object
->
total_tva
,
1
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td></tr>'
;
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if
(
$societe
->
localtax1_assuj
==
"1"
)
//Localtax1
{
print
'<tr><td>'
.
$langs
->
transcountry
(
"AmountLT1"
,
$societe
->
country_code
)
.
'</td>'
;
print
'<td align="right">'
.
price
(
$object
->
total_localtax1
,
1
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td>'
;
print
'<td colspan="2"> </td></tr>'
;
}
if
(
$societe
->
localtax2_assuj
==
"1"
)
//Localtax2
{
print
'<tr><td>'
.
$langs
->
transcountry
(
"AmountLT2"
,
$societe
->
country_code
)
.
'</td>'
;
print
'<td align="right" colspan="3">'
.
price
(
$object
->
total_localtax2
,
1
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td>'
;
print
'</tr>'
;
}
print
'<tr><td>'
.
$langs
->
trans
(
'AmountTTC'
)
.
'</td><td colspan="3">'
.
price
(
$object
->
total_ttc
,
1
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td></tr>'
;
print
'</table><br>'
;
print
'<table class="border" width="100%">'
;
// Nb of files
print
'<tr><td>'
.
$langs
->
trans
(
'NbOfAttachedFiles'
)
.
'</td><td colspan="3">'
.
count
(
$filearray
)
.
'</td></tr>'
;
print
'<tr><td
width="30%" class="nowrap"
>'
.
$langs
->
trans
(
'NbOfAttachedFiles'
)
.
'</td><td colspan="3">'
.
count
(
$filearray
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'TotalSizeOfAttachedFiles'
)
.
'</td><td colspan="3">'
.
$totalsize
.
' '
.
$langs
->
trans
(
'bytes'
)
.
'</td></tr>'
;
...
...
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