Revision 13193b1a
Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt
| js/kivi.Reclamation.js | ||
|---|---|---|
|
|
||
|
ns.purchase_reclamation_check_for_direct_delivery = function() {
|
||
|
if ($('#type').val() != 'sales_reclamation') {
|
||
|
kivi.submit_form_with_action($('#reclamation_form'), 'Reclamation/save_and_purchase_reclamation');
|
||
|
return alert(kivi.t8("Error: This is not a sales reclamation."));
|
||
|
}
|
||
|
|
||
|
var empty = true;
|
||
| ... | ... | |
|
shipto = $('#reclamation_shipto_id option:selected').text();
|
||
|
} else {
|
||
|
$('#shipto_inputs [id^="shipto"]').each(function(idx, elt) {
|
||
|
if (!empty) return true;
|
||
|
if (/^shipto_to_copy/.test($(elt).prop('id'))) return true;
|
||
|
if (/^shiptocp_gender/.test($(elt).prop('id'))) return true;
|
||
|
if (/^shiptocvar_/.test($(elt).prop('id'))) return true;
|
||
|
if (!empty) return;
|
||
|
if (/^shipto_to_copy/.test($(elt).prop('id'))) return;
|
||
|
if (/^shiptocp_gender/.test($(elt).prop('id'))) return;
|
||
|
if (/^shiptocvar_/.test($(elt).prop('id'))) return;
|
||
|
if ($(elt).val() !== '') {
|
||
|
empty = false;
|
||
|
return false;
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
var shipto_elements = [];
|
||
| ... | ... | |
|
shipto = shipto_elements.join('; ');
|
||
|
}
|
||
|
|
||
|
var use_it = false;
|
||
|
if (!empty) {
|
||
|
ns.direct_delivery_dialog(shipto);
|
||
|
} else {
|
||
|
kivi.submit_form_with_action($('#reclamation_form'), 'Reclamation/save_and_purchase_reclamation');
|
||
|
ns.save('save_and_purchase_reclamation');
|
||
|
}
|
||
|
};
|
||
|
|
||
| ... | ... | |
|
$('<input type="hidden" name="use_shipto">').appendTo('#reclamation_form').val('1');
|
||
|
}
|
||
|
|
||
|
kivi.submit_form_with_action($('#reclamation_form'), 'Reclamation/save_and_purchase_reclamation');
|
||
|
ns.save('save_and_purchase_reclamation');
|
||
|
};
|
||
|
|
||
|
ns.direct_delivery_dialog = function(shipto) {
|
||
| js/locale/de.js | ||
|---|---|---|
|
"Enter longdescription":"Langtext eingeben",
|
||
|
"Error: #1":"Fehler: #1",
|
||
|
"Error: Name missing":"Fehler: Name fehlt",
|
||
|
"Error: This is not a sales reclamation.":"Fehler: Dies ist keine Verkaufreklamaiton.",
|
||
|
"Feb":"Feb",
|
||
|
"February":"Februar",
|
||
|
"File upload":"Datei Upload",
|
||
| js/locale/en.js | ||
|---|---|---|
|
"Enter longdescription":"",
|
||
|
"Error: #1":"",
|
||
|
"Error: Name missing":"",
|
||
|
"Error: This is not a sales reclamation.":"",
|
||
|
"Feb":"",
|
||
|
"February":"",
|
||
|
"File upload":"",
|
||
| locale/de/all | ||
|---|---|---|
|
'Error: Stock problem' => 'Fehler: Problem bei der Lagerbewegung',
|
||
|
'Error: Stocking out would result in stock underrun' => 'Auslagern würde zu einem negativen Lagerbestand führen',
|
||
|
'Error: Stocking out would result in stock underrun: #1' => 'Auslagern würde zu einem negativen Lagerbestand führen: #1',
|
||
|
'Error: This is not a sales reclamation.' => 'Fehler: Dies ist keine Verkaufreklamaiton.',
|
||
|
'Error: Transfer would result in a negative target quantity.' => 'Fehler: Lagerbewegung würde zu einer negativen Zielmenge führen.',
|
||
|
'Error: Unit missing or invalid' => 'Fehler: Einheit fehlt oder ungültig',
|
||
|
'Error: Warehouse not found' => 'Fehler: Lager nicht gefunden',
|
||
| locale/en/all | ||
|---|---|---|
|
'Error: Stock problem' => '',
|
||
|
'Error: Stocking out would result in stock underrun' => '',
|
||
|
'Error: Stocking out would result in stock underrun: #1' => '',
|
||
|
'Error: This is not a sales reclamation.' => '',
|
||
|
'Error: Transfer would result in a negative target quantity.' => '',
|
||
|
'Error: Unit missing or invalid' => '',
|
||
|
'Error: Warehouse not found' => '',
|
||
Auch abrufbar als: Unified diff
Reclamation: [FIX] überprüfe Felder bei use_direkt_delivery