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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
c187f952
Commit
c187f952
authored
8 years ago
by
aspangaro
Browse files
Options
Downloads
Patches
Plain Diff
Social contribution : Complete work on dol_banner
parent
eb2d85ab
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/compta/sociales/card.php
+2
-1
2 additions, 1 deletion
htdocs/compta/sociales/card.php
htdocs/compta/sociales/document.php
+28
-53
28 additions, 53 deletions
htdocs/compta/sociales/document.php
htdocs/compta/sociales/info.php
+35
-8
35 additions, 8 deletions
htdocs/compta/sociales/info.php
with
65 additions
and
62 deletions
htdocs/compta/sociales/card.php
+
2
−
1
View file @
c187f952
...
@@ -269,8 +269,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
...
@@ -269,8 +269,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
$form
=
new
Form
(
$db
);
$form
=
new
Form
(
$db
);
$formsocialcontrib
=
new
FormSocialContrib
(
$db
);
$formsocialcontrib
=
new
FormSocialContrib
(
$db
);
$title
=
$langs
->
trans
(
"SocialContribution"
)
.
' - '
.
$langs
->
trans
(
"Card"
);
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
llxHeader
(
""
,
$
langs
->
trans
(
"SocialContribution"
)
,
$help_url
);
llxHeader
(
""
,
$
title
,
$help_url
);
// Mode creation
// Mode creation
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/sociales/document.php
+
28
−
53
View file @
c187f952
...
@@ -75,6 +75,13 @@ $modulepart='tax';
...
@@ -75,6 +75,13 @@ $modulepart='tax';
include_once
DOL_DOCUMENT_ROOT
.
'/core/actions_linkedfiles.inc.php'
;
include_once
DOL_DOCUMENT_ROOT
.
'/core/actions_linkedfiles.inc.php'
;
if
(
$action
==
'setlib'
&&
$user
->
rights
->
tax
->
charges
->
creer
)
{
$object
->
fetch
(
$id
);
$result
=
$object
->
setValueFrom
(
'libelle'
,
GETPOST
(
'lib'
),
''
,
''
,
'text'
,
''
,
$user
,
'TAX_MODIFY'
);
if
(
$result
<
0
)
setEventMessages
(
$object
->
error
,
$object
->
errors
,
'errors'
);
}
/*
/*
* View
* View
...
@@ -82,8 +89,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
...
@@ -82,8 +89,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
$form
=
new
Form
(
$db
);
$form
=
new
Form
(
$db
);
$title
=
$langs
->
trans
(
"SocialContribution"
)
.
' - '
.
$langs
->
trans
(
"Documents"
);
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
llxHeader
(
""
,
$
langs
->
trans
(
"SocialContribution"
)
,
$help_url
);
llxHeader
(
""
,
$
title
,
$help_url
);
if
(
$object
->
id
)
if
(
$object
->
id
)
{
{
...
@@ -93,6 +101,20 @@ if ($object->id)
...
@@ -93,6 +101,20 @@ if ($object->id)
dol_fiche_head
(
$head
,
'documents'
,
$langs
->
trans
(
"SocialContribution"
),
0
,
'bill'
);
dol_fiche_head
(
$head
,
'documents'
,
$langs
->
trans
(
"SocialContribution"
),
0
,
'bill'
);
$morehtmlref
=
'<div class="refidno">'
;
// Label of social contribution
$morehtmlref
.
=
$form
->
editfieldkey
(
"Label"
,
'lib'
,
$object
->
lib
,
$object
,
$user
->
rights
->
tax
->
charges
->
creer
,
'string'
,
''
,
0
,
1
);
$morehtmlref
.
=
$form
->
editfieldval
(
"Label"
,
'lib'
,
$object
->
lib
,
$object
,
$user
->
rights
->
tax
->
charges
->
creer
,
'string'
,
''
,
null
,
null
,
''
,
1
);
$morehtmlref
.
=
'</div>'
;
$linkback
=
'<a href="'
.
DOL_URL_ROOT
.
'/compta/sociales/index.php">'
.
$langs
->
trans
(
"BackToList"
)
.
'</a>'
;
$object
->
totalpaye
=
$totalpaye
;
// To give a chance to dol_banner_tab to use already paid amount to show correct status
dol_banner_tab
(
$object
,
'id'
,
$linkback
,
1
,
'rowid'
,
'ref'
,
$morehtmlref
,
''
,
0
,
''
,
$morehtmlright
);
print
'<div class="fichecenter">'
;
print
'<div class="underbanner clearboth"></div>'
;
// Construit liste des fichiers
// Construit liste des fichiers
$filearray
=
dol_dir_list
(
$upload_dir
,
"files"
,
0
,
''
,
'(\.meta|_preview\.png)$'
,
$sortfield
,(
strtolower
(
$sortorder
)
==
'desc'
?
SORT_DESC
:
SORT_ASC
),
1
);
$filearray
=
dol_dir_list
(
$upload_dir
,
"files"
,
0
,
''
,
'(\.meta|_preview\.png)$'
,
$sortfield
,(
strtolower
(
$sortorder
)
==
'desc'
?
SORT_DESC
:
SORT_ASC
),
1
);
...
@@ -105,63 +127,16 @@ if ($object->id)
...
@@ -105,63 +127,16 @@ if ($object->id)
print
'<table class="border" width="100%">'
;
print
'<table class="border" width="100%">'
;
// Ref
print
'<tr><td class="titlefield">'
.
$langs
->
trans
(
"NbOfAttachedFiles"
)
.
'</td><td colspan="3">'
.
count
(
$filearray
)
.
'</td></tr>'
;
print
'<tr><td width="25%">'
.
$langs
->
trans
(
"Ref"
)
.
'</td><td>'
;
print
$form
->
showrefnav
(
$object
,
'id'
);
print
"</td></tr>"
;
// Label
if
(
$action
==
'edit'
)
{
print
'<tr><td>'
.
$langs
->
trans
(
"Label"
)
.
'</td><td>'
;
print
'<input type="text" name="label" size="40" value="'
.
$object
->
lib
.
'">'
;
print
'</td></tr>'
;
}
else
{
print
'<tr><td>'
.
$langs
->
trans
(
"Label"
)
.
'</td><td>'
.
$object
->
lib
.
'</td></tr>'
;
}
// Type
print
"<tr><td>"
.
$langs
->
trans
(
"Type"
)
.
"</td><td>"
.
$object
->
type_libelle
.
"</td></tr>"
;
// Period end date
print
"<tr><td>"
.
$langs
->
trans
(
"PeriodEndDate"
)
.
"</td>"
;
print
"<td>"
;
if
(
$action
==
'edit'
)
{
print
$form
->
select_date
(
$object
->
periode
,
'period'
,
0
,
0
,
0
,
'charge'
,
1
);
}
else
{
print
dol_print_date
(
$object
->
periode
,
"day"
);
}
print
"</td>"
;
print
"</tr>"
;
// Due date
if
(
$action
==
'edit'
)
{
print
'<tr><td>'
.
$langs
->
trans
(
"DateDue"
)
.
"</td><td>"
;
print
$form
->
select_date
(
$object
->
date_ech
,
'ech'
,
0
,
0
,
0
,
'charge'
,
1
);
print
"</td></tr>"
;
}
else
{
print
"<tr><td>"
.
$langs
->
trans
(
"DateDue"
)
.
"</td><td>"
.
dol_print_date
(
$object
->
date_ech
,
'day'
)
.
"</td></tr>"
;
}
// Amount
print
'<tr><td>'
.
$langs
->
trans
(
"AmountTTC"
)
.
'</td><td>'
.
price
(
$object
->
amount
,
0
,
$outputlangs
,
1
,
-
1
,
-
1
,
$conf
->
currency
)
.
'</td></tr>'
;
// Status
print
'<tr><td>'
.
$langs
->
trans
(
"Status"
)
.
'</td><td>'
.
$object
->
getLibStatut
(
4
,
$alreadypayed
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$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>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"TotalSizeOfAttachedFiles"
)
.
'</td><td colspan="3">'
.
$totalsize
.
' '
.
$langs
->
trans
(
"bytes"
)
.
'</td></tr>'
;
print
'</table>'
;
print
'</table>'
;
print
'</div>'
;
print
'</div>'
;
print
'<div class="clearboth"></div>'
;
dol_fiche_end
();
$modulepart
=
'tax'
;
$modulepart
=
'tax'
;
$permission
=
$user
->
rights
->
tax
->
charges
->
creer
;
$permission
=
$user
->
rights
->
tax
->
charges
->
creer
;
$param
=
'&id='
.
$object
->
id
;
$param
=
'&id='
.
$object
->
id
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/sociales/info.php
+
35
−
8
View file @
c187f952
...
@@ -37,25 +37,52 @@ $socid = GETPOST('socid','int');
...
@@ -37,25 +37,52 @@ $socid = GETPOST('socid','int');
if
(
$user
->
societe_id
)
$socid
=
$user
->
societe_id
;
if
(
$user
->
societe_id
)
$socid
=
$user
->
societe_id
;
$result
=
restrictedArea
(
$user
,
'tax'
,
$id
,
'chargesociales'
,
'charges'
);
$result
=
restrictedArea
(
$user
,
'tax'
,
$id
,
'chargesociales'
,
'charges'
);
/*
* Actions
*/
if
(
$action
==
'setlib'
&&
$user
->
rights
->
tax
->
charges
->
creer
)
{
$object
->
fetch
(
$id
);
$result
=
$object
->
setValueFrom
(
'libelle'
,
GETPOST
(
'lib'
),
''
,
''
,
'text'
,
''
,
$user
,
'TAX_MODIFY'
);
if
(
$result
<
0
)
setEventMessages
(
$object
->
error
,
$object
->
errors
,
'errors'
);
}
/*
/*
* View
* View
*/
*/
$title
=
$langs
->
trans
(
"SocialContribution"
)
.
' - '
.
$langs
->
trans
(
"Info"
);
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
$help_url
=
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'
;
llxHeader
(
""
,
$
langs
->
trans
(
"SocialContribution"
)
,
$help_url
);
llxHeader
(
""
,
$
title
,
$help_url
);
$
chargesociales
=
new
ChargeSociales
(
$db
);
$
object
=
new
ChargeSociales
(
$db
);
$
chargesociales
->
fetch
(
$id
);
$
object
->
fetch
(
$id
);
$
chargesociales
->
info
(
$id
);
$
object
->
info
(
$id
);
$head
=
tax_prepare_head
(
$
chargesociales
);
$head
=
tax_prepare_head
(
$
object
);
dol_fiche_head
(
$head
,
'info'
,
$langs
->
trans
(
"SocialContribution"
),
0
,
'bill'
);
dol_fiche_head
(
$head
,
'info'
,
$langs
->
trans
(
"SocialContribution"
),
0
,
'bill'
);
$morehtmlref
=
'<div class="refidno">'
;
// Label of social contribution
$morehtmlref
.
=
$form
->
editfieldkey
(
"Label"
,
'lib'
,
$object
->
lib
,
$object
,
$user
->
rights
->
tax
->
charges
->
creer
,
'string'
,
''
,
0
,
1
);
$morehtmlref
.
=
$form
->
editfieldval
(
"Label"
,
'lib'
,
$object
->
lib
,
$object
,
$user
->
rights
->
tax
->
charges
->
creer
,
'string'
,
''
,
null
,
null
,
''
,
1
);
$morehtmlref
.
=
'</div>'
;
$linkback
=
'<a href="'
.
DOL_URL_ROOT
.
'/compta/sociales/index.php">'
.
$langs
->
trans
(
"BackToList"
)
.
'</a>'
;
$object
->
totalpaye
=
$totalpaye
;
// To give a chance to dol_banner_tab to use already paid amount to show correct status
dol_banner_tab
(
$object
,
'id'
,
$linkback
,
1
,
'rowid'
,
'ref'
,
$morehtmlref
,
''
,
0
,
''
,
$morehtmlright
);
print
'<div class="fichecenter">'
;
print
'<div class="underbanner clearboth"></div>'
;
print
'<br>'
;
print
'<table width="100%"><tr><td>'
;
print
'<table width="100%"><tr><td>'
;
dol_print_object_info
(
$
chargesociales
);
dol_print_object_info
(
$
object
);
print
'</td></tr></table>'
;
print
'</td></tr></table>'
;
print
'</div>'
;
print
'</div>'
;
...
...
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