Skip to content

Commit

Permalink
Lot of progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Cruz committed Oct 5, 2018
1 parent d4fc42b commit bc54696
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 111 deletions.
8 changes: 4 additions & 4 deletions .gitignore
@@ -1,6 +1,6 @@
/nbproject/private/
/vendor/
/tests/repository/cdr
/tests/repository/sxml
/tests/repository/xml
/tests/repository/zip
/tests/repository/cdr/
/tests/repository/sxml/
/tests/repository/xml/
/tests/repository/zip/
106 changes: 55 additions & 51 deletions README.md
Expand Up @@ -51,71 +51,75 @@ $dt->setTime(13, 25, 51);
// data de la factura
$dataFactura = [
'operationTypeCode' => '0101', // Tipo de operación Catálogo #51.
'voucherSeries' => 1, // Serie de la factura.
'voucherNumber' => 4355, // Número correlativo de la factura.
'customerName' => 'SERVICABINAS S.A.', // Razón social del receptor.
'customerDocNumber' => '20587896411', // RUC del receptor.
'customerDocType' => '6', // Tipo de documento del receptor Catálogo #6.
'date' => $dt, // Opcional, por defecto usará la fecha y hora del sistema.
'purchaseOrder' => 7852166, // Opcional, numero de orden de commpra.
'operationType' => '0101', // Tipo de operación Catálogo #51
'voucherSeries' => 1, // Serie de la factura
'voucherNumber' => 4355, // Número correlativo de la factura
'customerDocType' => '6', // Tipo de documento Catálogo #6
'customerDocNumber' => '20587896411', // RUC
'customerRegName' => 'SERVICABINAS S.A.', // Razón social
'issueDate' => $dt, // Fecha de emisión [opcional], si no se especifica se usara la fecha del sistema!
'purchaseOrder' => 7852166, // Numero de orden de commpra,
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.05]
[
'reasonCode' => '00', // Código de descuento Cátalogo #53
'multiplierFactor' => 0.05
]
],
'charges' => [],
'items' => [
[
'productCode' => 'GLG199', // Código.
'sunatProductCode' => '52161515', // Código de producto SUNAT. Catálogo #25.
'unitCode' => 'NIU', // Código de unidad. Catálogo #3.
'quantity' => 2000, // Cantidad.
'description' => 'Grabadora LG Externo Modelo: GE20LU10', // Descripción.
'priceType' => '01', // Catálogo #16.
'taxType' => '1000', // Catálogo #5.
'igvAffectationCode' => '10', // Catálogo #7.
'unitValue' => 98.00, // Valor unitario.
'igvIncluded' => true, // true si el IGV está incluido en el Valor unitario.
'allowances' => [
'productCode' => 'GLG199', // Código
'sunatProductCode' => '52161515', // Código de producto SUNAT
'unitCode' => 'NIU', // Código de unidad
'quantity' => 2000, // Cantidad
'description' => 'Grabadora LG Externo Modelo: GE20LU10', // Descripción detallada
'priceType' => '01', // Catálogo #16 [01:Precio Unitario|02:Valor Referencial]
'taxType' => '1000', // Catálogo #5
'igvAffectationCode' => '10', // Catálogo #7
'unitValue' => 98.00, // Valor unitario
'igvIncluded' => true, // true si el valor unitario incluye IGV
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.1]
]
],
[
'productCode' => 'MVS546',
'sunatProductCode' => '43211902',
'unitCode' => 'NIU',
'quantity' => 300,
'description' => 'Monitor LCD ViewSonic VG2028WM 20',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 620.00,
'igvIncluded' => true,
'allowances' => [
'productCode' => 'MVS546',
'sunatProductCode' => '43211902',
'unitCode' => 'NIU',
'quantity' => 300,
'description' => 'Monitor LCD ViewSonic VG2028WM 20',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 620.00,
'igvIncluded' => true,
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.15]
]
],
[
'productCode' => 'MPC35',
'sunatProductCode' => '43202010',
'unitCode' => 'NIU',
'quantity' => 250,
'description' => 'Memoria DDR-3 B1333 Kingston',
'priceType' => '01',
'taxType' => '9997',
'igvAffectationCode' => '20',
'unitValue' => 52.00,
'igvIncluded' => false
'productCode' => 'MPC35',
'sunatProductCode' => '43202010',
'unitCode' => 'NIU',
'quantity' => 250,
'description' => 'Memoria DDR-3 B1333 Kingston',
'priceType' => '01',
'taxType' => '9997',
'igvAffectationCode' => '20',
'unitValue' => 52.00,
'igvIncluded' => false
],
[
'productCode' => 'TMS22',
'sunatProductCode' => '43211706',
'unitCode' => 'NIU',
'quantity' => 500,
'description' => 'Teclado Microsoft SideWinder X6',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 196.00,
'igvIncluded' => true
'productCode' => 'TMS22',
'sunatProductCode' => '43211706',
'unitCode' => 'NIU',
'quantity' => 500,
'description' => 'Teclado Microsoft SideWinder X6',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 196.00,
'igvIncluded' => true
]
]
];
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/boleta_caso1.php
Expand Up @@ -14,7 +14,7 @@
'allowances' => [
[
'reasonCode' => '00', // Código de descuento Cátalogo #53
'multiplierFactor' => 0.05
'multiplierFactor' => 0.05
]
],
'charges' => [],
Expand Down
5 changes: 4 additions & 1 deletion tests/cases/factura_caso1.php
Expand Up @@ -13,7 +13,10 @@
'issueDate' => $dt, // Fecha de emisión [opcional], si no se especifica se usara la fecha del sistema!
'purchaseOrder' => 7852166, // Numero de orden de commpra,
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.05]
[
'reasonCode' => '00', // Código de descuento Cátalogo #53
'multiplierFactor' => 0.05
]
],
'charges' => [],
'items' => [
Expand Down
106 changes: 55 additions & 51 deletions tests/demo.php
Expand Up @@ -38,71 +38,75 @@

// data de la factura
$dataFactura = [
'operationTypeCode' => '0101', // Tipo de operación Catálogo #51.
'voucherSeries' => 1, // Serie de la factura.
'voucherNumber' => 4355, // Número correlativo de la factura.
'customerName' => 'SERVICABINAS S.A.', // Razón social del receptor.
'customerDocNumber' => '20587896411', // RUC del receptor.
'customerDocType' => '6', // Tipo de documento del receptor Catálogo #6.
'date' => $dt, // Opcional, por defecto usará la fecha y hora del sistema.
'purchaseOrder' => 7852166, // Opcional, numero de orden de commpra.
'operationType' => '0101', // Tipo de operación Catálogo #51
'voucherSeries' => 1, // Serie de la factura
'voucherNumber' => 4355, // Número correlativo de la factura
'customerDocType' => '6', // Tipo de documento Catálogo #6
'customerDocNumber' => '20587896411', // RUC
'customerRegName' => 'SERVICABINAS S.A.', // Razón social
'issueDate' => $dt, // Fecha de emisión [opcional], si no se especifica se usara la fecha del sistema!
'purchaseOrder' => 7852166, // Numero de orden de commpra,
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.05]
[
'reasonCode' => '00', // Código de descuento Cátalogo #53
'multiplierFactor' => 0.05
]
],
'charges' => [],
'items' => [
[
'productCode' => 'GLG199', // Código.
'sunatProductCode' => '52161515', // Código de producto SUNAT. Catálogo #25.
'unitCode' => 'NIU', // Código de unidad. Catálogo #3.
'quantity' => 2000, // Cantidad.
'description' => 'Grabadora LG Externo Modelo: GE20LU10', // Descripción.
'priceType' => '01', // Catálogo #16.
'taxType' => '1000', // Catálogo #5.
'igvAffectationCode' => '10', // Catálogo #7.
'unitValue' => 98.00, // Valor unitario.
'igvIncluded' => true, // true si el IGV está incluido en el Valor unitario.
'allowances' => [
'productCode' => 'GLG199', // Código
'sunatProductCode' => '52161515', // Código de producto SUNAT
'unitCode' => 'NIU', // Código de unidad
'quantity' => 2000, // Cantidad
'description' => 'Grabadora LG Externo Modelo: GE20LU10', // Descripción detallada
'priceType' => '01', // Catálogo #16 [01:Precio Unitario|02:Valor Referencial]
'taxType' => '1000', // Catálogo #5
'igvAffectationCode' => '10', // Catálogo #7
'unitValue' => 98.00, // Valor unitario
'igvIncluded' => true, // true si el valor unitario incluye IGV
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.1]
]
],
[
'productCode' => 'MVS546',
'sunatProductCode' => '43211902',
'unitCode' => 'NIU',
'quantity' => 300,
'description' => 'Monitor LCD ViewSonic VG2028WM 20',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 620.00,
'igvIncluded' => true,
'allowances' => [
'productCode' => 'MVS546',
'sunatProductCode' => '43211902',
'unitCode' => 'NIU',
'quantity' => 300,
'description' => 'Monitor LCD ViewSonic VG2028WM 20',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 620.00,
'igvIncluded' => true,
'allowances' => [
['reasonCode' => '00', 'multiplierFactor' => 0.15]
]
],
[
'productCode' => 'MPC35',
'sunatProductCode' => '43202010',
'unitCode' => 'NIU',
'quantity' => 250,
'description' => 'Memoria DDR-3 B1333 Kingston',
'priceType' => '01',
'taxType' => '9997',
'igvAffectationCode' => '20',
'unitValue' => 52.00,
'igvIncluded' => false
'productCode' => 'MPC35',
'sunatProductCode' => '43202010',
'unitCode' => 'NIU',
'quantity' => 250,
'description' => 'Memoria DDR-3 B1333 Kingston',
'priceType' => '01',
'taxType' => '9997',
'igvAffectationCode' => '20',
'unitValue' => 52.00,
'igvIncluded' => false
],
[
'productCode' => 'TMS22',
'sunatProductCode' => '43211706',
'unitCode' => 'NIU',
'quantity' => 500,
'description' => 'Teclado Microsoft SideWinder X6',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 196.00,
'igvIncluded' => true
'productCode' => 'TMS22',
'sunatProductCode' => '43211706',
'unitCode' => 'NIU',
'quantity' => 500,
'description' => 'Teclado Microsoft SideWinder X6',
'priceType' => '01',
'taxType' => '1000',
'igvAffectationCode' => '10',
'unitValue' => 196.00,
'igvIncluded' => true
]
]
];
Expand Down
3 changes: 0 additions & 3 deletions tests/testdox.txt
@@ -1,4 +1 @@
s\FSInputGeneration
[x] Generar boleta
[x] Generar factura

0 comments on commit bc54696

Please sign in to comment.