Bugs fixed: postalCode, credit list and validate DNI
This commit is contained in:
parent
e1a565ae1f
commit
1b4fd50929
|
@ -121,8 +121,7 @@
|
|||
"menu": {
|
||||
"description": "Credit",
|
||||
"icon": "credit_card"
|
||||
},
|
||||
"acl": ["manager", "salesAssistant", "teamBoss", "teamManager"]
|
||||
}
|
||||
}, {
|
||||
"url": "/create",
|
||||
"state": "clientCard.credit.create",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<vn-textfield vn-one label="Street address" field="$ctrl.address.street"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
|
||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
|
||||
<vn-textfield vn-one label="Town/City" field="$ctrl.address.city"></vn-textfield>
|
||||
<vn-autocomplete vn-one
|
||||
field="$ctrl.address.provinceFk"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
|
||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
|
||||
<vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
|
||||
<vn-autocomplete vn-one
|
||||
initial-data="$ctrl.address.province"
|
||||
|
|
|
@ -69,6 +69,9 @@ module.exports = fi => {
|
|||
const dniLetterAscii = parseInt(dniLetterCountry.charCodeAt(0));
|
||||
let dniValue = false;
|
||||
switch (true) {
|
||||
case (dni.length === 9 && !isNaN(dni)): // dni Portugal (9 digitos)
|
||||
dniValue = true;
|
||||
break;
|
||||
case (dniLetterAscii >= 88 && dniLetterAscii <= 90): // X-Z
|
||||
dniValue = getDniForeign(dniNumeric, dniLetter);
|
||||
break;
|
||||
|
@ -81,7 +84,7 @@ module.exports = fi => {
|
|||
case (dniLetterAscii === 73): // I
|
||||
dniValue = getDniItaly(dniLetterCountry);
|
||||
break;
|
||||
case (dniLetterAscii >= 48 && dniLetterAscii <= 57): // 0- 9
|
||||
case (dni.length === 9 && dniLetterAscii >= 48 && dniLetterAscii <= 57): // 0- 9
|
||||
dniValue = getDniSpain(dniNumeric, dniLetter);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue