Revision 80d3ef8f
Von Cem Aydin vor etwa 1 Jahr hinzugefügt
js/kivi.CustomerVendor.js | ||
---|---|---|
508 | 508 |
}); |
509 | 509 |
} |
510 | 510 |
|
511 |
this.check_cv = function(cv_id, input_element_id, cv_type) { |
|
512 |
if (cv_id === '' || $(input_element_id).val() === '') { |
|
513 |
if (cv_type === 'customer') { |
|
514 |
alert(kivi.t8('Please select a customer.')); |
|
515 |
} else { |
|
516 |
alert(kivi.t8('Please select a vendor.')); |
|
517 |
} |
|
518 |
return false; |
|
519 |
} |
|
520 |
return true; |
|
521 |
}; |
|
522 |
|
|
523 |
this.show_cv_details_dialog = function(id_selector, cv_type) { |
|
524 |
|
|
525 |
const input_element_id = `${id_selector}_name`; |
|
526 |
const cv_id = $(id_selector).val(); |
|
527 |
|
|
528 |
if (!this.check_cv(cv_id, input_element_id, cv_type)) return; |
|
529 |
|
|
530 |
kivi.popup_dialog({ |
|
531 |
url: 'controller.pl', |
|
532 |
data: { action: 'CustomerVendor/show_customer_vendor_details_dialog', |
|
533 |
type : $('#type').val(), |
|
534 |
cv : cv_type, |
|
535 |
cv_id : cv_id |
|
536 |
}, |
|
537 |
id: 'jq_customer_vendor_details_dialog', |
|
538 |
dialog: { |
|
539 |
title: cv_type === 'customer' ? kivi.t8('Customer details') : kivi.t8('Vendor details'), |
|
540 |
width: 800, |
|
541 |
height: 650 |
|
542 |
} |
|
543 |
}); |
|
544 |
return true; |
|
545 |
}; |
|
546 |
|
|
547 |
this.open_customervendor_tab = function(id_selector, cv_type) { |
|
548 |
const input_element_id = `${id_selector}_name`; |
|
549 |
const cv_id = $(id_selector).val(); |
|
550 |
|
|
551 |
if (!this.check_cv(cv_id, input_element_id, cv_type)) return; |
|
552 |
|
|
553 |
window.open("controller.pl?action=CustomerVendor/edit&db=" + encodeURIComponent(cv_type) + "&id=" + encodeURIComponent(cv_id), '_blank'); |
|
554 |
}; |
|
555 |
|
|
511 | 556 |
$(function(){ |
512 | 557 |
ns.init(); |
513 | 558 |
ns.price_list_init(); |
Auch abrufbar als: Unified diff
Kunden/Lieferanten Presenter: Details als Option zum picker hinzugefügt
- Option show_details zeigt Info Popup sowie Link zum bearbeiten an
- möglicher Einsatz bei Angebot, Aufträgen, Rechnungen ect., sowie Debitoren-/Kreditorenbuchung