Skip to content
Merged

2 #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Altel/build/built-jar.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thu, 02 Apr 2015 16:25:06 -0600
#Thu, 09 Apr 2015 14:48:55 -0600


C\:\\Users\\Marlon\\Documents\\NetBeansProjects\\Altel\\Altel=
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$1.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$10.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$2.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$3.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$4.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$5.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$6.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$7.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$8.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga$9.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ConfirmaRecarga.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$1.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$10.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$11.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$12.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$13.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$14.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$15.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$16.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$17.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$18.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$19.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$2.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$20.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$21.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$22.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$23.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$24.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$25.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$26.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$27.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$28.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$29.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$3.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$4.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$5.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$6.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$7.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$8.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home$9.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/home.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ventanaReporte$7.class
Binary file not shown.
Binary file modified Altel/build/classes/altel/ventanaReporte.class
Binary file not shown.
Binary file modified Altel/build/classes/utils/TextPrinter.class
Binary file not shown.
4 changes: 2 additions & 2 deletions Altel/dist/Altel.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'Altel.jnlp',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbS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88L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGpmeDpqYXZhZngtcnVudGltZSB2ZXJzaW9uPSI4LjArIiBocmVmPSJodHRwOi8vamF2YWRsLnN1bi5jb20vd2ViYXBwcy9kb3dubG9hZC9HZXRGaWxlL2phdmFmeC1sYXRlc3Qvd2luZG93cy1pNTg2L2phdmFmeDIuam5scCIvPg0KICA8L3Jlc291cmNlcz4NCiAgPHJlc291cmNlcz4NCiAgICA8ajJzZSB2ZXJzaW9uPSIxLjYrIiBocmVmPSJodHRwOi8vamF2YS5zdW4uY29tL3Byb2R1Y3RzL2F1dG9kbC9qMnNlIi8+DQogICAgPGphciBocmVmPSJBbHRlbC5qYXIiIHNpemU9IjkzMzkyOSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICA8L3Jlc291cmNlcz4NCiAgPGFwcGxpY2F0aW9uLWRlc2MgbWFpbi1jbGFzcz0iYWx0ZWwuTG9naW4iICBuYW1lPSJBbHRlbCIgPg0KICA8L2FwcGxpY2F0aW9uLWRlc2M+DQogIDx1cGRhdGUgY2hlY2s9ImFsd2F5cyIvPg0KPC9qbmxwPg0K'
},
{
javafx : '8.0+'
Expand All @@ -24,7 +24,7 @@
placeholder : 'javafx-app-placeholder',
width : 800,
height : 600,
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iQWx0ZWxfYnJvd3Nlci5qbmxwIj4NCiAgPGluZm9ybWF0aW9uPg0KICAgIDx0aXRsZT5BbHRlbDwvdGl0bGU+DQogICAgPHZlbmRvcj5ybG9ibzwvdmVuZG9yPg0KICAgIDxkZXNjcmlw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CiAgPC9pbmZvcm1hdGlvbj4NCiAgPHJlc291cmNlcz4NCiAgICA8amZ4OmphdmFmeC1ydW50aW1lIHZlcnNpb249IjguMCsiIGhyZWY9Imh0dHA6Ly9qYXZhZGwuc3VuLmNvbS93ZWJhcHBzL2Rvd25sb2FkL0dldEZpbGUvamF2YWZ4LWxhdGVzdC93aW5kb3dzLWk1ODYvamF2YWZ4Mi5qbmxwIi8+DQogIDwvcmVzb3VyY2VzPg0KICA8cmVzb3VyY2VzPg0KICAgIDxqMnNlIHZlcnNpb249IjEuNisiIGhyZWY9Imh0dHA6Ly9qYXZhLnN1bi5jb20vcHJvZHVjdHMvYXV0b2RsL2oyc2UiLz4NCiAgICA8amFyIGhyZWY9IkFsdGVsLmphciIgc2l6ZT0iOTMzOTI5IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogIDwvcmVzb3VyY2VzPg0KICA8YXBwbGV0LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJhbHRlbC5Mb2dpbiIgIG5hbWU9IkFsdGVsIiA+DQogIDwvYXBwbGV0LWRlc2M+DQogIDx1cGRhdGUgY2hlY2s9ImFsd2F5cyIvPg0KPC9qbmxwPg0K'
},
{
javafx : '8.0+'
Expand Down
Binary file modified Altel/dist/Altel.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Altel/dist/Altel.jnlp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</resources>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Altel.jar" size="933575" download="eager" />
<jar href="Altel.jar" size="933929" download="eager" />
</resources>
<application-desc main-class="altel.Login" name="Altel" >
</application-desc>
Expand Down
2 changes: 1 addition & 1 deletion Altel/dist/Altel_browser.jnlp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</resources>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Altel.jar" size="933575" download="eager" />
<jar href="Altel.jar" size="933929" download="eager" />
</resources>
<applet-desc width="800" height="600" main-class="altel.Login" name="Altel" >
</applet-desc>
Expand Down
21 changes: 20 additions & 1 deletion Altel/src/altel/ConfirmaRecarga.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class ConfirmaRecarga extends javax.swing.JFrame {
* Creates new form ConfirmaRecarga
*/
String operador,mont,num,tipo,consecutivoRecibo,zonaSoloCabletica,adicional;

boolean opened=false;
public ConfirmaRecarga(String mont,String num,String operador,String tipo,String consecutivoRecibo,String zonaSoloCabletica,String adicional) {
initComponents();
setLocationRelativeTo(null);
Expand All @@ -48,7 +50,7 @@ public ConfirmaRecarga(String mont,String num,String operador,String tipo,String
ImageIcon img = new ImageIcon(getClass().getResource("/altel/resurces/Movistar_Logo.png"));
setIconImage(img.getImage());
this.operador=operador;
this.mont = (Integer.parseInt(mont)/100)+"";
this.mont = mont;
this.num=num;
lblOperador.setText(operador);
lblMonto.setText(this.mont);
Expand Down Expand Up @@ -81,6 +83,8 @@ public ConfirmaRecarga(String mont,String num,String operador,String tipo,String
jLabel4.setText("Identificador:");
jLabel4.setVisible(true);
lblNum.setVisible(true);
this.mont = (Integer.parseInt(mont)/100)+"";
lblMonto.setText(this.mont);
break;
}
keyListeners();
Expand Down Expand Up @@ -377,15 +381,18 @@ private void recargas() {
}else {
this.setVisible(false);
JOptionPane.showMessageDialog(null, resp+", se ha cancelado la transacción");
opened=false;
}
}else{
this.setVisible(false);
consultaErronea(response.get("39"));
opened=false;
}
} catch (Exception ex) {
Logger.getLogger(ConfirmaRecarga.class.getName()).log(Level.SEVERE, null, ex);
this.setVisible(false);
JOptionPane.showMessageDialog(null,ex.toString(), "Error", JOptionPane.ERROR_MESSAGE );
opened=false;

}

Expand Down Expand Up @@ -486,11 +493,13 @@ private void pines(){
}else {
this.setVisible(false);
JOptionPane.showMessageDialog(null, resp+", se ha cancelado la transaccion");
opened=false;
}

}else{
this.setVisible(false);
consultaErronea(response.get("39"));
opened=false;
}
} catch (Exception ex) {
Logger.getLogger(Recargas.class.getName()).log(Level.SEVERE, null, ex);
Expand All @@ -501,6 +510,8 @@ private void pines(){
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
if(!opened){
opened=true;
String name="";
Boolean pass=false;
if(Boolean.parseBoolean(new auth().leerArchivo("Sesion\\archivoPidePassword.txt"))||Boolean.parseBoolean(new auth().leerArchivo("Sesion/archivoPidePassword.txt"))){
Expand All @@ -524,6 +535,7 @@ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}else{
JOptionPane.showMessageDialog(null,"Compra Cancelada", "Error", JOptionPane.WARNING_MESSAGE );
pass=true;
opened=false;
}
if(name.equals(Static.getPassword()))pass=true;
}
Expand All @@ -547,6 +559,7 @@ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
break;
}
}
}
}//GEN-LAST:event_jButton3ActionPerformed

private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
Expand Down Expand Up @@ -633,20 +646,26 @@ private void servicios() {
}else {
this.setVisible(false);
JOptionPane.showMessageDialog(null, resp+", se ha cancelado la transaccion");
opened=false;
}

}else{
this.setVisible(false);
consultaErronea(response.get("39"));
opened=false;
}
}
else{
this.setVisible(false);
JOptionPane.showMessageDialog(null, "Por favor inserte un monto mayor o igual al cobro");
opened=false;
this.setVisible(true);
}
} catch (Exception ex) {
Logger.getLogger(ConfirmaRecarga.class.getName()).log(Level.SEVERE, null, ex);
this.setVisible(false);
JOptionPane.showMessageDialog(null,"Error de conexión, transacción cancelada. \n Revise su conexión a internet o comuníquese con el proveedor", "Error", JOptionPane.ERROR_MESSAGE );
opened=false;

}
}
Expand Down
3 changes: 2 additions & 1 deletion Altel/src/altel/home.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class home extends javax.swing.JFrame {
ServiciosPublicos servP;
exportaVentas exportar;
int[] files;
ventanaReporte reporte;
static int counter = 0;
static JSONObject json = new JSONObject();
static ArrayList<ComboItem> elements = new ArrayList<>();
Expand All @@ -68,6 +69,7 @@ public home() {
servP=new ServiciosPublicos();
caja=new cierreCaja();
exportar=new exportaVentas();
reporte=new ventanaReporte();
loadNews();
if(ConfirmaRecarga.consultaSaldo()==null){
this.setVisible(false);
Expand Down Expand Up @@ -838,7 +840,6 @@ private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-

private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked
// TODO add your handling code here:
ventanaReporte reporte=new ventanaReporte();
if(tblBitacora.getSelectedRow()>=0){
reporte.printSelected(files[tblBitacora.getSelectedRow()]);
reporte.setVisible(true);
Expand Down
35 changes: 21 additions & 14 deletions Altel/src/altel/ventanaReporte.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,36 +189,43 @@ public void cargaCierreCaja(String texto ){
}
private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseClicked
// TODO add your handling code here:
boolean sigue=false;
try {
boolean sigue=false;
//try {

String ruta = System.getProperty("user.home")+"/Documents/Altel/Files/Sesion/defaultPrinter.txt";
String ruta = System.getProperty("user.home")+"/Documents/Puntos Naranja/Files/Sesion/defaultPrinter.txt";
File archivo = new File(ruta);
if(archivo.exists()){
TextPrinter.test();
sigue=true;
//TextPrinter.test();
//sigue=true;
}
else{
// else{
try {
sigue=new TextPrinter().setPrinter();
} catch (IOException ex) {
Logger.getLogger(ventanaReporte.class.getName()).log(Level.SEVERE, null, ex);
}
}
//}
if(sigue){
TextPrinter print=new TextPrinter();
print.setLineas(areaReporte.getText().split("\n"));
print.startPrinter(selected,cual,caja);
try {
// print.setLineas(areaReporte.getText().split("\n"));
// print.startPrinter(selected,cual,caja);
print.printFactura();
} catch (PrinterException ex) {
Logger.getLogger(ventanaReporte.class.getName()).log(Level.SEVERE, null, ex);
}
this.setVisible(false);
int dialogResult=0;
dialogResult = JOptionPane.showConfirmDialog (null, "Confirme que se realizó la impresión. ¿Desea cerrar la ventana?","Atención",JOptionPane.YES_NO_OPTION);
if(dialogResult == JOptionPane.YES_OPTION){
JOptionPane.showMessageDialog(null, "Transaccion Completa");
}else this.setVisible(true);
}
} catch (PrinterException ex) {

} catch (IOException ex) {
Logger.getLogger(ventanaReporte.class.getName()).log(Level.SEVERE, null, ex);
}
/*} catch (PrinterException ex) {
this.setVisible(false);
JOptionPane.showMessageDialog(null, "Revise la conexión a la impresora");
}
}*/
//new home().setVisible(true);
}//GEN-LAST:event_jButton4MouseClicked

Expand Down
Loading