Skip to content

Commit

Permalink
Remove debugger and add discharged functions back
Browse files Browse the repository at this point in the history
  • Loading branch information
benguozakinci@gmail.com authored and benguozakinci@gmail.com committed Jul 8, 2021
1 parent 40f5a49 commit 3843344
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions resources/assets/js/components/AkauntingDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default {
real_model: '',
}
},
created() {
if (this.locale !== 'en') {
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
Expand All @@ -125,6 +125,8 @@ export default {
if (this.model) {
this.real_model = this.model;
}
this.$emit('interface', this.real_model);
},
methods: {
Expand All @@ -150,25 +152,27 @@ export default {
addDays(dateInput) {
if(!default_payment_terms) return;
console.log(dateInput)
const dateString = new Date(dateInput);
const aMillisec = 86400000;
const dateInMillisecs = dateString.getTime();
const settingPaymentTermInMs = parseInt(default_payment_terms) * aMillisec;
const prospectedDueDate = new Date(dateInMillisecs + settingPaymentTermInMs);
return prospectedDueDate;
debugger;
},
},
watch: {
value: function(val) {
this.real_model = val;
},
dateConfig: function() {
if(!default_payment_terms || this.real_model < this.dateConfig.minDate){
if(!default_payment_terms || this.real_model < this.dateConfig.minDate) {
this.real_model = this.dateConfig.minDate;
}
if(this.dateConfig.minDate && this.real_model > this.dateConfig.minDate ){
if(this.dateConfig.minDate && this.real_model > this.dateConfig.minDate ) {
this.real_model = this.addDays(this.dateConfig.minDate);
}
},
Expand Down

0 comments on commit 3843344

Please sign in to comment.