@cenk1cenk2/md-printer 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,5 +106,5 @@
106
106
  "enableJsonFlag": false
107
107
  }
108
108
  },
109
- "version": "2.9.1"
109
+ "version": "2.9.3"
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/md-printer",
3
- "version": "2.9.2",
3
+ "version": "2.10.0",
4
4
  "description": "A markdown printer.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -21,9 +21,15 @@
21
21
  <h3>{{ company.tax_number }}</h3>
22
22
  <address>{{ company.address }}</address>
23
23
  <div class="flex flex-col text-sm">
24
+ {% if company.phone %}
24
25
  <a href="tel:{{ company.phone }}">{{ company.phone }}</a>
26
+ {% endif %}
27
+ {% if company.email %}
25
28
  <a href="mailto:{{ company.email }}">{{ company.email }}</a>
29
+ {% endif %}
30
+ {% if company.website %}
26
31
  <a href="{{ company.website }}">{{ company.website }}</a>
32
+ {% endif %}
27
33
  </div>
28
34
  </div>
29
35
  <div class="col-span-6 bg-gray-900 rounded-bl-4xl flex flex-col justify-center text-center">
@@ -36,8 +42,10 @@
36
42
  </div>
37
43
  <div class="col-span-5 flex flex-col justify-baseline p-4">
38
44
  <h2>{{ client.name }}</h2>
45
+ {% if client.tax_number %}
39
46
  <h3>{{ client.tax_number }}</h3>
40
- <address>{{ company.address }}</address>
47
+ {% endif %}
48
+ <address>{{ client.address }}</address>
41
49
  </div>
42
50
  <div class="col-span-6 flex justify-center text-xs text-center p-4">
43
51
  <div class="grid grid-rows-2 gap-4 w-full mr-12">
@@ -53,9 +61,6 @@
53
61
  </div>
54
62
  </section>
55
63
  <section id="items" class="grid grid-cols-12">
56
- <!-- <div class="col-span-1 flex flex-col justify-center text-lg font-extrabold text-gray-100"> -->
57
- <!-- <p class="text-vertical">ITEMS</p> -->
58
- <!-- </div> -->
59
64
  <div class="col-span-12 px-16 py-4">
60
65
  <table class="w-full table-auto border-y-2 shadow-md shadow-gray-300 border-gray-900! rounded-xl">
61
66
  <thead class="border-b-2">
@@ -92,8 +97,14 @@
92
97
  <td class="text-center align-middle">{{ calculated_item_subtotal }}{{ currency }}</td>
93
98
  {% set calculated_item_tax = calculated_item_subtotal * item.tax / 100 %}
94
99
  {% set calculated_tax = calculated_tax + calculated_item_tax %}
95
- <td class="text-center align-middle">{{ calculated_item_tax }}{{ currency }} <sup class="text-xs">({{
96
- item.tax }}%)</sup> </td>
100
+ <td class="text-center align-middle">
101
+ {% if calculated_item_tax > 0 %}
102
+ {{ calculated_item_tax }}{{ currency }}
103
+ <sub class="text-xs">({{ item.tax }}%)</sub>
104
+ {% else %}
105
+
106
+ {% endif %}
107
+ </td>
97
108
  {% set calculated_item_total = calculated_item_subtotal + calculated_item_tax %}
98
109
  <td class="font-semibold text-center align-middle">{{ calculated_item_total }}{{ currency }}</td>
99
110
  </tr>
@@ -132,7 +143,11 @@
132
143
  Tax
133
144
  </p>
134
145
  <p>
146
+ {% if calculated_tax > 0 %}
135
147
  {{ calculated_tax }}{{currency}}
148
+ {% else %}
149
+
150
+ {% endif %}
136
151
  </p>
137
152
  </div>
138
153
  <div class="flex flex-row justify-between font-bold text-xl text-primary-500 pt-2 border-t-2">