Commit a4fce59de4ccf0fb2b85671a72301343c2262b91
1 parent
de5a79260c
Exists in
master
and in
3 other branches
complete solve bugs of invoice
Showing
3 changed files
with
13 additions
and
124 deletions
Show diff stats
src/pages/Account/editInvoice.vue
... | ... | @@ -362,6 +362,16 @@ export default { |
362 | 362 | if (editInvoiceData.paymentStatus == "NOT_PAID") { |
363 | 363 | delete editInvoiceData.paymentMethod; |
364 | 364 | } |
365 | + if (this.feeType.subTotal == this.feeType.paidAmount) { | |
366 | + editInvoiceData.paymentStatus = "FULLY_PAID"; | |
367 | + // console.log("FULLY_PAID"); | |
368 | + } | |
369 | + if (editInvoiceData.totalPaidAmount) { | |
370 | + if (this.feeType.subTotal != this.feeType.paidAmount) { | |
371 | + editInvoiceData.paymentStatus = "PARTIALLY_PAID"; | |
372 | + // console.log("PARTIALLY_PAID"); | |
373 | + } | |
374 | + } | |
365 | 375 | http() |
366 | 376 | .put("/updateInvoice", editInvoiceData) |
367 | 377 | .then(response => { | ... | ... |
src/pages/Account/invoice.vue
... | ... | @@ -1158,10 +1158,7 @@ export default { |
1158 | 1158 | if (this.feeTypeData[i].discount) { |
1159 | 1159 | feeType.discount = |
1160 | 1160 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
1161 | - // console.log("feeType.discount", feeType.discount); | |
1162 | 1161 | this.feeType.discount = feeType.discount; |
1163 | - console.log("feeType.discount", this.feeType.discount); | |
1164 | - | |
1165 | 1162 | feeType.subParticularTotal = |
1166 | 1163 | this.feeTypeData[i].amount - |
1167 | 1164 | (this.feeTypeData[i].amount * this.feeTypeData[i].discount) / 100; | ... | ... |
src/pages/Account/paymentTemplate.vue
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | <h3>Profile</h3> |
21 | 21 | <v-spacer></v-spacer> |
22 | 22 | </v-toolbar> |
23 | + <!-- Profile User--> | |
23 | 24 | <v-card-text> |
24 | 25 | <v-container> |
25 | 26 | <v-layout wrap> |
... | ... | @@ -71,6 +72,7 @@ |
71 | 72 | </v-container> |
72 | 73 | </v-card-text> |
73 | 74 | </v-card> |
75 | + <!-- Account Fee Type List User--> | |
74 | 76 | <v-card flat> |
75 | 77 | <v-toolbar dark class="card-styles" flat> |
76 | 78 | <v-spacer></v-spacer> |
... | ... | @@ -80,82 +82,6 @@ |
80 | 82 | <v-spacer></v-spacer> |
81 | 83 | </v-toolbar> |
82 | 84 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> |
83 | - <!-- <v-layout> | |
84 | - <v-flex xs4 class="pt-4 subheading"> | |
85 | - <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | |
86 | - <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | |
87 | - </v-flex> | |
88 | - <v-flex xs6 class="ml-3"> | |
89 | - <v-select | |
90 | - :items="addclass" | |
91 | - label="Select Class" | |
92 | - v-model="editPayment.classId" | |
93 | - item-text="classNum" | |
94 | - item-value="_id" | |
95 | - @change="getAllStudents()" | |
96 | - ></v-select> | |
97 | - </v-flex> | |
98 | - </v-layout> | |
99 | - <v-layout> | |
100 | - <v-flex xs4 class="pt-4 subheading"> | |
101 | - <label class="right hidden-xs-only hidden-sm-only">Select Student:</label> | |
102 | - <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Student:</label> | |
103 | - </v-flex> | |
104 | - <v-flex xs6 class="ml-3"> | |
105 | - <v-select | |
106 | - :items="studentList" | |
107 | - label="Select Incharge" | |
108 | - v-model="editPayment.studentId" | |
109 | - item-text="name" | |
110 | - item-value="_id" | |
111 | - ></v-select> | |
112 | - </v-flex> | |
113 | - </v-layout> | |
114 | - <v-layout> | |
115 | - <v-flex xs4 class="pt-4 subheading"> | |
116 | - <label class="right">Date:</label> | |
117 | - </v-flex> | |
118 | - <v-flex xs6 class="ml-3"> | |
119 | - <v-menu | |
120 | - ref="menu1" | |
121 | - :close-on-content-click="false" | |
122 | - v-model="menu1" | |
123 | - :nudge-right="40" | |
124 | - lazy | |
125 | - :return-value.sync="editPayment.date" | |
126 | - transition="scale-transition" | |
127 | - offset-y | |
128 | - full-width | |
129 | - min-width="290px" | |
130 | - > | |
131 | - <v-text-field | |
132 | - slot="activator" | |
133 | - v-model="editPayment.date" | |
134 | - placeholder="Select date" | |
135 | - ></v-text-field> | |
136 | - <v-date-picker | |
137 | - v-model="editPayment.date" | |
138 | - @input="$refs.menu1.save(editPayment.date)" | |
139 | - ></v-date-picker> | |
140 | - </v-menu> | |
141 | - </v-flex> | |
142 | - </v-layout> | |
143 | - <v-layout> | |
144 | - <v-flex xs4 class="pt-4 subheading"> | |
145 | - <label class="right hidden-xs-only hidden-sm-only">Payment Status:</label> | |
146 | - <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Payment:</label> | |
147 | - </v-flex> | |
148 | - <v-flex xs6 class="ml-3"> | |
149 | - <v-select | |
150 | - :items="paymentStatus" | |
151 | - v-model="editPayment.paymentStatus" | |
152 | - item-text="name" | |
153 | - item-value="value" | |
154 | - label="Select Payment Status" | |
155 | - @change="getPayMethodList" | |
156 | - ></v-select> | |
157 | - </v-flex> | |
158 | - </v-layout>--> | |
159 | 85 | <v-layout> |
160 | 86 | <v-flex xs4 class="pt-4 subheading"> |
161 | 87 | <label class="right">Payment Method:</label> |
... | ... | @@ -189,42 +115,6 @@ |
189 | 115 | </v-toolbar-title> |
190 | 116 | <v-spacer></v-spacer> |
191 | 117 | </v-toolbar> |
192 | - <!-- <v-layout wrap> | |
193 | - <v-flex xs12> | |
194 | - <v-layout wrap> | |
195 | - <v-flex xs12 sm2 class="mt-3"> | |
196 | - <label class="right title hidden-sm-only hidden-xs-only">Fee Type:</label> | |
197 | - <label | |
198 | - class="left pl-2 title hidden-xl-only hidden-lg-only hidden-md-only" | |
199 | - >Fee Type:</label> | |
200 | - </v-flex> | |
201 | - <v-flex xs12 sm4> | |
202 | - <v-select | |
203 | - :items="feeTypes" | |
204 | - v-model="feeType.feeTypeName" | |
205 | - item-text="feeType" | |
206 | - item-value="feeType" | |
207 | - label="Select Fee Type" | |
208 | - class="px-2" | |
209 | - ></v-select> | |
210 | - </v-flex> | |
211 | - <v-flex xs12 sm6> | |
212 | - <v-btn | |
213 | - dark | |
214 | - class="right mt-3 hidden-sm-only hidden-xs-only" | |
215 | - color="open-dialog-button" | |
216 | - @click="selectFeeType" | |
217 | - >ADD</v-btn> | |
218 | - <v-btn | |
219 | - dark | |
220 | - class="mt-3 hidden-xl-only hidden-lg-only hidden-md-only" | |
221 | - color="open-dialog-button" | |
222 | - @click="selectFeeType" | |
223 | - >ADD</v-btn> | |
224 | - </v-flex> | |
225 | - </v-layout> | |
226 | - </v-flex> | |
227 | - </v-layout>--> | |
228 | 118 | <table class="feeTypeTable tableRsponsive"> |
229 | 119 | <tr class="info white--text"> |
230 | 120 | <th>#</th> |
... | ... | @@ -257,15 +147,7 @@ |
257 | 147 | ></v-text-field> |
258 | 148 | </td> |
259 | 149 | <td>{{ feeType.subTotal }}</td> |
260 | - <td v-if="editPayment.paymentStatus === 'NOT_PAID'"> | |
261 | - <v-text-field | |
262 | - placeholder="fill your Paid Amount" | |
263 | - v-model="feeType.paidAmount" | |
264 | - type="number" | |
265 | - :disabled="disabled" | |
266 | - ></v-text-field> | |
267 | - </td> | |
268 | - <td v-if="editPayment.paymentStatus != 'NOT_PAID'"> | |
150 | + <td> | |
269 | 151 | <v-text-field |
270 | 152 | placeholder="fill your Paid Amount" |
271 | 153 | v-model="feeType.paidAmount" | ... | ... |