File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -366,6 +366,14 @@ def create_invoice(self, prorate):
366
366
if doctype == 'Sales Invoice' :
367
367
invoice .customer = self .party
368
368
invoice .territory = frappe .db .get_value ('Customer' , self .party , 'territory' )
369
+
370
+ if self .punto_de_venta and self .secuencia :
371
+ punto_de_venta = frappe .get_doc ('Punto de Venta' , self .punto_de_venta )
372
+ tipo_de_comprobante = punto_de_venta .get_tipo_comprobante_for_secuence (self .secuencia )
373
+ if tipo_de_comprobante and tipo_de_comprobante .codigo in ['201' , '206' , '211' ]: # MIPYME
374
+ subscription_settings = frappe .get_single ('Subscription Settings' )
375
+ invoice .naming_series = self .secuencia
376
+ invoice .opcion_de_transmision = subscription_settings .opcion_de_transmision
369
377
else :
370
378
invoice .supplier = self .party
371
379
if frappe .db .get_value ('Supplier' , self .party , 'tax_withholding_category' ):
Original file line number Diff line number Diff line change 7
7
"field_order" : [
8
8
" grace_period" ,
9
9
" cancel_after_grace" ,
10
- " prorate"
10
+ " prorate" ,
11
+ " opcion_de_transmision"
11
12
],
12
13
"fields" : [
13
14
{
28
29
"fieldname" : " prorate" ,
29
30
"fieldtype" : " Check" ,
30
31
"label" : " Prorate"
32
+ },
33
+ {
34
+ "fieldname" : " opcion_de_transmision" ,
35
+ "fieldtype" : " Select" ,
36
+ "label" : " Opci\u00f3 n de Transmisi\u00f3 n Predeterminada" ,
37
+ "options" : " \n Transferencia al sistema de circulaci\u00f3 n abierta\n Agente de dep\u00f3 sito colectivo"
31
38
}
32
39
],
33
40
"issingle" : 1 ,
34
41
"links" : [],
35
- "modified" : " 2021-05-14 20:01:49.069747 " ,
42
+ "modified" : " 2024-08-30 08:37:35.967594 " ,
36
43
"modified_by" : " Administrator" ,
37
44
"module" : " Accounts" ,
38
45
"name" : " Subscription Settings" ,
You can’t perform that action at this time.
0 commit comments