| @@ -57,6 +57,11 @@ public class AmigoPosRx { | |||
| return UtilsApi.getServiceApiBarang().getMNotaTunaiByNoNota(noNota) | |||
| .subscribeOn(Schedulers.trampoline()); | |||
| } | |||
| public Observable<Pagination<MNotaTunai>> getMNotaTunaiByStatus(String status, Integer limit) { | |||
| return UtilsApi.getServiceApiBarang().getMNotaTunaiByStatus(status, limit) | |||
| .subscribeOn(Schedulers.io()); | |||
| } | |||
| public Observable<List<DNotaTunai>> getDNotaTunaiByNoNota(String noNota) { | |||
| return UtilsApi.getServiceApiBarang().getDNotaTunaiByNoNota(noNota) | |||
| @@ -47,6 +47,12 @@ public interface ServiceApiBarang { | |||
| @GET("m-nota-tunai/no-nota/{noNota}") | |||
| Observable<MNotaTunai> getMNotaTunaiByNoNota(@Path("noNota") String noNota); | |||
| //Mengambil Master Nota Tunai By Status Tunda | |||
| @GET("m-nota-tunai/status/{status}/limit/{limit}") | |||
| Observable<Pagination<MNotaTunai>> getMNotaTunaiByStatus( | |||
| @Path("status") String status, | |||
| @Path("limit") Integer limit); | |||
| //D-NOTA-TUNAI | |||
| //Mengambil Detail Nota Tunai by No Nota | |||
| @GET("d-nota-tunai/no-nota/{noNota}") | |||
| @@ -105,10 +105,11 @@ public class FormTransaksiReturController implements Initializable { | |||
| @FXML | |||
| private TableColumn<TabelBarangRetur, TextField> tcPramuniagaRetur; | |||
| @FXML | |||
| private TableColumn<TabelBarangRetur, Button> tcBtnBatal; | |||
| @FXML | |||
| private StackPane stpReturDrop; | |||
| @FXML | |||
| private Label lblTambahKeTabelRetur; | |||
| private TableColumn<TabelBarangTunai, Button> tcAction; | |||
| private final AmigoPosRx posRx = new AmigoPosRx(); | |||
| private String noNota = ""; | |||
| @@ -133,7 +134,7 @@ public class FormTransaksiReturController implements Initializable { | |||
| tcDisc2.setCellValueFactory(new PropertyValueFactory<>("disc2")); | |||
| tcSubTotal.setCellValueFactory(new PropertyValueFactory<>("subTotal")); | |||
| tcPramuniaga.setCellValueFactory(new PropertyValueFactory<>("fldPramuniaga")); | |||
| tcAction.setCellValueFactory(new PropertyValueFactory<>("btnAction")); | |||
| tcBtnBatal.setCellValueFactory(new PropertyValueFactory<>("btnBatal")); | |||
| tbvPenjualan.setItems(daftarTabelPenjualan); | |||
| tcNoRetur.setCellValueFactory((TableColumn.CellDataFeatures<TabelBarangRetur, Integer> cell) -> { | |||
| @@ -166,8 +167,8 @@ public class FormTransaksiReturController implements Initializable { | |||
| for (DNotaTunai dNotaTunai : daftarNotaTunai) { | |||
| //Button | |||
| Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnAction.setOnAction((t) -> { | |||
| Button btnBatal = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnBatal.setOnAction((t) -> { | |||
| Alert alert = AlertUtil.getAlertDialogKonfirmasi( | |||
| AlertUtil.DIALOG_KONFIRMASI_MESSAGE, | |||
| "Yakin ingin menghapus barang?"); | |||
| @@ -198,7 +199,7 @@ public class FormTransaksiReturController implements Initializable { | |||
| dNotaTunai.getHargaJual() * dNotaTunai.getJumlah() | |||
| )), | |||
| fldPramuniaga, | |||
| btnAction); | |||
| btnBatal); | |||
| tbt.setData(dNotaTunai); | |||
| daftarTabelPenjualan.add(tbt); | |||
| @@ -12,6 +12,7 @@ import id.amigogroup.posterminal.model.DNotaTunai; | |||
| import id.amigogroup.posterminal.model.NoBarang; | |||
| import id.amigogroup.posterminal.util.AmigoPosCache; | |||
| import id.amigogroup.posterminal.util.AlertUtil; | |||
| import id.amigogroup.posterminal.util.ButtonUtility; | |||
| import id.amigogroup.posterminal.util.Fucout; | |||
| import io.reactivex.Observable; | |||
| import io.reactivex.Observer; | |||
| @@ -90,7 +91,6 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| final ObservableList<TabelBarangTunai> daftarTabelTransaksi = FXCollections.observableArrayList(); | |||
| @FXML | |||
| private Text lblGrandTotal; | |||
| public static final ButtonType btnAction = new ButtonType("BATAL", ButtonBar.ButtonData.YES); | |||
| private String noNota = ""; | |||
| private AmigoPosRx posRx = new AmigoPosRx(); | |||
| @@ -145,7 +145,7 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo)); | |||
| cbxPromo.getSelectionModel().select("Ulang Tahun"); | |||
| //Button | |||
| Button btnAction = new Button("BATAL"); | |||
| Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnAction.setOnAction((t) -> { | |||
| Alert alert = AlertUtil.getAlertError( | |||
| AlertUtil.DIALOG_KONFIRMASI_MESSAGE, | |||
| @@ -221,7 +221,7 @@ public class FormTransaksiTunaiController implements Initializable { | |||
| ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo)); | |||
| cbxPromo.getSelectionModel().select("Ulang Tahun"); | |||
| Button btnAction = new Button("BATAL"); | |||
| Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON); | |||
| btnAction.setOnAction((t) -> { | |||
| Alert alert = AlertUtil.getAlertDialogKonfirmasi( | |||
| AlertUtil.DIALOG_KONFIRMASI_MESSAGE, | |||
| @@ -14,7 +14,7 @@ | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <ComboBox fx:id="ddCariNota" layoutX="4.0" layoutY="46.0" prefWidth="281.0" promptText="Nomor Nota" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="46.0" /> | |||
| <ComboBox fx:id="cbxCariNotaTunda" 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> | |||
| @@ -26,7 +26,7 @@ | |||
| <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"> | |||
| <TableView fx:id="tbvBarangTunda" layoutX="8.0" layoutY="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.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" editable="false" prefWidth="75.0" text="Kode Barang" /> | |||
| @@ -37,6 +37,7 @@ | |||
| <TableColumn fx:id="tcDisc1" editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc I" /> | |||
| <TableColumn fx:id="tcDisc2" editable="false" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" resizable="false" text="Disc II" /> | |||
| <TableColumn fx:id="tcSubTotal" editable="false" prefWidth="75.0" text="Sub Total" /> | |||
| <TableColumn fx:id="tcPromo" prefWidth="75.0" text="Promo" /> | |||
| <TableColumn fx:id="tcPramuniaga" editable="false" prefWidth="75.0" text="Pramuniaga" /> | |||
| </columns> | |||
| <columnResizePolicy> | |||