Skip to content

Commit 5694d20

Browse files
committed
AÑADIDO CODIGO A MATERIAL BILL
1 parent fd82aae commit 5694d20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/electricity_bills_system/MaterialFrame.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,11 @@ public void actionPerformed(ActionEvent e) {
413413
String unit = (String) tableModel.getValueAt(i, 4);
414414
String total_price = (String) tableModel.getValueAt(i, 5);
415415
String date = dateField.getText();
416+
String CODE=ID_2+number;
416417
if(ID_info.length()>1){
417418
ID_2=(String) ID_choice.getSelectedItem();
418419
}
419-
String query = "INSERT INTO material_bill VALUES('" + ID_2 + "', '" + number + "','" + nombre_material2.toLowerCase().trim() + "','" + brand.toLowerCase().trim() + "','" + price_unit + "','" + unit + "','" + ref_material.trim() + "','" + date + "','" + total_price + "','"+NIF+"')";
420+
String query = "INSERT INTO material_bill VALUES('" + ID_2 + "', '" + number + "','" + nombre_material2.toLowerCase().trim() + "','" + brand.toLowerCase().trim() + "','" + price_unit + "','" + unit + "','" + ref_material.trim() + "','" + date + "','" + total_price + "','"+NIF+"','"+CODE+"')";
420421

421422
c.s.executeUpdate(query);
422423
}

0 commit comments

Comments
 (0)