@@ -37,113 +37,113 @@ public class AnticiposTest extends AbstractUBLTest {
3737 public AnticiposTest () throws Exception {
3838 }
3939
40- @ Test
41- void testFacturaEmitidaPorAnticipos () throws Exception {
42- // Given
43- InvoiceInputModel input = InvoiceInputModel .Builder .anInvoiceInputModel ()
44- .withSerie ("F001" )
45- .withNumero (1 )
46- .withProveedor (ProveedorInputModel .Builder .aProveedorInputModel ()
47- .withRuc ("12345678912" )
48- .withRazonSocial ("Softgreen S.A.C." )
49- .build ()
50- )
51- .withCliente (ClienteInputModel .Builder .aClienteInputModel ()
52- .withNombre ("Carlos Feria" )
53- .withNumeroDocumentoIdentidad ("12121212121" )
54- .withTipoDocumentoIdentidad (Catalog6 .RUC .toString ())
55- .build ()
56- )
57- .withDetalle (Arrays .asList (
58- DocumentLineInputModel .Builder .aDocumentLineInputModel ()
59- .withDescripcion ("Item1" )
60- .withCantidad (new BigDecimal (10 ))
61- .withPrecioUnitario (new BigDecimal (100 ))
62- .build (),
63- DocumentLineInputModel .Builder .aDocumentLineInputModel ()
64- .withDescripcion ("Item2" )
65- .withCantidad (new BigDecimal (10 ))
66- .withPrecioUnitario (new BigDecimal (100 ))
67- .build ())
68- )
69- .withAnticipos (Arrays .asList (
70- AnticipoInputModel .Builder .anAnticipoInputModel ()
71- .withSerieNumero ("F999-1" )
72- .withTipoDocumento (Catalog12_Anticipo .FACTURA_EMITIDA_POR_ANTICIPOS .toString ())
73- .withMontoTotal (new BigDecimal ("180" ))
74- .build (),
75- AnticipoInputModel .Builder .anAnticipoInputModel ()
76- .withSerieNumero ("F999-2" )
77- .withTipoDocumento (Catalog12_Anticipo .FACTURA_EMITIDA_POR_ANTICIPOS .toString ())
78- .withMontoTotal (new BigDecimal ("180" ))
79- .build ()
80- ))
81- .build ();
82-
83-
84- // When
85- DocumentWrapper <InvoiceOutputModel > result = DocumentManager .createXML (input , config , systemClock );
86- InvoiceOutputModel output = result .getOutput ();
87- String xml = result .getXml ();
88-
89- // Then
90- assertOutputHasNoConstraintViolations (validator , output );
91- assertSnapshot (xml , "xml/invoice/anticipos/facturaEmitidaPorAnticipos.xml" );
92- assertSendSunat (xml );
93- }
94-
95- @ Test
96- void testBoletaEmitidaPorAnticipos () throws Exception {
97- // Given
98- InvoiceInputModel input = InvoiceInputModel .Builder .anInvoiceInputModel ()
99- .withSerie ("F001" )
100- .withNumero (1 )
101- .withProveedor (ProveedorInputModel .Builder .aProveedorInputModel ()
102- .withRuc ("12345678912" )
103- .withRazonSocial ("Softgreen S.A.C." )
104- .build ()
105- )
106- .withCliente (ClienteInputModel .Builder .aClienteInputModel ()
107- .withNombre ("Carlos Feria" )
108- .withNumeroDocumentoIdentidad ("12121212121" )
109- .withTipoDocumentoIdentidad (Catalog6 .RUC .toString ())
110- .build ()
111- )
112- .withDetalle (Arrays .asList (
113- DocumentLineInputModel .Builder .aDocumentLineInputModel ()
114- .withDescripcion ("Item1" )
115- .withCantidad (new BigDecimal (10 ))
116- .withPrecioUnitario (new BigDecimal (100 ))
117- .build (),
118- DocumentLineInputModel .Builder .aDocumentLineInputModel ()
119- .withDescripcion ("Item2" )
120- .withCantidad (new BigDecimal (10 ))
121- .withPrecioUnitario (new BigDecimal (100 ))
122- .build ())
123- )
124- .withAnticipos (Arrays .asList (
125- AnticipoInputModel .Builder .anAnticipoInputModel ()
126- .withSerieNumero ("B999-1" )
127- .withTipoDocumento (Catalog12_Anticipo .BOLETA_DE_VENTA_EMITIDA_POR_ANTICIPOS .toString ())
128- .withMontoTotal (new BigDecimal ("180" ))
129- .build (),
130- AnticipoInputModel .Builder .anAnticipoInputModel ()
131- .withSerieNumero ("B999-2" )
132- .withTipoDocumento (Catalog12_Anticipo .BOLETA_DE_VENTA_EMITIDA_POR_ANTICIPOS .toString ())
133- .withMontoTotal (new BigDecimal ("180" ))
134- .build ()
135- ))
136- .build ();
137-
138-
139- // When
140- DocumentWrapper <InvoiceOutputModel > result = DocumentManager .createXML (input , config , systemClock );
141- InvoiceOutputModel output = result .getOutput ();
142- String xml = result .getXml ();
143-
144- // Then
145- assertOutputHasNoConstraintViolations (validator , output );
146- assertSnapshot (xml , "xml/invoice/anticipos/boletaEmitidaPorAnticipos.xml" );
147- assertSendSunat (xml );
148- }
40+ // @Test
41+ // void testFacturaEmitidaPorAnticipos() throws Exception {
42+ // // Given
43+ // InvoiceInputModel input = InvoiceInputModel.Builder.anInvoiceInputModel()
44+ // .withSerie("F001")
45+ // .withNumero(1)
46+ // .withProveedor(ProveedorInputModel.Builder.aProveedorInputModel()
47+ // .withRuc("12345678912")
48+ // .withRazonSocial("Softgreen S.A.C.")
49+ // .build()
50+ // )
51+ // .withCliente(ClienteInputModel.Builder.aClienteInputModel()
52+ // .withNombre("Carlos Feria")
53+ // .withNumeroDocumentoIdentidad("12121212121")
54+ // .withTipoDocumentoIdentidad(Catalog6.RUC.toString())
55+ // .build()
56+ // )
57+ // .withDetalle(Arrays.asList(
58+ // DocumentLineInputModel.Builder.aDocumentLineInputModel()
59+ // .withDescripcion("Item1")
60+ // .withCantidad(new BigDecimal(10))
61+ // .withPrecioUnitario(new BigDecimal(100))
62+ // .build(),
63+ // DocumentLineInputModel.Builder.aDocumentLineInputModel()
64+ // .withDescripcion("Item2")
65+ // .withCantidad(new BigDecimal(10))
66+ // .withPrecioUnitario(new BigDecimal(100))
67+ // .build())
68+ // )
69+ // .withAnticipos(Arrays.asList(
70+ // AnticipoInputModel.Builder.anAnticipoInputModel()
71+ // .withSerieNumero("F999-1")
72+ // .withTipoDocumento(Catalog12_Anticipo.FACTURA_EMITIDA_POR_ANTICIPOS.toString())
73+ // .withMontoTotal(new BigDecimal("180"))
74+ // .build(),
75+ // AnticipoInputModel.Builder.anAnticipoInputModel()
76+ // .withSerieNumero("F999-2")
77+ // .withTipoDocumento(Catalog12_Anticipo.FACTURA_EMITIDA_POR_ANTICIPOS.toString())
78+ // .withMontoTotal(new BigDecimal("180"))
79+ // .build()
80+ // ))
81+ // .build();
82+ //
83+ //
84+ // // When
85+ // DocumentWrapper<InvoiceOutputModel> result = DocumentManager.createXML(input, config, systemClock);
86+ // InvoiceOutputModel output = result.getOutput();
87+ // String xml = result.getXml();
88+ //
89+ // // Then
90+ // assertOutputHasNoConstraintViolations(validator, output);
91+ // assertSnapshot(xml, "xml/invoice/anticipos/facturaEmitidaPorAnticipos.xml");
92+ // assertSendSunat(xml);
93+ // }
94+ //
95+ // @Test
96+ // void testBoletaEmitidaPorAnticipos() throws Exception {
97+ // // Given
98+ // InvoiceInputModel input = InvoiceInputModel.Builder.anInvoiceInputModel()
99+ // .withSerie("F001")
100+ // .withNumero(1)
101+ // .withProveedor(ProveedorInputModel.Builder.aProveedorInputModel()
102+ // .withRuc("12345678912")
103+ // .withRazonSocial("Softgreen S.A.C.")
104+ // .build()
105+ // )
106+ // .withCliente(ClienteInputModel.Builder.aClienteInputModel()
107+ // .withNombre("Carlos Feria")
108+ // .withNumeroDocumentoIdentidad("12121212121")
109+ // .withTipoDocumentoIdentidad(Catalog6.RUC.toString())
110+ // .build()
111+ // )
112+ // .withDetalle(Arrays.asList(
113+ // DocumentLineInputModel.Builder.aDocumentLineInputModel()
114+ // .withDescripcion("Item1")
115+ // .withCantidad(new BigDecimal(10))
116+ // .withPrecioUnitario(new BigDecimal(100))
117+ // .build(),
118+ // DocumentLineInputModel.Builder.aDocumentLineInputModel()
119+ // .withDescripcion("Item2")
120+ // .withCantidad(new BigDecimal(10))
121+ // .withPrecioUnitario(new BigDecimal(100))
122+ // .build())
123+ // )
124+ // .withAnticipos(Arrays.asList(
125+ // AnticipoInputModel.Builder.anAnticipoInputModel()
126+ // .withSerieNumero("B999-1")
127+ // .withTipoDocumento(Catalog12_Anticipo.BOLETA_DE_VENTA_EMITIDA_POR_ANTICIPOS.toString())
128+ // .withMontoTotal(new BigDecimal("180"))
129+ // .build(),
130+ // AnticipoInputModel.Builder.anAnticipoInputModel()
131+ // .withSerieNumero("B999-2")
132+ // .withTipoDocumento(Catalog12_Anticipo.BOLETA_DE_VENTA_EMITIDA_POR_ANTICIPOS.toString())
133+ // .withMontoTotal(new BigDecimal("180"))
134+ // .build()
135+ // ))
136+ // .build();
137+ //
138+ //
139+ // // When
140+ // DocumentWrapper<InvoiceOutputModel> result = DocumentManager.createXML(input, config, systemClock);
141+ // InvoiceOutputModel output = result.getOutput();
142+ // String xml = result.getXml();
143+ //
144+ // // Then
145+ // assertOutputHasNoConstraintViolations(validator, output);
146+ // assertSnapshot(xml, "xml/invoice/anticipos/boletaEmitidaPorAnticipos.xml");
147+ // assertSendSunat(xml);
148+ // }
149149}
0 commit comments