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
2248429e
Commit
2248429e
authored
8 years ago
by
Gustavo Novaro
Browse files
Options
Downloads
Patches
Plain Diff
Improve cashdesk code style. Ticket now have ticket.css file
parent
785b2d46
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/cashdesk/css/ticket.css
+61
-0
61 additions, 0 deletions
htdocs/cashdesk/css/ticket.css
htdocs/cashdesk/tpl/ticket.tpl.php
+51
-97
51 additions, 97 deletions
htdocs/cashdesk/tpl/ticket.tpl.php
with
112 additions
and
97 deletions
htdocs/cashdesk/css/ticket.css
0 → 100644
+
61
−
0
View file @
2248429e
/*
* TPV ticket.css
*/
body
{
font-size
:
1.5em
;
position
:
relative
;
}
.entete
{
/* position: relative; */
}
.address
{
/* float: left; */
font-size
:
12px
;
}
.date_heure
{
position
:
absolute
;
top
:
0
;
right
:
0
;
font-size
:
16px
;
}
.infos
{
position
:
relative
;
}
.liste_articles
{
width
:
100%
;
border-bottom
:
1px
solid
#000
;
text-align
:
center
;
}
.liste_articles
tr
.titres
th
{
border-bottom
:
1px
solid
#000
;
}
.liste_articles
td
.total
{
text-align
:
right
;
}
.totaux
{
margin-top
:
20px
;
width
:
30%
;
float
:
right
;
text-align
:
right
;
}
.lien
{
position
:
absolute
;
top
:
0
;
left
:
0
;
display
:
none
;
}
@media
print
{
.lien
{
display
:
none
;
}
}
This diff is collapsed.
Click to expand it.
htdocs/cashdesk/tpl/ticket.tpl.php
+
51
−
97
View file @
2248429e
...
...
@@ -28,130 +28,84 @@ $object->fetch($facid);
?>
<html>
<head>
<title>
<?php
echo
$langs
->
trans
(
'PrintTicket'
)
?>
</title>
<style
type=
"text/css"
>
body
{
font-size
:
1.5em
;
position
:
relative
;
}
.entete
{
/* position: relative; */
}
.address
{
/* float: left; */
font-size
:
12px
;
}
.date_heure
{
position
:
absolute
;
top
:
0
;
right
:
0
;
font-size
:
16px
;
}
.infos
{
position
:
relative
;
}
.liste_articles
{
width
:
100%
;
border-bottom
:
1px
solid
#000
;
text-align
:
center
;
}
.liste_articles
tr
.titres
th
{
border-bottom
:
1px
solid
#000
;
}
.liste_articles
td
.total
{
text-align
:
right
;
}
.totaux
{
margin-top
:
20px
;
width
:
30%
;
float
:
right
;
text-align
:
right
;
}
.lien
{
position
:
absolute
;
top
:
0
;
left
:
0
;
display
:
none
;
}
@media
print
{
.lien
{
display
:
none
;
}
}
</style>
<head>
<title>
<?php
echo
$langs
->
trans
(
'PrintTicket'
)
?>
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
DOL_URL_ROOT
;
?>
/cashdesk/css/ticket.css"
>
</head>
<body>
<div
class=
"entete"
>
<div
class=
"logo"
>
<?php
print
'<img src="'
.
DOL_URL_ROOT
.
'/viewimage.php?modulepart=companylogo&file='
.
urlencode
(
'/thumbs/'
.
$mysoc
->
logo_small
)
.
'">'
;
?>
</div>
<div
class=
"infos"
>
<p
class=
"address"
>
<?php
echo
$mysoc
->
name
;
?>
<br>
<?php
print
dol_nl2br
(
dol_format_address
(
$mysoc
));
?>
<br>
</p>
<p
class=
"date_heure"
>
<?php
// Recuperation et affichage de la date et de l'heure
$now
=
dol_now
();
print
dol_print_date
(
$now
,
'dayhourtext'
)
.
'<br>'
;
print
$object
->
ref
;
?>
</p>
</div>
<div
class=
"logo"
>
<?php
print
'<img src="'
.
DOL_URL_ROOT
.
'/viewimage.php?modulepart=companylogo&file='
.
urlencode
(
'/thumbs/'
.
$mysoc
->
logo_small
)
.
'">'
;
?>
</div>
<div
class=
"infos"
>
<p
class=
"address"
>
<?php
echo
$mysoc
->
name
;
?>
<br>
<?php
print
dol_nl2br
(
dol_format_address
(
$mysoc
));
?>
<br>
</p>
<p
class=
"date_heure"
>
<?php
// Recuperation et affichage de la date et de l'heure
$now
=
dol_now
();
print
dol_print_date
(
$now
,
'dayhourtext'
)
.
'<br>'
;
print
$object
->
ref
;
?>
</p>
</div>
</div>
<br>
<table
class=
"liste_articles"
>
<thead>
<tr
class=
"titres"
>
<th>
<?php
print
$langs
->
trans
(
"Code"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Label"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Qty"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Discount"
)
.
' (%)'
;
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"TotalHT"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Code"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Label"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Qty"
);
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"Discount"
)
.
' (%)'
;
?>
</th>
<th>
<?php
print
$langs
->
trans
(
"TotalHT"
);
?>
</th>
</tr>
</thead>
<tbody>
<?php
<?php
$tab
=
array
();
$tab
=
array
();
$tab
=
$_SESSION
[
'poscart'
];
$tab_size
=
count
(
$tab
);
for
(
$i
=
0
;
$i
<
$tab_size
;
$i
++
)
{
$remise
=
$tab
[
$i
][
'remise'
];
echo
(
'<tr><td>'
.
$tab
[
$i
][
'ref'
]
.
'</td><td>'
.
$tab
[
$i
][
'label'
]
.
'</td><td>'
.
$tab
[
$i
][
'qte'
]
.
'</td><td>'
.
$tab
[
$i
][
'remise_percent'
]
.
'</td><td class="total">'
.
price
(
price2num
(
$tab
[
$i
][
'total_ht'
],
'MT'
),
0
,
$langs
,
0
,
0
,
-
1
,
$conf
->
currency
)
.
'</td></tr>'
.
"
\n
"
);
?>
<tr>
<td>
<?php
echo
$tab
[
$i
][
'ref'
];
?>
</td>
<td>
<?php
echo
$tab
[
$i
][
'label'
];
?>
</td>
<td>
<?php
echo
$tab
[
$i
][
'qte'
];
?>
</td>
<td>
<?php
echo
$tab
[
$i
][
'remise_percent'
];
?>
</td>
<td
class=
"total"
>
<?php
echo
price
(
price2num
(
$tab
[
$i
][
'total_ht'
],
'MT'
),
0
,
$langs
,
0
,
0
,
-
1
,
$conf
->
currency
);
?>
</td>
</tr>
<?php
}
?
>
?>
</tbody
>
</table>
<table
class=
"totaux"
>
<?php
echo
'<tr><th class="nowrap">'
.
$langs
->
trans
(
"TotalHT"
)
.
'</th><td class="nowrap">'
.
price
(
price2num
(
$obj_facturation
->
prixTotalHt
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"</td></tr>
\n
"
;
echo
'<tr><th class="nowrap">'
.
$langs
->
trans
(
"TotalVAT"
)
.
'</th><td class="nowrap">'
.
price
(
price2num
(
$obj_facturation
->
montantTva
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"</td></tr>
\n
"
;
echo
'<tr><th class="nowrap">'
.
$langs
->
trans
(
"TotalTTC"
)
.
'</th><td class="nowrap">'
.
price
(
price2num
(
$obj_facturation
->
prixTotalTtc
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"</td></tr>
\n
"
;
?>
<tr>
<th
class=
"nowrap"
>
<?php
echo
$langs
->
trans
(
"TotalHT"
);
?>
</th>
<td
class=
"nowrap"
>
<?php
echo
price
(
price2num
(
$obj_facturation
->
prixTotalHt
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"
\n
"
;
?>
</td>
</tr>
<tr>
<th
class=
"nowrap"
>
<?php
echo
$langs
->
trans
(
"TotalVAT"
)
.
'</th><td class="nowrap">'
.
price
(
price2num
(
$obj_facturation
->
montantTva
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"
\n
"
;
?>
</td>
</tr>
<tr>
<th
class=
"nowrap"
>
<?php
echo
''
.
$langs
->
trans
(
"TotalTTC"
)
.
'</th><td class="nowrap">'
.
price
(
price2num
(
$obj_facturation
->
prixTotalTtc
(),
'MT'
),
''
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
)
.
"
\n
"
;
?>
</td>
</tr>
</table>
<script
type=
"text/javascript"
>
window
.
print
();
window
.
print
();
</script>
<a
class=
"lien"
href=
"#"
onclick=
"javascript: window.close(); return(false);"
>
<?php
echo
$langs
->
trans
(
"Close"
);
?>
</a>
<a
class=
"lien"
href=
"#"
onclick=
"javascript: window.close(); return(false);"
>
<?php
echo
$langs
->
trans
(
"Close"
);
?>
</a>
</body>
</html>
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