Soporte para pedimentos

This commit is contained in:
Mauricio Baeza 2018-01-08 16:00:55 -06:00
parent 19c0ec91af
commit 4221db615c
3 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
}