* Tampilan dasar menjadi memiliki navigasi, per nota * Shortcut F7: Cari Nota Tunda, * Checkout Retur dibedakan dari Checkout Tunai * Shortcut CTRL+P: Cetak Ulang Nota * Shortcut F1: Nota Sebelum, F2: Nota Setelah, F3 & F4 Dihilangkan * Perbaikan pada dialog pada umumnya, penambahan kolom nomor tabel dllpull/1/head
| @@ -3,6 +3,7 @@ package id.amigogroup.posterminal; | |||
| public class FormConstanta { | |||
| //daftarkan halaman disini | |||
| public static final String TRANSAKSI = "Transaksi"; | |||
| public static final String TRANSAKSI_TUNAI = "Transaksi Tunai"; | |||
| public static final String TRANSAKSI_RETUR = "Transaksi Retur"; | |||
| public static final String BAYAR = "Bayar"; | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| package id.amigogroup.posterminal; | |||
| import id.amigogroup.posterminal.bayar.FormBayarController; | |||
| import id.amigogroup.posterminal.pos.FormTransaksiController; | |||
| import id.amigogroup.posterminal.transaksi.FormTransaksiTunaiController; | |||
| import java.io.IOException; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| @@ -16,12 +16,12 @@ public class FormFactory { | |||
| try { | |||
| switch (form) { | |||
| //daftarkan halaman yang implement mainContenInterface disini | |||
| case FormConstanta.TRANSAKSI: | |||
| loader.setLocation(getClass().getResource("/fxml/FormTransaksi.fxml")); | |||
| node = loader.load(); | |||
| FormTransaksiController fetc = loader.getController(); | |||
| // fetc.initData(parent); | |||
| break; | |||
| // case FormConstanta.TRANSAKSI_TUNAI: | |||
| // loader.setLocation(getClass().getResource("/fxml/FormTransaksi.fxml")); | |||
| // node = loader.load(); | |||
| // FormTransaksiTunaiController fetc = loader.getController(); | |||
| //// fetc.initData(parent); | |||
| // break; | |||
| case FormConstanta.BAYAR: | |||
| loader.setLocation(getClass().getResource("/fxml/FormBayar.fxml")); | |||
| node = loader.load(); | |||
| @@ -1,29 +1,39 @@ | |||
| package id.amigogroup.posterminal; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariBarangController; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariNotaTundaController; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariPelangganController; | |||
| import id.amigogroup.posterminal.pencarian.DialogCetakUlangNotaController; | |||
| import id.amigogroup.posterminal.transaksi.DialogKonfirmasiReturController; | |||
| import id.amigogroup.posterminal.transaksi.FormTransaksiReturController; | |||
| import id.amigogroup.posterminal.transaksi.FormTransaksiTunaiController; | |||
| import id.amigogroup.posterminal.util.Fucout; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ArrayList; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.Optional; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| import javafx.application.Platform; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Node; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.Scene; | |||
| import javafx.scene.control.Button; | |||
| import javafx.scene.control.ScrollPane; | |||
| import javafx.scene.image.Image; | |||
| import javafx.scene.input.KeyCode; | |||
| import javafx.scene.input.KeyCodeCombination; | |||
| import javafx.scene.input.KeyCombination; | |||
| import javafx.scene.layout.BorderPane; | |||
| import javafx.scene.layout.VBox; | |||
| import javafx.stage.Stage; | |||
| public class FormUtamaController implements Initializable { | |||
| @@ -32,47 +42,238 @@ public class FormUtamaController implements Initializable { | |||
| private BorderPane bpMain; | |||
| @FXML | |||
| private ScrollPane spMainContent; | |||
| @FXML | |||
| private ScrollPane spNavigasi; | |||
| @FXML | |||
| private VBox vbNavigasi; | |||
| @FXML | |||
| private Button btnTunai1Static; | |||
| @FXML | |||
| private Button btnRetur1Static; | |||
| @FXML | |||
| private Button btnTunai2Static; | |||
| private final FormFactory formFactory = new FormFactory(); | |||
| private FormFactory formFactory = new FormFactory(); | |||
| private final List<Button> navigasi = new ArrayList<>(); | |||
| private int notaState = -1; | |||
| private String tipeNotaState = ""; | |||
| private int jumlahNota = 0; | |||
| private final char NOTA_PREV = 'p'; | |||
| private final char NOTA_NEXT = 'n'; | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| setContent(formFactory.getForm(FormConstanta.TRANSAKSI, this)); | |||
| // setContent(formFactory.getForm(FormConstanta.TRANSAKSI_TUNAI, this)); | |||
| initShorcuts(); | |||
| //STATIC FUNCTION, hilangkan jika sudah tidak dipakai | |||
| navigasi.add(btnTunai1Static); | |||
| navigasi.add(btnRetur1Static); | |||
| navigasi.add(btnTunai2Static); | |||
| jumlahNota = 3; | |||
| btnTunai1Static.setOnAction((event) -> { | |||
| setContent(loadNota("", FormConstanta.TRANSAKSI_TUNAI)); | |||
| updateSelectedNota(event); | |||
| tipeNotaState = Fucout.TIPE_NOTA_TUNAI; | |||
| }); | |||
| btnRetur1Static.setOnAction((event) -> { | |||
| setContent(loadNota("", FormConstanta.TRANSAKSI_RETUR)); | |||
| updateSelectedNota(event); | |||
| tipeNotaState = Fucout.TIPE_NOTA_RETUR; | |||
| }); | |||
| btnTunai2Static.setOnAction((event) -> { | |||
| setContent(loadNota("", FormConstanta.TRANSAKSI_TUNAI)); | |||
| updateSelectedNota(event); | |||
| tipeNotaState = Fucout.TIPE_NOTA_TUNAI; | |||
| }); | |||
| } | |||
| private void updateSelectedNota(ActionEvent event) { | |||
| Button buttonSource = (Button) event.getSource(); | |||
| notaState = navigasi.indexOf(buttonSource); | |||
| Fucout.scrollToNode(spNavigasi,buttonSource); | |||
| // if (!tableState.equals(buttonSource.getText().toLowerCase())) { | |||
| // switch (buttonSource.getText().toLowerCase()) { | |||
| // case BTN_TUNAI: | |||
| // //ambil data tunai | |||
| // tableState = BTN_TUNAI; | |||
| // System.out.println("ambil data tunai"); | |||
| // break; | |||
| // case BTN_BAWA_DULU: | |||
| // //ambil data bawa dulu | |||
| // tableState = BTN_BAWA_DULU; | |||
| // System.out.println("ambil data bawa dulu"); | |||
| // break; | |||
| // case BTN_BON: | |||
| // //ambil data bon | |||
| // tableState = BTN_BON; | |||
| // System.out.println("ambil data bon"); | |||
| // break; | |||
| // case BTN_RETUR: | |||
| // //ambil data retur | |||
| // tableState = BTN_RETUR; | |||
| // System.out.println("ambil data retur"); | |||
| // break; | |||
| // } | |||
| // } | |||
| for (Button button : navigasi) { | |||
| if (button.equals(buttonSource)) { | |||
| if (!button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| button.getStyleClass().add("button-navigasi-transaksi-selected"); | |||
| } | |||
| } else { | |||
| if (button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| button.getStyleClass().remove("button-navigasi-transaksi-selected"); | |||
| } | |||
| } | |||
| } | |||
| // fldScan.requestFocus(); | |||
| } | |||
| private Button generateButtonNota(String noNota, String tipeNota, String tipeTeks) { | |||
| Button button = new Button(tipeTeks + ": " + noNota); | |||
| button.getStyleClass().add("button-navigasi-transaksi"); | |||
| button.setMaxWidth(Double.MAX_VALUE); | |||
| button.setOnAction((event) -> { | |||
| setContent(loadNota("", tipeNota)); | |||
| tipeNotaState = tipeNota; | |||
| updateSelectedNota(event); | |||
| }); | |||
| return button; | |||
| } | |||
| private Node loadNota(String noNota, String tipe) { | |||
| Node node = null; | |||
| FXMLLoader loader = new FXMLLoader(); | |||
| try { | |||
| switch (tipe) { | |||
| case FormConstanta.TRANSAKSI_TUNAI: | |||
| loader.setLocation(getClass().getResource("/fxml/FormTransaksiTunai.fxml")); | |||
| node = loader.load(); | |||
| FormTransaksiTunaiController fttc = loader.getController(); | |||
| // fetc.initData(noNota); | |||
| break; | |||
| case FormConstanta.TRANSAKSI_RETUR: | |||
| loader.setLocation(getClass().getResource("/fxml/FormTransaksiRetur.fxml")); | |||
| node = loader.load(); | |||
| FormTransaksiReturController ftrc = loader.getController(); | |||
| // fetc.initData(noNota); | |||
| break; | |||
| } | |||
| } catch (IOException ex) { | |||
| Logger.getLogger(FormUtamaController.class.getName()).log(Level.SEVERE, null, ex); | |||
| } | |||
| return node; | |||
| } | |||
| private void loadNota(char operasi) { | |||
| switch (operasi) { | |||
| case NOTA_PREV: | |||
| if (notaState == -1) { | |||
| notaState = jumlahNota - 1; | |||
| } else { | |||
| notaState--; | |||
| if (notaState < 0) { | |||
| notaState = jumlahNota - 1; | |||
| } | |||
| } | |||
| break; | |||
| case NOTA_NEXT: | |||
| if (notaState == -1) { | |||
| notaState = 0; | |||
| } else { | |||
| notaState++; | |||
| if (notaState >= jumlahNota) { | |||
| notaState = 0; | |||
| } | |||
| } | |||
| break; | |||
| } | |||
| if (notaState >= 0 && notaState < jumlahNota) { | |||
| navigasi.get(notaState).fire(); | |||
| } | |||
| } | |||
| private void initShorcuts() { | |||
| Map<KeyCombination,Runnable> listShortcuts = new HashMap<>(); | |||
| Map<KeyCombination, Runnable> listShortcuts = new HashMap<>(); | |||
| KeyCombination kcPrevNota = new KeyCodeCombination(KeyCode.F1); | |||
| Runnable rnPrevNota = () -> { | |||
| loadNota(NOTA_PREV); | |||
| }; | |||
| listShortcuts.put(kcPrevNota, rnPrevNota); | |||
| KeyCombination kcNextNota = new KeyCodeCombination(KeyCode.F2); | |||
| Runnable rnNextNota = () -> { | |||
| loadNota(NOTA_NEXT); | |||
| }; | |||
| listShortcuts.put(kcNextNota, rnNextNota); | |||
| KeyCombination kcCariBarang = new KeyCodeCombination(KeyCode.F5); | |||
| Runnable rnCariBarang = () -> { | |||
| DialogCariBarangController dialogCariBarang = new DialogCariBarangController(); | |||
| dialogCariBarang.initOwner((Stage) bpMain.getScene().getWindow()); | |||
| Optional<String> result = dialogCariBarang.showAndWait(); | |||
| System.out.println(result); | |||
| }; | |||
| listShortcuts.put(kcCariBarang, rnCariBarang); | |||
| KeyCombination kcCariPelanggan = new KeyCodeCombination(KeyCode.F6); | |||
| Runnable rnCariPelanggan = () -> { | |||
| DialogCariPelangganController dialogCariPelanggan = new DialogCariPelangganController(); | |||
| dialogCariPelanggan.initOwner((Stage) bpMain.getScene().getWindow()); | |||
| Optional<String> result = dialogCariPelanggan.showAndWait(); | |||
| System.out.println(result); | |||
| }; | |||
| listShortcuts.put(kcCariPelanggan, rnCariPelanggan); | |||
| KeyCombination kcCariNotaTunda = new KeyCodeCombination(KeyCode.F7); | |||
| Runnable rnCariNotaTunda = () -> { | |||
| DialogCariNotaTundaController dialogCariNotaTunda = new DialogCariNotaTundaController(); | |||
| dialogCariNotaTunda.initOwner((Stage) bpMain.getScene().getWindow()); | |||
| Optional<String> result = dialogCariNotaTunda.showAndWait(); | |||
| System.out.println(result); | |||
| }; | |||
| listShortcuts.put(kcCariNotaTunda, rnCariNotaTunda); | |||
| KeyCombination kcCariCetakUlangNota = new KeyCodeCombination(KeyCode.P,KeyCombination.CONTROL_DOWN); | |||
| Runnable rnCetakUlangNota = () -> { | |||
| DialogCetakUlangNotaController dialogCetakUlangNota = new DialogCetakUlangNotaController(); | |||
| dialogCetakUlangNota.initOwner((Stage) bpMain.getScene().getWindow()); | |||
| Optional<String> result = dialogCetakUlangNota.showAndWait(); | |||
| System.out.println(result); | |||
| }; | |||
| listShortcuts.put(kcCariCetakUlangNota, rnCetakUlangNota); | |||
| KeyCombination kcCheckout = new KeyCodeCombination(KeyCode.F8); | |||
| Runnable rnCheckout = () -> setContent(formFactory.getForm(FormConstanta.BAYAR, this)); | |||
| Runnable rnCheckout = () -> { | |||
| switch(tipeNotaState){ | |||
| case Fucout.TIPE_NOTA_TUNAI: | |||
| setContent(formFactory.getForm(FormConstanta.BAYAR, this)); | |||
| break; | |||
| case Fucout.TIPE_NOTA_RETUR: | |||
| DialogKonfirmasiReturController dialogKonfirmasiRetur = new DialogKonfirmasiReturController(); | |||
| dialogKonfirmasiRetur.initOwner((Stage) bpMain.getScene().getWindow()); | |||
| dialogKonfirmasiRetur.showAndWait(); | |||
| break; | |||
| } | |||
| }; | |||
| listShortcuts.put(kcCheckout, rnCheckout); | |||
| KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L,KeyCombination.CONTROL_DOWN); | |||
| KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L, KeyCombination.CONTROL_DOWN); | |||
| Runnable rnLogout = () -> { | |||
| try { | |||
| generateNewWindow("/fxml/FormLogin.fxml").show(); | |||
| @@ -83,12 +284,12 @@ public class FormUtamaController implements Initializable { | |||
| } | |||
| }; | |||
| listShortcuts.put(kcLogout, rnLogout); | |||
| Platform.runLater(() -> { | |||
| bpMain.getScene().getAccelerators().putAll(listShortcuts); | |||
| }); | |||
| } | |||
| public void setContent(Node node) { | |||
| try { | |||
| spMainContent.setContent(node); | |||
| @@ -110,4 +311,14 @@ public class FormUtamaController implements Initializable { | |||
| return stage; | |||
| } | |||
| @FXML | |||
| void btnTambahNotaOnAction(ActionEvent event) { | |||
| Button buttonBaru = generateButtonNota("10-0220-0000X", | |||
| FormConstanta.TRANSAKSI_TUNAI, | |||
| Fucout.TIPE_NOTA_TUNAI); | |||
| navigasi.add(buttonBaru); | |||
| vbNavigasi.getChildren().add(buttonBaru); | |||
| jumlahNota++; | |||
| } | |||
| } | |||
| @@ -5,7 +5,6 @@ | |||
| */ | |||
| package id.amigogroup.posterminal.pencarian; | |||
| import id.amigogroup.posterminal.FormUtamaController; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ArrayList; | |||
| @@ -13,6 +12,7 @@ import java.util.List; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| import javafx.beans.property.ReadOnlyObjectWrapper; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.collections.ObservableList; | |||
| import javafx.fxml.FXML; | |||
| @@ -20,7 +20,6 @@ import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.control.Button; | |||
| import javafx.scene.control.ButtonType; | |||
| import javafx.scene.control.Dialog; | |||
| import javafx.scene.control.TableColumn; | |||
| import javafx.scene.control.TableView; | |||
| @@ -41,11 +40,13 @@ public class DialogCariBarangController extends Dialog<String> implements Initia | |||
| @FXML | |||
| private TableView<TabelBarang> tbvBarang; | |||
| @FXML | |||
| private TableColumn<TabelBarang, Integer> tcNo; | |||
| @FXML | |||
| private TableColumn<TabelBarang, String> tcKode; | |||
| @FXML | |||
| private TableColumn<TabelBarang, String> tcNama; | |||
| @FXML | |||
| private TableColumn<TabelBarang, String> tcNo; | |||
| private TableColumn<TabelBarang, String> tcUkur; | |||
| @FXML | |||
| private TableColumn<TabelBarang, String> tcHarga; | |||
| @FXML | |||
| @@ -59,9 +60,13 @@ public class DialogCariBarangController extends Dialog<String> implements Initia | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| tcNo.setCellValueFactory((TableColumn.CellDataFeatures<TabelBarang, Integer> cell) -> { | |||
| return new ReadOnlyObjectWrapper(tbvBarang.getItems().indexOf(cell.getValue()) + 1); | |||
| }); | |||
| tcKode.setCellValueFactory(new PropertyValueFactory<>("kode")); | |||
| tcNama.setCellValueFactory(new PropertyValueFactory<>("nama")); | |||
| tcNo.setCellValueFactory(new PropertyValueFactory<>("nomor")); | |||
| tcUkur.setCellValueFactory(new PropertyValueFactory<>("ukur")); | |||
| tcHarga.setCellValueFactory(new PropertyValueFactory<>("harga")); | |||
| tcBtnTambah.setCellValueFactory(new PropertyValueFactory<>("btnTambah")); | |||
| tbvBarang.setItems(daftarTabelBarang); | |||
| fillTable(new ArrayList<>()); | |||
| @@ -69,6 +74,9 @@ public class DialogCariBarangController extends Dialog<String> implements Initia | |||
| public DialogCariBarangController(/*FormPresensiController parent*/) { | |||
| try { | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCariBarang.fxml")); | |||
| loader.setController(this); | |||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||
| @@ -80,9 +88,6 @@ public class DialogCariBarangController extends Dialog<String> implements Initia | |||
| // setResultConverter(buttonType -> { | |||
| // return str; | |||
| // }); | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| } catch (IOException e) { | |||
| Logger.getLogger(DialogCariBarangController.class | |||
| .getName()).log(Level.SEVERE, null, e); | |||
| @@ -90,11 +95,12 @@ public class DialogCariBarangController extends Dialog<String> implements Initia | |||
| } | |||
| public void fillTable(List<TabelBarang> daftarBarang) { | |||
| //STATIC FUNCTION, hilangkan jika sudah tidak dipakai | |||
| Button btnTambah = new Button("Tambah"); | |||
| btnTambah.setOnAction((event) -> { | |||
| setResult("Barang x"); | |||
| this.close(); | |||
| }); | |||
| daftarTabelBarang.add(new TabelBarang("AACOBA001ABCDXL", "Barang x","79.900", "XL", btnTambah)); | |||
| daftarTabelBarang.add(new TabelBarang("AACOBA001ABCDXL", "Barang x", "XL","79.900", btnTambah)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,55 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.pencarian; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.control.Dialog; | |||
| import javafx.stage.Window; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class DialogCariNotaTundaController extends Dialog<String> implements Initializable { | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| // TODO | |||
| } | |||
| public DialogCariNotaTundaController(/*FormPresensiController parent*/) { | |||
| try { | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCariNotaTunda.fxml")); | |||
| loader.setController(this); | |||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||
| Parent root = loader.load(); | |||
| getDialogPane().setContent(root); | |||
| setTitle("Cari Nota Tunda"); | |||
| // getDialogPane().getButtonTypes().add(ButtonType.CANCEL); | |||
| // setResultConverter(buttonType -> { | |||
| // return str; | |||
| // }); | |||
| } catch (IOException e) { | |||
| Logger.getLogger(DialogCariBarangController.class | |||
| .getName()).log(Level.SEVERE, null, e); | |||
| } | |||
| } | |||
| } | |||
| @@ -62,20 +62,20 @@ public class DialogCariPelangganController extends Dialog<String> implements Ini | |||
| public DialogCariPelangganController(/*FormPresensiController parent*/) { | |||
| try { | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCariPelanggan.fxml")); | |||
| loader.setController(this); | |||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||
| Parent root = loader.load(); | |||
| getDialogPane().setContent(root); | |||
| setTitle("Cari Barang"); | |||
| setTitle("Cari Pelanggan"); | |||
| // getDialogPane().getButtonTypes().add(ButtonType.CANCEL); | |||
| // setResultConverter(buttonType -> { | |||
| // return str; | |||
| // }); | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| } catch (IOException e) { | |||
| Logger.getLogger(DialogCariBarangController.class | |||
| .getName()).log(Level.SEVERE, null, e); | |||
| @@ -0,0 +1,52 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.pencarian; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.control.Dialog; | |||
| import javafx.stage.Window; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class DialogCetakUlangNotaController extends Dialog<String> implements Initializable { | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| // TODO | |||
| } | |||
| public DialogCetakUlangNotaController() { | |||
| try { | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCetakUlangNota.fxml")); | |||
| loader.setController(this); | |||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||
| Parent root = loader.load(); | |||
| getDialogPane().setContent(root); | |||
| setTitle("Cetak Ulang Nota"); | |||
| } catch (IOException e) { | |||
| Logger.getLogger(DialogCetakUlangNotaController.class | |||
| .getName()).log(Level.SEVERE, null, e); | |||
| } | |||
| } | |||
| } | |||
| @@ -16,14 +16,14 @@ import javafx.scene.control.Button; | |||
| public class TabelBarang { | |||
| private final SimpleStringProperty kode; | |||
| private final SimpleStringProperty nama; | |||
| private final SimpleStringProperty nomor; | |||
| private final SimpleStringProperty ukur; | |||
| private final SimpleStringProperty harga; | |||
| private final SimpleObjectProperty<Button> btnTambah; | |||
| public TabelBarang(String kode, String nama, String nomor,String harga,Button btnTambah) { | |||
| public TabelBarang(String kode, String nama, String ukur,String harga,Button btnTambah) { | |||
| this.kode = new SimpleStringProperty(kode); | |||
| this.nama = new SimpleStringProperty(nama); | |||
| this.nomor = new SimpleStringProperty(nomor); | |||
| this.ukur = new SimpleStringProperty(ukur); | |||
| this.harga = new SimpleStringProperty(harga); | |||
| this.btnTambah = new SimpleObjectProperty<>(btnTambah); | |||
| } | |||
| @@ -57,17 +57,17 @@ public class TabelBarang { | |||
| } | |||
| /** | |||
| * @return the nomor | |||
| * @return the ukur | |||
| */ | |||
| public String getNomor() { | |||
| return nomor.get(); | |||
| public String getUkur() { | |||
| return ukur.get(); | |||
| } | |||
| /** | |||
| * @param nomor the nomor to set | |||
| * @param ukur the ukur to set | |||
| */ | |||
| public void setNomor(String nomor) { | |||
| this.nomor.set(nomor); | |||
| public void setUkur(String ukur) { | |||
| this.ukur.set(ukur); | |||
| } | |||
| /** | |||
| @@ -1,141 +0,0 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.pos; | |||
| import java.net.URL; | |||
| import java.util.ArrayList; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.ResourceBundle; | |||
| import javafx.application.Platform; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.control.Button; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.input.KeyCode; | |||
| import javafx.scene.input.KeyCodeCombination; | |||
| import javafx.scene.input.KeyCombination; | |||
| import javafx.scene.input.KeyEvent; | |||
| import javafx.scene.text.Text; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class FormTransaksiController implements Initializable { | |||
| @FXML | |||
| private TextField fldScan; | |||
| @FXML | |||
| private Button btnTunai; | |||
| @FXML | |||
| private Button btnBawaDulu; | |||
| @FXML | |||
| private Button btnBon; | |||
| @FXML | |||
| private Button btnRetur; | |||
| @FXML | |||
| private Text lblGrandTotal; | |||
| private final String BTN_TUNAI = "tunai"; | |||
| private final String BTN_BAWA_DULU = "bawa dulu"; | |||
| private final String BTN_BON = "bon"; | |||
| private final String BTN_RETUR = "retur"; | |||
| private String tableState = BTN_TUNAI; | |||
| private List<Button> navigasi = new ArrayList<>(); | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| navigasi.add(btnTunai); | |||
| navigasi.add(btnBawaDulu); | |||
| navigasi.add(btnBon); | |||
| navigasi.add(btnRetur); | |||
| initShortcuts(); | |||
| } | |||
| private void initShortcuts() { | |||
| Map<KeyCombination, Runnable> listShortcuts = new HashMap<>(); | |||
| KeyCombination kcBtnTunai = new KeyCodeCombination(KeyCode.F1); | |||
| Runnable rnBtnTunai = () -> btnTunai.fire(); | |||
| listShortcuts.put(kcBtnTunai, rnBtnTunai); | |||
| KeyCombination kcBtnBawa = new KeyCodeCombination(KeyCode.F2); | |||
| Runnable rnBtnBawa = () -> btnBawaDulu.fire(); | |||
| listShortcuts.put(kcBtnBawa, rnBtnBawa); | |||
| KeyCombination kcBon = new KeyCodeCombination(KeyCode.F3); | |||
| Runnable rnBon = () -> btnBon.fire(); | |||
| listShortcuts.put(kcBon, rnBon); | |||
| KeyCombination kcRetur = new KeyCodeCombination(KeyCode.F4); | |||
| Runnable rnRetur = () -> btnRetur.fire(); | |||
| listShortcuts.put(kcRetur, rnRetur); | |||
| Platform.runLater(() -> { | |||
| fldScan.getScene().getAccelerators().putAll(listShortcuts); | |||
| }); | |||
| } | |||
| @FXML | |||
| void btnNavigasiOnAction(ActionEvent event) { | |||
| Button buttonSource = (Button) event.getSource(); | |||
| if (!tableState.equals(buttonSource.getText().toLowerCase())) { | |||
| switch (buttonSource.getText().toLowerCase()) { | |||
| case BTN_TUNAI: | |||
| //ambil data tunai | |||
| tableState = BTN_TUNAI; | |||
| System.out.println("ambil data tunai"); | |||
| break; | |||
| case BTN_BAWA_DULU: | |||
| //ambil data bawa dulu | |||
| tableState = BTN_BAWA_DULU; | |||
| System.out.println("ambil data bawa dulu"); | |||
| break; | |||
| case BTN_BON: | |||
| //ambil data bon | |||
| tableState = BTN_BON; | |||
| System.out.println("ambil data bon"); | |||
| break; | |||
| case BTN_RETUR: | |||
| //ambil data retur | |||
| tableState = BTN_RETUR; | |||
| System.out.println("ambil data retur"); | |||
| break; | |||
| } | |||
| } | |||
| for (Button button : navigasi) { | |||
| if (button.equals(buttonSource)) { | |||
| if (!button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| button.getStyleClass().add("button-navigasi-transaksi-selected"); | |||
| } | |||
| } else { | |||
| if (button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| button.getStyleClass().remove("button-navigasi-transaksi-selected"); | |||
| } | |||
| } | |||
| } | |||
| fldScan.requestFocus(); | |||
| } | |||
| @FXML | |||
| void fldScanOnKeyPressed(KeyEvent event) { | |||
| if (event.getCode() == KeyCode.ENTER) { | |||
| //proses scan | |||
| System.out.println("Scan"); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,50 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.transaksi; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| import java.util.logging.Logger; | |||
| import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.control.Dialog; | |||
| import javafx.stage.Window; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class DialogKonfirmasiReturController extends Dialog<String> implements Initializable { | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| } | |||
| public DialogKonfirmasiReturController() { | |||
| try { | |||
| Window window = getDialogPane().getScene().getWindow(); | |||
| window.setOnCloseRequest(event -> this.close()); | |||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogKonfirmasiRetur.fxml")); | |||
| loader.setController(this); | |||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||
| Parent root = loader.load(); | |||
| getDialogPane().setContent(root); | |||
| setTitle("Konfirmasi Retur"); | |||
| } catch (IOException ex) { | |||
| Logger.getLogger(DialogKonfirmasiReturController.class.getName()).log(Level.SEVERE, null, ex); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.transaksi; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import javafx.fxml.Initializable; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class FormTransaksiReturController implements Initializable { | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| // TODO | |||
| } | |||
| } | |||
| @@ -0,0 +1,127 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.transaksi; | |||
| import java.net.URL; | |||
| import java.util.ArrayList; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.ResourceBundle; | |||
| import javafx.application.Platform; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.control.Button; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.input.KeyCode; | |||
| import javafx.scene.input.KeyCodeCombination; | |||
| import javafx.scene.input.KeyCombination; | |||
| import javafx.scene.input.KeyEvent; | |||
| import javafx.scene.text.Text; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class FormTransaksiTunaiController implements Initializable { | |||
| @FXML | |||
| private TextField fldScan; | |||
| @FXML | |||
| private Text lblGrandTotal; | |||
| private final String BTN_TUNAI = "tunai"; | |||
| private final String BTN_BAWA_DULU = "bawa dulu"; | |||
| private final String BTN_BON = "bon"; | |||
| private final String BTN_RETUR = "retur"; | |||
| // private String tableState = BTN_TUNAI; | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| initShortcuts(); | |||
| } | |||
| private void initShortcuts() { | |||
| // Map<KeyCombination, Runnable> listShortcuts = new HashMap<>(); | |||
| // | |||
| // KeyCombination kcBtnTunai = new KeyCodeCombination(KeyCode.F1); | |||
| // Runnable rnBtnTunai = () -> btnTunai.fire(); | |||
| // listShortcuts.put(kcBtnTunai, rnBtnTunai); | |||
| // | |||
| // KeyCombination kcBtnBawa = new KeyCodeCombination(KeyCode.F2); | |||
| // Runnable rnBtnBawa = () -> btnBawaDulu.fire(); | |||
| // listShortcuts.put(kcBtnBawa, rnBtnBawa); | |||
| // | |||
| // KeyCombination kcBon = new KeyCodeCombination(KeyCode.F3); | |||
| // Runnable rnBon = () -> btnBon.fire(); | |||
| // listShortcuts.put(kcBon, rnBon); | |||
| // | |||
| // KeyCombination kcRetur = new KeyCodeCombination(KeyCode.F4); | |||
| // Runnable rnRetur = () -> btnRetur.fire(); | |||
| // listShortcuts.put(kcRetur, rnRetur); | |||
| // | |||
| // Platform.runLater(() -> { | |||
| // fldScan.getScene().getAccelerators().putAll(listShortcuts); | |||
| // }); | |||
| } | |||
| @FXML | |||
| void btnNavigasiOnAction(ActionEvent event) { | |||
| // Button buttonSource = (Button) event.getSource(); | |||
| // if (!tableState.equals(buttonSource.getText().toLowerCase())) { | |||
| // switch (buttonSource.getText().toLowerCase()) { | |||
| // case BTN_TUNAI: | |||
| // //ambil data tunai | |||
| // tableState = BTN_TUNAI; | |||
| // System.out.println("ambil data tunai"); | |||
| // break; | |||
| // case BTN_BAWA_DULU: | |||
| // //ambil data bawa dulu | |||
| // tableState = BTN_BAWA_DULU; | |||
| // System.out.println("ambil data bawa dulu"); | |||
| // break; | |||
| // case BTN_BON: | |||
| // //ambil data bon | |||
| // tableState = BTN_BON; | |||
| // System.out.println("ambil data bon"); | |||
| // break; | |||
| // case BTN_RETUR: | |||
| // //ambil data retur | |||
| // tableState = BTN_RETUR; | |||
| // System.out.println("ambil data retur"); | |||
| // break; | |||
| // } | |||
| // } | |||
| // | |||
| // for (Button button : navigasi) { | |||
| // if (button.equals(buttonSource)) { | |||
| // if (!button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| // button.getStyleClass().add("button-navigasi-transaksi-selected"); | |||
| // } | |||
| // } else { | |||
| // if (button.getStyleClass().contains("button-navigasi-transaksi-selected")) { | |||
| // button.getStyleClass().remove("button-navigasi-transaksi-selected"); | |||
| // } | |||
| // } | |||
| // } | |||
| // | |||
| // fldScan.requestFocus(); | |||
| } | |||
| @FXML | |||
| void fldScanOnKeyPressed(KeyEvent event) { | |||
| if (event.getCode() == KeyCode.ENTER) { | |||
| //proses scan | |||
| System.out.println("Scan"); | |||
| } | |||
| } | |||
| } | |||
| @@ -7,6 +7,8 @@ package id.amigogroup.posterminal.util; | |||
| import javafx.beans.value.ChangeListener; | |||
| import javafx.beans.value.ObservableValue; | |||
| import javafx.scene.Node; | |||
| import javafx.scene.control.ScrollPane; | |||
| import javafx.scene.control.TextField; | |||
| /** | |||
| @@ -18,10 +20,22 @@ public class Fucout { | |||
| //STRINGS | |||
| public static final String APP_TITLE = "Pos Terminal Amigo"; | |||
| public static final String TIPE_NOTA_TUNAI = "Tunai"; | |||
| public static final String TIPE_NOTA_BON = "Bon"; | |||
| public static final String TIPE_NOTA_BAWA_DULU = "Bawa"; | |||
| public static final String TIPE_NOTA_RETUR = "Retur"; | |||
| //IMAGES URL | |||
| public static final String APP_ICON = "/assets/logo-mini-squared.png"; | |||
| //FUNCTIONS | |||
| public static void scrollToNode(ScrollPane scrollPane, Node node){ | |||
| double h = scrollPane.getContent().getBoundsInLocal().getHeight(); | |||
| double y = (node.getBoundsInParent().getMaxY() + | |||
| node.getBoundsInParent().getMinY()) / 2.0; | |||
| double v = scrollPane.getViewportBounds().getHeight(); | |||
| scrollPane.setVvalue(scrollPane.getVmax() * ((y - 0.5 * v) / (h - v))); | |||
| } | |||
| public static final void forceFieldToInteger(TextField field){ | |||
| forceFieldInteger(field,0); | |||
| @@ -18,9 +18,10 @@ | |||
| <Label layoutX="14.0" layoutY="39.0" text="Nama Barang" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||
| <TableView fx:id="tbvBarang" layoutX="14.0" layoutY="91.0" AnchorPane.bottomAnchor="-5.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="81.0"> | |||
| <columns> | |||
| <TableColumn fx:id="tcNo" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode" /> | |||
| <TableColumn fx:id="tcNama" prefWidth="75.0" text="Nama" /> | |||
| <TableColumn fx:id="tcNo" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn fx:id="tcUkur" maxWidth="35.0" minWidth="35.0" prefWidth="35.0" resizable="false" text="Ukur" /> | |||
| <TableColumn fx:id="tcHarga" prefWidth="75.0" text="Harga" /> | |||
| <TableColumn fx:id="tcBtnTambah" maxWidth="80.0" minWidth="80.0" resizable="false" text="Tambah" /> | |||
| </columns> | |||
| @@ -0,0 +1,47 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.scene.control.ComboBox?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.TableColumn?> | |||
| <?import javafx.scene.control.TableView?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.text.Font?> | |||
| <AnchorPane id="AnchorPane" prefHeight="450.0" prefWidth="700.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | |||
| <children> | |||
| <Label layoutX="14.0" layoutY="14.0" text="Cari Nota Tunda" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="4.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <ComboBox layoutX="4.0" layoutY="46.0" prefWidth="281.0" promptText="Nomor Nota" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="46.0" /> | |||
| <Label layoutY="29.0" text="Nomor Nota Tunda" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||
| <Label layoutX="14.0" layoutY="76.0" text="Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="76.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <Label layoutX="75.0" layoutY="76.0" text=": -" AnchorPane.leftAnchor="75.0" AnchorPane.topAnchor="76.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <TableView layoutX="8.0" layoutY="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.0"> | |||
| <columns> | |||
| <TableColumn editable="false" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" sortable="false" text="No" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Kode Barang" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Nama Barang" /> | |||
| <TableColumn editable="false" maxWidth="35.0" minWidth="35.0" prefWidth="35.0" resizable="false" text="Ukur" /> | |||
| <TableColumn editable="false" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="Jml" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Harga" /> | |||
| <TableColumn editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc I" /> | |||
| <TableColumn editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc II" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Sub Total" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Pramuniaga" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -18,6 +18,7 @@ | |||
| <Label layoutX="14.0" layoutY="39.0" text="Nama Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||
| <TableView fx:id="tbvPelanggan" layoutX="14.0" layoutY="91.0" AnchorPane.bottomAnchor="-5.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="81.0"> | |||
| <columns> | |||
| <TableColumn fx:id="tcNo" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode" /> | |||
| <TableColumn fx:id="tcNama" prefWidth="75.0" text="Nama" /> | |||
| <TableColumn fx:id="tcAlamat" text="Alamat" /> | |||
| @@ -0,0 +1,65 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.TableColumn?> | |||
| <?import javafx.scene.control.TableView?> | |||
| <?import javafx.scene.control.TextField?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.layout.StackPane?> | |||
| <?import javafx.scene.text.Font?> | |||
| <?import javafx.scene.text.Text?> | |||
| <AnchorPane id="AnchorPane" prefHeight="450.0" prefWidth="700.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | |||
| <children> | |||
| <Label layoutX="14.0" layoutY="14.0" text="Cetak Ulang Nota" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="4.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <Label layoutY="29.0" text="Nomor Nota" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||
| <Label layoutX="14.0" layoutY="76.0" text="Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="76.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <Label layoutX="75.0" layoutY="76.0" text=": -" AnchorPane.leftAnchor="75.0" AnchorPane.topAnchor="76.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <TableView layoutX="8.0" layoutY="100.0" AnchorPane.bottomAnchor="55.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.0"> | |||
| <columns> | |||
| <TableColumn editable="false" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" sortable="false" text="No" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Kode Barang" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Nama Barang" /> | |||
| <TableColumn editable="false" maxWidth="35.0" minWidth="35.0" prefWidth="35.0" resizable="false" text="Ukur" /> | |||
| <TableColumn editable="false" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="Jml" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Harga" /> | |||
| <TableColumn editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc I" /> | |||
| <TableColumn editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc II" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Sub Total" /> | |||
| <TableColumn editable="false" prefWidth="75.0" text="Pramuniaga" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| <StackPane id="price-background" alignment="CENTER_RIGHT" layoutX="10.0" layoutY="380.0" maxHeight="1.7976931348623157E308" prefHeight="55.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> | |||
| <children> | |||
| <Text fx:id="lblGrandTotal" fill="#fbff00" strokeType="OUTSIDE" strokeWidth="0.0" text="Rp99.999.999,00"> | |||
| <font> | |||
| <Font name="System Bold" size="36.0" /> | |||
| </font> | |||
| <StackPane.margin> | |||
| <Insets right="14.0" /> | |||
| </StackPane.margin> | |||
| </Text> | |||
| </children> | |||
| <opaqueInsets> | |||
| <Insets /> | |||
| </opaqueInsets> | |||
| </StackPane> | |||
| <TextField layoutX="7.0" layoutY="46.0" promptText="Nomor Nota" AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="400.0" AnchorPane.topAnchor="46.0" /> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -0,0 +1,77 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.TableColumn?> | |||
| <?import javafx.scene.control.TableView?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.layout.ColumnConstraints?> | |||
| <?import javafx.scene.layout.GridPane?> | |||
| <?import javafx.scene.layout.RowConstraints?> | |||
| <?import javafx.scene.text.Font?> | |||
| <AnchorPane id="AnchorPane" fx:id="apContent" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | |||
| <children> | |||
| <Label layoutX="24.0" layoutY="24.0" text="Konfirmasi Retur" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="4.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <TableView fx:id="tbvBarang" layoutX="14.0" layoutY="98.0" prefHeight="357.0" prefWidth="500.0" AnchorPane.bottomAnchor="-5.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="98.0"> | |||
| <columns> | |||
| <TableColumn maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode" /> | |||
| <TableColumn fx:id="tcNama" prefWidth="75.0" text="Nama" /> | |||
| <TableColumn fx:id="tcUkur" maxWidth="35.0" minWidth="35.0" prefWidth="35.0" resizable="false" text="Ukur" /> | |||
| <TableColumn fx:id="tcHarga" prefWidth="75.0" text="Harga" /> | |||
| <TableColumn fx:id="tcBtnTambah" maxWidth="80.0" minWidth="80.0" resizable="false" text="Tambah" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| <GridPane layoutX="4.0" layoutY="29.0" AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="29.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="130.0" /> | |||
| <ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="10.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Nomor Nota Penjualan"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label text="Pelanggan" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label text="Nomor Nota Retur" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| </children> | |||
| </GridPane> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -0,0 +1,114 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.SplitPane?> | |||
| <?import javafx.scene.control.TableColumn?> | |||
| <?import javafx.scene.control.TableView?> | |||
| <?import javafx.scene.control.TextField?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.layout.ColumnConstraints?> | |||
| <?import javafx.scene.layout.GridPane?> | |||
| <?import javafx.scene.layout.HBox?> | |||
| <?import javafx.scene.layout.RowConstraints?> | |||
| <?import javafx.scene.text.Font?> | |||
| <AnchorPane id="AnchorPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="800.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.transaksi.FormTransaksiReturController"> | |||
| <children> | |||
| <Label text="Transaksi Retur" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <HBox alignment="CENTER" layoutX="14.0" layoutY="144.0" prefHeight="80.0" prefWidth="80.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="144.0" /> | |||
| <SplitPane dividerPositions="0.5" layoutY="45.0" orientation="VERTICAL" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="39.0"> | |||
| <items> | |||
| <AnchorPane> | |||
| <children> | |||
| <TableView AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="65.0"> | |||
| <columns> | |||
| <TableColumn maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn prefWidth="75.0" text="Kode Barang" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| <Label layoutX="14.0" layoutY="6.0" text="Histori Penjualan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="0.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <Label layoutX="14.0" layoutY="20.0" text="Nomor Nota Penjualan" /> | |||
| <TextField layoutX="14.0" layoutY="37.0" prefHeight="25.0" prefWidth="329.0" promptText="Nomor Nota Penjualan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="37.0" /> | |||
| </children> | |||
| </AnchorPane> | |||
| <AnchorPane> | |||
| <children> | |||
| <TableView prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="50.0"> | |||
| <columns> | |||
| <TableColumn maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn prefWidth="75.0" text="Kode Barang" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| <Label layoutX="14.0" text="Retur Penjualan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="0.0"> | |||
| <font> | |||
| <Font size="14.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="20.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="20.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.3333" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.3333" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.3333" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="5.0"> | |||
| <children> | |||
| <Label text="Nomor Nota" /> | |||
| <Label text=": -"> | |||
| <HBox.margin> | |||
| <Insets /> | |||
| </HBox.margin> | |||
| </Label> | |||
| </children> | |||
| <GridPane.margin> | |||
| <Insets top="5.0" /> | |||
| </GridPane.margin> | |||
| </HBox> | |||
| <HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="5.0" GridPane.columnIndex="1"> | |||
| <children> | |||
| <Label text="Tanggal" /> | |||
| <Label text=": -"> | |||
| <HBox.margin> | |||
| <Insets /> | |||
| </HBox.margin> | |||
| </Label> | |||
| </children> | |||
| <GridPane.margin> | |||
| <Insets top="5.0" /> | |||
| </GridPane.margin> | |||
| </HBox> | |||
| <HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="5.0" GridPane.columnIndex="2"> | |||
| <children> | |||
| <Label text="Kasir" /> | |||
| <Label text=": -" /> | |||
| </children> | |||
| <GridPane.margin> | |||
| <Insets top="5.0" /> | |||
| </GridPane.margin> | |||
| </HBox> | |||
| </children> | |||
| </GridPane> | |||
| </children> | |||
| </AnchorPane> | |||
| </items> | |||
| </SplitPane> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -1,8 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import java.lang.String?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Button?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.Separator?> | |||
| <?import javafx.scene.control.TableColumn?> | |||
| @@ -19,11 +17,16 @@ | |||
| <?import javafx.scene.text.Font?> | |||
| <?import javafx.scene.text.Text?> | |||
| <AnchorPane id="AnchorPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="800.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.pos.FormTransaksiController"> | |||
| <AnchorPane id="AnchorPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="800.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.transaksi.FormTransaksiTunaiController"> | |||
| <children> | |||
| <Label layoutX="14.0" layoutY="6.0" text="Scan Kode Tas/Kode Barang" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0" /> | |||
| <TextField fx:id="fldScan" layoutX="14.0" layoutY="32.0" onKeyPressed="#fldScanOnKeyPressed" prefHeight="25.0" prefWidth="622.0" promptText="Masukkan kode tas dan kode barang ATAU scan kode tas dan kode barang" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="164.0" AnchorPane.topAnchor="32.0" /> | |||
| <GridPane layoutX="14.0" layoutY="57.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="57.0"> | |||
| <Label text="Transaksi Tunai" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <Label layoutX="14.0" layoutY="39.0" text="Scan Kode Tas/Kode Barang" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="39.0" /> | |||
| <TextField fx:id="fldScan" layoutX="14.0" layoutY="57.0" onKeyPressed="#fldScanOnKeyPressed" prefHeight="25.0" prefWidth="622.0" promptText="Masukkan kode tas dan kode barang ATAU scan kode tas dan kode barang" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="164.0" AnchorPane.topAnchor="57.0" /> | |||
| <GridPane layoutX="14.0" layoutY="82.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="82.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.3333" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.3333" /> | |||
| @@ -92,13 +95,13 @@ | |||
| </HBox> | |||
| </children> | |||
| </GridPane> | |||
| <Separator layoutY="88.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="88.0" /> | |||
| <Label layoutX="14.0" layoutY="94.0" text="Pelanggan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="94.0"> | |||
| <Separator layoutY="113.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="113.0" /> | |||
| <Label layoutX="14.0" layoutY="119.0" text="Pelanggan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="119.0"> | |||
| <font> | |||
| <Font name="System Bold" size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <HBox alignment="CENTER" layoutX="14.0" layoutY="119.0" prefHeight="80.0" prefWidth="80.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="119.0"> | |||
| <HBox alignment="CENTER" layoutX="14.0" layoutY="144.0" prefHeight="80.0" prefWidth="80.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="144.0"> | |||
| <children> | |||
| <ImageView fitHeight="80.0" fitWidth="80.0" pickOnBounds="true" preserveRatio="true"> | |||
| <image> | |||
| @@ -107,7 +110,7 @@ | |||
| </ImageView> | |||
| </children> | |||
| </HBox> | |||
| <GridPane layoutX="94.0" layoutY="119.0" prefHeight="80.0" AnchorPane.leftAnchor="94.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="119.0"> | |||
| <GridPane layoutX="94.0" layoutY="144.0" prefHeight="80.0" AnchorPane.leftAnchor="94.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="144.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="NEVER" prefWidth="120.0" /> | |||
| <ColumnConstraints hgrow="ALWAYS" maxWidth="250.0" /> | |||
| @@ -186,7 +189,7 @@ | |||
| </Label> | |||
| </children> | |||
| </GridPane> | |||
| <TableView layoutY="199.0" prefHeight="265.0" prefWidth="800.0" tableMenuButtonVisible="true" AnchorPane.bottomAnchor="55.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="199.0"> | |||
| <TableView layoutY="224.0" prefHeight="170.0" prefWidth="800.0" tableMenuButtonVisible="true" AnchorPane.bottomAnchor="55.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="224.0"> | |||
| <columns> | |||
| <TableColumn maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||
| <TableColumn prefWidth="75.0" text="Kode Barang" /> | |||
| @@ -195,75 +198,20 @@ | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| </columnResizePolicy> | |||
| </TableView> | |||
| <GridPane layoutY="406.0" prefHeight="55.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="10.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="10.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="10.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="10.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="350.0" percentWidth="60.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints /> | |||
| <RowConstraints /> | |||
| </rowConstraints> | |||
| <StackPane id="price-background" alignment="CENTER_RIGHT" layoutY="370.0" maxHeight="1.7976931348623157E308" prefHeight="55.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> | |||
| <children> | |||
| <Button fx:id="btnTunai" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnNavigasiOnAction" text="TUNAI" textAlignment="CENTER" wrapText="true"> | |||
| <GridPane.margin> | |||
| <Insets bottom="5.0" left="5.0" right="1.0" /> | |||
| </GridPane.margin> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||
| <styleClass> | |||
| <String fx:value="button-navigasi-transaksi-selected" /> | |||
| <String fx:value="button-navigasi-transaksi" /> | |||
| </styleClass> | |||
| </Button> | |||
| <Button fx:id="btnBawaDulu" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnNavigasiOnAction" styleClass="button-navigasi-transaksi" text="BAWA DULU" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="5.0" left="1.0" right="1.0" /> | |||
| </GridPane.margin> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||
| </Button> | |||
| <Button fx:id="btnBon" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnNavigasiOnAction" styleClass="button-navigasi-transaksi" text="BON" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="5.0" left="1.0" right="1.0" /> | |||
| </GridPane.margin> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||
| </Button> | |||
| <Button fx:id="btnRetur" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnNavigasiOnAction" styleClass="button-navigasi-transaksi" text="RETUR" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3"> | |||
| <GridPane.margin> | |||
| <Insets bottom="5.0" left="1.0" right="5.0" /> | |||
| </GridPane.margin> | |||
| <Text fx:id="lblGrandTotal" fill="#fbff00" strokeType="OUTSIDE" strokeWidth="0.0" text="Rp99.999.999,00"> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| <Font name="System Bold" size="36.0" /> | |||
| </font> | |||
| </Button> | |||
| <StackPane id="price-background" alignment="CENTER_RIGHT" maxHeight="1.7976931348623157E308" GridPane.columnIndex="4" GridPane.halignment="CENTER" GridPane.rowSpan="3"> | |||
| <GridPane.margin> | |||
| <Insets /> | |||
| </GridPane.margin> | |||
| <children> | |||
| <Text fx:id="lblGrandTotal" fill="#fbff00" strokeType="OUTSIDE" strokeWidth="0.0" text="Rp99.999.999,00"> | |||
| <font> | |||
| <Font name="System Bold" size="36.0" /> | |||
| </font> | |||
| <StackPane.margin> | |||
| <Insets right="14.0" /> | |||
| </StackPane.margin> | |||
| </Text> | |||
| </children> | |||
| <opaqueInsets> | |||
| <Insets /> | |||
| </opaqueInsets> | |||
| </StackPane> | |||
| <StackPane.margin> | |||
| <Insets right="14.0" /> | |||
| </StackPane.margin> | |||
| </Text> | |||
| </children> | |||
| </GridPane> | |||
| <opaqueInsets> | |||
| <Insets /> | |||
| </opaqueInsets> | |||
| </StackPane> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -1,9 +1,11 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Button?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.ScrollPane?> | |||
| <?import javafx.scene.control.Separator?> | |||
| <?import javafx.scene.control.SplitPane?> | |||
| <?import javafx.scene.image.Image?> | |||
| <?import javafx.scene.image.ImageView?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| @@ -16,7 +18,7 @@ | |||
| <?import javafx.scene.layout.VBox?> | |||
| <?import javafx.scene.text.Font?> | |||
| <BorderPane fx:id="bpMain" prefHeight="550.0" prefWidth="1000.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.FormUtamaController"> | |||
| <BorderPane fx:id="bpMain" prefHeight="600.0" prefWidth="1000.0" stylesheets="@../styles/pos_styles.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.FormUtamaController"> | |||
| <top> | |||
| <AnchorPane id="header" prefHeight="100.0" prefWidth="750.0"> | |||
| <children> | |||
| @@ -45,7 +47,7 @@ | |||
| </rowConstraints> | |||
| <children> | |||
| <StackPane id="shortcut-background" prefHeight="150.0" prefWidth="200.0" GridPane.columnSpan="5" GridPane.rowSpan="4" /> | |||
| <Label maxWidth="1.7976931348623157E308" text="F1: TUNAI"> | |||
| <Label maxWidth="1.7976931348623157E308" text="F1: NOTA SEBELUM"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="5.0" top="5.0" /> | |||
| </GridPane.margin> | |||
| @@ -65,7 +67,7 @@ | |||
| <Insets bottom="5.0" left="5.0" right="5.0" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text="F2: BAWA DULU" GridPane.columnIndex="1"> | |||
| <Label maxWidth="1.7976931348623157E308" text="F2: NOTA SETELAH" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="5.0" top="5.0" /> | |||
| </GridPane.margin> | |||
| @@ -85,7 +87,7 @@ | |||
| <Insets bottom="5.0" left="5.0" right="5.0" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text="F3: BON" GridPane.columnIndex="2"> | |||
| <Label maxWidth="1.7976931348623157E308" text="F3: ?" GridPane.columnIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="5.0" top="5.0" /> | |||
| </GridPane.margin> | |||
| @@ -105,7 +107,7 @@ | |||
| <Insets bottom="5.0" left="5.0" right="5.0" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text="F4: RETUR" GridPane.columnIndex="3"> | |||
| <Label maxWidth="1.7976931348623157E308" text="F4: ?" GridPane.columnIndex="3"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="5.0" top="5.0" /> | |||
| </GridPane.margin> | |||
| @@ -201,4 +203,90 @@ | |||
| </children> | |||
| </GridPane> | |||
| </bottom> | |||
| <left> | |||
| <SplitPane dividerPositions="0.6" orientation="VERTICAL" prefWidth="200.0"> | |||
| <items> | |||
| <ScrollPane fx:id="spNavigasi" fitToHeight="true" fitToWidth="true"> | |||
| <content> | |||
| <VBox fx:id="vbNavigasi" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" spacing="5.0" style="-fx-border-style: none;"> | |||
| <children> | |||
| <Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnTambahNotaOnAction" text="Tambah"> | |||
| <VBox.margin> | |||
| <Insets bottom="9.0" right="5.0" top="14.0" /> | |||
| </VBox.margin> | |||
| </Button> | |||
| <Button fx:id="btnTunai1Static" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="button-navigasi-transaksi" text="Tunai: 03-0120-00001" /> | |||
| <Button fx:id="btnRetur1Static" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="button-navigasi-transaksi" text="Retur: R-03-0120-00001" /> | |||
| <Button fx:id="btnTunai2Static" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="button-navigasi-transaksi" text="Tunai: 03-0120-00002" /> | |||
| </children> | |||
| <padding> | |||
| <Insets left="5.0" /> | |||
| </padding> | |||
| </VBox> | |||
| </content> | |||
| </ScrollPane> | |||
| <ScrollPane fitToHeight="true" fitToWidth="true"> | |||
| <content> | |||
| <AnchorPane minHeight="-Infinity" minWidth="-Infinity"> | |||
| <children> | |||
| <HBox alignment="CENTER" layoutX="14.0" layoutY="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="5.0"> | |||
| <children> | |||
| <ImageView fitHeight="80.0" fitWidth="80.0" pickOnBounds="true" preserveRatio="true"> | |||
| <image> | |||
| <Image url="@../assets/account-circle-gray.png" /> | |||
| </image> | |||
| </ImageView> | |||
| </children> | |||
| </HBox> | |||
| <Label layoutX="14.0" layoutY="85.0" text="Member / Non" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="85.0"> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="102.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="102.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints prefWidth="60.0" /> | |||
| <ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints vgrow="SOMETIMES" /> | |||
| <RowConstraints vgrow="SOMETIMES" /> | |||
| <RowConstraints vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Nama"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1" /> | |||
| <Label text="Tgl Lahir" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label text="No Telp" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <Label maxWidth="1.7976931348623157E308" text=": -" GridPane.columnIndex="1" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| </children> | |||
| </GridPane> | |||
| </children> | |||
| </AnchorPane> | |||
| </content> | |||
| </ScrollPane> | |||
| </items> | |||
| </SplitPane> | |||
| </left> | |||
| </BorderPane> | |||
| @@ -9,13 +9,13 @@ and open the template in the editor. | |||
| */ | |||
| .button-navigasi-transaksi{ | |||
| -fx-border-color: #4488ff; | |||
| -fx-border-width: 0 1 1.5 1; | |||
| -fx-border-radius: 0 0 8% 8%; | |||
| -fx-border-width: 1 0 1.5 1; | |||
| -fx-border-radius: 5 0 0 5; | |||
| /*-fx-background-color: #99ccff;*/ | |||
| -fx-background-color: | |||
| linear-gradient(#caf6fd 0%, #a5f0fc 49%, #a5f0fc 50%, #8aafff 100%); | |||
| -fx-background-insets: 0,1,2; | |||
| -fx-background-radius: 0 0 8% 8%,0 0 8% 8%,0 0 8% 8%; | |||
| -fx-background-radius: 5 0 0 5,5 0 0 5,5 0 0 5; | |||
| -fx-cursor: hand; | |||
| } | |||
| .button-navigasi-transaksi:hover{ | |||