Skip to content

Commit 067977c

Browse files
committed
Initial
1 parent 968df78 commit 067977c

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

satdigitalinvoice/environments.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ def bold(k):
5757
def moneda_nacional(k):
5858
return common.pesos(k)
5959

60+
@self.filter
61+
def pesos_sinletra(k):
62+
return common.pesos_sinletra(k)
63+
64+
6065
@self.filter
6166
def numero(k):
6267
return common.numero(k)

satdigitalinvoice/formatting_functions/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ def pesos(amount):
1212
return "${0:,.2f} (SON: {1} {2}/100M.N.)".format(amount, integer_part, decimal_part)
1313

1414

15+
def pesos_sinletra(amount):
16+
return "${0:,.2f}".format(amount)
17+
1518
def num_letras(number):
1619
return num2words(number, lang=LANG).upper()
1720

satdigitalinvoice/gui_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def generate_pdf_template_basic(template_name, fields, target=None, css_string=N
464464
pdf = HTML(string=html).write_pdf(
465465
target=target,
466466
stylesheets=[
467-
os.path.join(SOURCE_DIRECTORY, "markdown_styles", "markdown6.css"),
467+
os.path.join(SOURCE_DIRECTORY, "markdown_styles", "markdown6_nopage.css"),
468468
CSS(
469469
string=css_string
470470
)

satdigitalinvoice/markdown_styles/markdown6_nopage.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
@page {
2-
@bottom-center{
3-
content: counter(page) " / " counter(pages);
4-
font:13px Verdana,sans-serif;
5-
}
6-
}
1+
72
@page { width: Letter; margin: 1.6cm 1.6cm 1.6cm 1.6cm; }
83

4+
.box {
5+
border: 2px solid #000; /* black border */
6+
padding: 5px; /* space inside the box */
7+
width: fit-content; /* adjusts box size to content */
8+
background-color: #f0f0f0; /* light gray background */
9+
border-radius: 0px; /* rounded corners (optional) */
10+
}
11+
912
/* Main CSS from the Markdown Viewer Extension */
1013
body,h1{
1114
color:#000

0 commit comments

Comments
 (0)