| @@ -85,7 +85,7 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| @FXML | |||
| private TableColumn<TabelBarangTunai, TextField> tcPramuniaga; | |||
| @FXML | |||
| private TableColumn<TabelBarangTunai, Button> tcAction; | |||
| private TableColumn<TabelBarangTunai, Button> tcBtnBatal; | |||
| @FXML | |||
| private Label txtTanggal; | |||
| final ObservableList<TabelBarangTunai> daftarTabelTransaksi = FXCollections.observableArrayList(); | |||
| @@ -115,7 +115,7 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| tcPromo.setCellValueFactory(new PropertyValueFactory<>("cbxPromo")); | |||
| tcSubtotal.setCellValueFactory(new PropertyValueFactory<>("subTotal")); | |||
| tcPramuniaga.setCellValueFactory(new PropertyValueFactory<>("fldPramuniaga")); | |||
| tcAction.setCellValueFactory(new PropertyValueFactory<>("btnAction")); | |||
| tcBtnBatal.setCellValueFactory(new PropertyValueFactory<>("btnBatal")); | |||
| tbvTransaksi.setItems(daftarTabelTransaksi); | |||
| // fillTable(new ArrayList<>()); | |||
| @@ -145,8 +145,8 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo)); | |||
| cbxPromo.getSelectionModel().select("Ulang Tahun"); | |||
| //Button | |||
| Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnAction.setOnAction((t) -> { | |||
| Button btnBatal = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnBatal.setOnAction((t) -> { | |||
| Alert alert = AlertUtil.getAlertError( | |||
| AlertUtil.DIALOG_KONFIRMASI_MESSAGE, | |||
| "Yakin ingin menghapus barang?"); | |||
| @@ -182,7 +182,7 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| dNotaTunai.getHargaJual() * dNotaTunai.getJumlah() | |||
| )), | |||
| fldPramuniaga, | |||
| btnAction)); | |||
| btnBatal)); | |||
| if (!AmigoPosCache.getInstance().getDaftarBarang().containsKey(dNotaTunai.getKdBarang())) { | |||
| posRx.getBarangByKodeBarang(dNotaTunai.getKdBarang()).subscribe(getBarangObserver); | |||
| @@ -30,10 +30,10 @@ public class TabelBarangTunai { | |||
| private SimpleObjectProperty<TextField> fldPramuniaga; | |||
| private DNotaTunai data; | |||
| private SimpleObjectProperty<Button> btnAction; | |||
| private SimpleObjectProperty<Button> btnBatal; | |||
| public TabelBarangTunai(String kode, String nama, String ukur, String jumlah, String harga, String disc1, | |||
| String disc2, ComboBox cbxPromo, String subTotal, TextField fldPramuniaga, Button btnAction) { | |||
| String disc2, ComboBox cbxPromo, String subTotal, TextField fldPramuniaga, Button btnBatal) { | |||
| this.kode = new SimpleStringProperty(kode); | |||
| this.nama = new SimpleStringProperty(nama); | |||
| this.ukur = new SimpleStringProperty(ukur); | |||
| @@ -44,7 +44,7 @@ public class TabelBarangTunai { | |||
| this.cbxPromo = new SimpleObjectProperty<>(cbxPromo); | |||
| this.subTotal = new SimpleStringProperty(subTotal); | |||
| this.fldPramuniaga = new SimpleObjectProperty<>(fldPramuniaga); | |||
| this.btnAction = new SimpleObjectProperty<>(btnAction); | |||
| this.btnBatal = new SimpleObjectProperty<>(btnBatal); | |||
| } | |||
| /** | |||
| @@ -204,14 +204,14 @@ public class TabelBarangTunai { | |||
| /** | |||
| * @return the action | |||
| */ | |||
| public Button getBtnAction() { | |||
| return btnAction.get(); | |||
| public Button getBtnBatal() { | |||
| return btnBatal.get(); | |||
| } | |||
| /** | |||
| * @param action the action to set | |||
| */ | |||
| public void setBtnAction(Button action) { | |||
| this.btnAction.set(action); | |||
| public void setBtnBatal(Button btnBatal) { | |||
| this.btnBatal.set(btnBatal); | |||
| } | |||
| } | |||
| @@ -22,7 +22,7 @@ public class AlertUtil { | |||
| public static final String ERROR_TIDAK_TERDUGA_MESSAGE = "Terjadi kesalahan yang tidak terduga."; | |||
| public static final String ERROR_KONEKSI_TIMEOUT_TITLE = "Error: Timeout - Koneksi Gagal"; | |||
| public static final String ERROR_KONEKSI_TIMEOUT_MESSAGE = "Koneksi ke server mengalami kegagalan."; | |||
| public static final String DIALOG_KONFIRMASI_MESSAGE = "Dialog Konfirmasi"; | |||
| public static final String DIALOG_KONFIRMASI_MESSAGE = "Apakah anda yakin?"; | |||
| public static final String ERROR_TIDAK_LENGKAP_TITLE = "Error: Data Tidak Lengkap"; | |||
| public static final ButtonType BUTTON_YA = new ButtonType("Ya", ButtonData.YES); | |||
| @@ -32,7 +32,7 @@ | |||
| </Label> | |||
| <Label layoutX="14.0" layoutY="20.0" text="Nomor Nota Penjualan" /> | |||
| <TextField fx:id="fldNotaPenjualan" layoutX="14.0" layoutY="37.0" onKeyPressed="#fldNotaPenjualanOnKeyPressed" prefHeight="25.0" prefWidth="329.0" promptText="Nomor Nota Penjualan" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="37.0" /> | |||
| <TableView fx:id="tbvPenjualan" onDragDetected="#tbvPenjualanOnDragDetected" onDragDone="#tbvPenjualanOnDragDone" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="65.0"> | |||
| <TableView fx:id="tbvPenjualan" layoutX="7.0" layoutY="63.0" onDragDetected="#tbvPenjualanOnDragDetected" onDragDone="#tbvPenjualanOnDragDone" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="7.0" AnchorPane.rightAnchor="-7.0" AnchorPane.topAnchor="63.0"> | |||
| <columns> | |||
| <TableColumn fx:id="tcNo" editable="false" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" sortable="false" text="No" /> | |||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode Barang" /> | |||
| @@ -117,6 +117,7 @@ | |||
| <TableColumn fx:id="tcDisc2Retur" prefWidth="75.0" text="Disc 2" /> | |||
| <TableColumn fx:id="tcSubTotalRetur" prefWidth="75.0" text="Sub Total" /> | |||
| <TableColumn fx:id="tcPramuniagaRetur" prefWidth="75.0" text="Pramuniaga" /> | |||
| <TableColumn fx:id="tcBtnBatal" maxWidth="40.0" minWidth="40.0" prefWidth="40.0" resizable="false" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||
| @@ -109,7 +109,7 @@ | |||
| <TableColumn fx:id="tcPromo" prefWidth="-1.0" sortable="false" text="Promo" /> | |||
| <TableColumn fx:id="tcSubtotal" prefWidth="-1.0" text="Sub Total" /> | |||
| <TableColumn fx:id="tcPramuniaga" prefWidth="-1.0" sortable="false" text="Pramuniaga" /> | |||
| <TableColumn fx:id="tcAction" prefWidth="75.0" text="Action" /> | |||
| <TableColumn fx:id="tcBtnBatal" maxWidth="40.0" minWidth="40.0" prefWidth="40.0" resizable="false" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||