Soporte para pedimentos
This commit is contained in:
parent
19c0ec91af
commit
4221db615c
|
@ -1070,12 +1070,19 @@ def _conceptos(doc, version):
|
|||
values['noidentificacion'], values['ClaveProdServ'])
|
||||
values['unidad'] = '({})\n{}'.format(
|
||||
values['ClaveUnidad'], values['unidad'])
|
||||
|
||||
n = c.find('{}CuentaPredial'.format(PRE[version]))
|
||||
if n is not None:
|
||||
v = CaseInsensitiveDict(n.attrib.copy())
|
||||
info = '\nCuenta Predial Número: {}'.format(v['numero'])
|
||||
values['descripcion'] += info
|
||||
|
||||
n = c.find('{}InformacionAduanera'.format(PRE[version]))
|
||||
if n is not None:
|
||||
v = CaseInsensitiveDict(n.attrib.copy())
|
||||
info = '\nNúmero Pedimento: {}'.format(v['numeropedimento'])
|
||||
values['descripcion'] += info
|
||||
|
||||
data.append(values)
|
||||
return data
|
||||
|
||||
|
|
|
@ -918,8 +918,8 @@ function grid_details_before_edit_stop(state, editor){
|
|||
|
||||
if(editor.column == 'pedimento'){
|
||||
state.value = state.value.trim()
|
||||
if(state.value.length > 21){
|
||||
msg = 'El Pedimento tiene más de 21 caracteres, será '
|
||||
if(state.value.length != 21){
|
||||
msg = 'El Pedimento debe ser de 21 caracteres, será '
|
||||
msg += 'rechazado por el SAT. Edita estalo hasta que ya '
|
||||
msg += 'no veas este mensaje de error. <BR>'
|
||||
msg += '<BR>Caracteres: ' + state.value.length
|
||||
|
|
|
@ -359,6 +359,6 @@ function validate_regexp(value, pattern){
|
|||
|
||||
|
||||
function validate_pedimento(value){
|
||||
var pattern = '[0-9]{2} [0-9]{2} [0-9]{4} [0-9]{7}'
|
||||
var pattern = '[0-9]{2} [0-9]{2} [0-9]{4} [0-9]{7}'
|
||||
return validate_regexp(value, pattern)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue