File tree Expand file tree Collapse file tree 10 files changed +79
-2
lines changed
models/baseModels/PrintSettings Expand file tree Collapse file tree 10 files changed +79
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ export class PrintSettings extends Doc {
1313 displayLogo ?: boolean ;
1414 displayTime ?: boolean ;
1515 displayDescription ?: boolean ;
16+ displaytermsandconditions ?: boolean ;
17+ termsAndConditions ?: string ;
1618 posPrintWidth ?: number ;
1719 amountInWords ?: boolean ;
18- override hidden : HiddenMap = { } ;
20+ override hidden : HiddenMap = {
21+ termsAndConditions : ( ) => ! this . displaytermsandconditions ,
22+ } ;
1923}
Original file line number Diff line number Diff line change 133133 "fieldtype" : " Check" ,
134134 "section" : " Customizations"
135135 },
136+ {
137+ "fieldname" : " displaytermsandconditions" ,
138+ "label" : " Display Terms and Conditions" ,
139+ "fieldtype" : " Check" ,
140+ "section" : " Customizations"
141+ },
142+ {
143+ "fieldname" : " termsAndConditions" ,
144+ "label" : " Terms and Conditions" ,
145+ "fieldtype" : " Text" ,
146+ "section" : " Customizations"
147+ },
136148 {
137149 "fieldname" : " posPrintWidth" ,
138150 "label" : " Pos Print Width" ,
Original file line number Diff line number Diff line change 44 :scale =" Math.max(scale, 0.1)"
55 :width =" width"
66 :height =" height"
7+ :show-overflow =" true"
78 class =" mx-auto shadow-lg border"
89 >
910 <ErrorBoundary
Original file line number Diff line number Diff line change 22 <div class =" overflow-hidden" :style =" outerContainerStyle" >
33 <div
44 :style =" innerContainerStyle"
5- :class =" showOverflow ? 'overflow-auto no-scrollbar' : ''"
5+ :class =" showOverflow ? 'overflow-auto no-scrollbar' : 'overflow-visible '"
66 >
77 <slot ></slot >
88 </div >
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ const printSettingsFields = [
3838 'address' ,
3939 'companyName' ,
4040 'amountInWords' ,
41+ 'displaytermsandconditions' ,
42+ 'termsAndConditions' ,
4143] ;
4244const accountingSettingsFields = [ 'gstin' , 'taxId' ] ;
4345
Original file line number Diff line number Diff line change @@ -153,4 +153,15 @@ <h3>{{ t`Grand Total` }}</h3>
153153 </ div >
154154 </ section >
155155 </ footer >
156+
157+ <!-- Terms and Conditions -->
158+ < section
159+ class ="mt-8 px-6 "
160+ v-if ="print.displaytermsandconditions && print.termsAndConditions "
161+ >
162+ < h3 class ="text-lg font-semibold "> {{ t`Terms and Conditions` }}</ h3 >
163+ < p class ="mt-4 text-lg whitespace-pre-line ">
164+ {{ print.termsAndConditions }}
165+ </ p >
166+ </ section >
156167</ main >
Original file line number Diff line number Diff line change @@ -122,5 +122,16 @@ <h3 class="text-lg font-semibold">{{t`Notes`}}</h3>
122122
123123 < p class ="mt-4 text-lg whitespace-pre-line "> {{ doc.terms }}</ p >
124124 </ section >
125+
126+ <!-- Terms and Conditions -->
127+ < section
128+ class ="mt-12 "
129+ v-if ="print.displaytermsandconditions && print.termsAndConditions "
130+ >
131+ < h3 class ="text-lg font-semibold "> {{t`Terms and Conditions`}}</ h3 >
132+ < p class ="mt-4 text-lg whitespace-pre-line ">
133+ {{ print.termsAndConditions }}
134+ </ p >
135+ </ section >
125136 </ footer >
126137</ main >
Original file line number Diff line number Diff line change @@ -107,5 +107,16 @@ <h3 class="text-lg font-semibold">Notes</h3>
107107
108108 < p class ="mt-4 text-lg whitespace-pre-line "> {{ doc.terms }}</ p >
109109 </ section >
110+
111+ <!-- Terms and Conditions -->
112+ < section
113+ class ="mt-12 "
114+ v-if ="print.displaytermsandconditions && print.termsAndConditions "
115+ >
116+ < h3 class ="text-lg font-semibold "> {{t`Terms and Conditions`}}</ h3 >
117+ < p class ="mt-4 text-lg whitespace-pre-line ">
118+ {{ print.termsAndConditions }}
119+ </ p >
120+ </ section >
110121 </ footer >
111122</ main >
Original file line number Diff line number Diff line change @@ -132,9 +132,21 @@ <h3>{{ t`Grand Total` }}</h3>
132132 < h3 class ="text-lg font-semibold "> {{t`Notes`}}</ h3 >
133133 < p class ="mt-4 text-lg whitespace-pre-line "> {{ doc.terms }}</ p >
134134 </ section >
135+
135136 < div v-if ="print.amountInWords " class ="flex justify-end mt-10 ">
136137 < h3 class ="text-lg font-semibold mr-2 "> {{t`Grand Total In Words`}}:</ h3 >
137138 < p > {{doc.grandTotalInWords}}</ p >
138139 </ div >
140+
141+ <!-- Terms and Conditions -->
142+ < section
143+ class ="mt-12 "
144+ v-if ="print.displaytermsandconditions && print.termsAndConditions "
145+ >
146+ < h3 class ="text-lg font-semibold "> {{t`Terms and Conditions`}}</ h3 >
147+ < p class ="mt-4 text-lg whitespace-pre-line ">
148+ {{ print.termsAndConditions }}
149+ </ p >
150+ </ section >
139151 </ footer >
140152</ main >
Original file line number Diff line number Diff line change @@ -177,4 +177,17 @@ <h3>{{ t`Grand Total` }}</h3>
177177 </ div >
178178 </ section >
179179 </ footer >
180+
181+ <!-- Terms and Conditions -->
182+ < section
183+ class ="px-12 py-10 "
184+ v-if ="print.displaytermsandconditions && print.termsAndConditions "
185+ >
186+ < h3 class ="uppercase text-sm tracking-widest font-semibold text-gray-800 ">
187+ {{ t`Terms and Conditions` }}
188+ </ h3 >
189+ < p class ="mt-4 text-lg whitespace-pre-line ">
190+ {{ print.termsAndConditions }}
191+ </ p >
192+ </ section >
180193</ main >
You can’t perform that action at this time.
0 commit comments