Browse Source

Mencari nota tunda

pull/8/head
AGNES 5 years ago
parent
commit
a133faaa86
5 changed files with 23 additions and 10 deletions
  1. +5
    -0
      src/main/java/id/amigogroup/posterminal/api/AmigoPosRx.java
  2. +6
    -0
      src/main/java/id/amigogroup/posterminal/api/ServiceApiBarang.java
  3. +6
    -5
      src/main/java/id/amigogroup/posterminal/transaksi/FormTransaksiReturController.java
  4. +3
    -3
      src/main/java/id/amigogroup/posterminal/transaksi/FormTransaksiTunaiController.java
  5. +3
    -2
      src/main/resources/fxml/DialogCariNotaTunda.fxml

+ 5
- 0
src/main/java/id/amigogroup/posterminal/api/AmigoPosRx.java View File

@@ -57,6 +57,11 @@ public class AmigoPosRx {
return UtilsApi.getServiceApiBarang().getMNotaTunaiByNoNota(noNota) return UtilsApi.getServiceApiBarang().getMNotaTunaiByNoNota(noNota)
.subscribeOn(Schedulers.trampoline()); .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) { public Observable<List<DNotaTunai>> getDNotaTunaiByNoNota(String noNota) {
return UtilsApi.getServiceApiBarang().getDNotaTunaiByNoNota(noNota) return UtilsApi.getServiceApiBarang().getDNotaTunaiByNoNota(noNota)


+ 6
- 0
src/main/java/id/amigogroup/posterminal/api/ServiceApiBarang.java View File

@@ -47,6 +47,12 @@ public interface ServiceApiBarang {
@GET("m-nota-tunai/no-nota/{noNota}") @GET("m-nota-tunai/no-nota/{noNota}")
Observable<MNotaTunai> getMNotaTunaiByNoNota(@Path("noNota") String 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 //D-NOTA-TUNAI
//Mengambil Detail Nota Tunai by No Nota //Mengambil Detail Nota Tunai by No Nota
@GET("d-nota-tunai/no-nota/{noNota}") @GET("d-nota-tunai/no-nota/{noNota}")


+ 6
- 5
src/main/java/id/amigogroup/posterminal/transaksi/FormTransaksiReturController.java View File

@@ -105,10 +105,11 @@ public class FormTransaksiReturController implements Initializable {
@FXML @FXML
private TableColumn<TabelBarangRetur, TextField> tcPramuniagaRetur; private TableColumn<TabelBarangRetur, TextField> tcPramuniagaRetur;
@FXML @FXML
private TableColumn<TabelBarangRetur, Button> tcBtnBatal;
@FXML
private StackPane stpReturDrop; private StackPane stpReturDrop;
@FXML @FXML
private Label lblTambahKeTabelRetur; private Label lblTambahKeTabelRetur;
private TableColumn<TabelBarangTunai, Button> tcAction;


private final AmigoPosRx posRx = new AmigoPosRx(); private final AmigoPosRx posRx = new AmigoPosRx();
private String noNota = ""; private String noNota = "";
@@ -133,7 +134,7 @@ public class FormTransaksiReturController implements Initializable {
tcDisc2.setCellValueFactory(new PropertyValueFactory<>("disc2")); tcDisc2.setCellValueFactory(new PropertyValueFactory<>("disc2"));
tcSubTotal.setCellValueFactory(new PropertyValueFactory<>("subTotal")); tcSubTotal.setCellValueFactory(new PropertyValueFactory<>("subTotal"));
tcPramuniaga.setCellValueFactory(new PropertyValueFactory<>("fldPramuniaga")); tcPramuniaga.setCellValueFactory(new PropertyValueFactory<>("fldPramuniaga"));
tcAction.setCellValueFactory(new PropertyValueFactory<>("btnAction"));
tcBtnBatal.setCellValueFactory(new PropertyValueFactory<>("btnBatal"));
tbvPenjualan.setItems(daftarTabelPenjualan); tbvPenjualan.setItems(daftarTabelPenjualan);


tcNoRetur.setCellValueFactory((TableColumn.CellDataFeatures<TabelBarangRetur, Integer> cell) -> { tcNoRetur.setCellValueFactory((TableColumn.CellDataFeatures<TabelBarangRetur, Integer> cell) -> {
@@ -166,8 +167,8 @@ public class FormTransaksiReturController implements Initializable {


for (DNotaTunai dNotaTunai : daftarNotaTunai) { for (DNotaTunai dNotaTunai : daftarNotaTunai) {
//Button //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( Alert alert = AlertUtil.getAlertDialogKonfirmasi(
AlertUtil.DIALOG_KONFIRMASI_MESSAGE, AlertUtil.DIALOG_KONFIRMASI_MESSAGE,
"Yakin ingin menghapus barang?"); "Yakin ingin menghapus barang?");
@@ -198,7 +199,7 @@ public class FormTransaksiReturController implements Initializable {
dNotaTunai.getHargaJual() * dNotaTunai.getJumlah() dNotaTunai.getHargaJual() * dNotaTunai.getJumlah()
)), )),
fldPramuniaga, fldPramuniaga,
btnAction);
btnBatal);


tbt.setData(dNotaTunai); tbt.setData(dNotaTunai);
daftarTabelPenjualan.add(tbt); daftarTabelPenjualan.add(tbt);


+ 3
- 3
src/main/java/id/amigogroup/posterminal/transaksi/FormTransaksiTunaiController.java View File

@@ -12,6 +12,7 @@ import id.amigogroup.posterminal.model.DNotaTunai;
import id.amigogroup.posterminal.model.NoBarang; import id.amigogroup.posterminal.model.NoBarang;
import id.amigogroup.posterminal.util.AmigoPosCache; import id.amigogroup.posterminal.util.AmigoPosCache;
import id.amigogroup.posterminal.util.AlertUtil; import id.amigogroup.posterminal.util.AlertUtil;
import id.amigogroup.posterminal.util.ButtonUtility;
import id.amigogroup.posterminal.util.Fucout; import id.amigogroup.posterminal.util.Fucout;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.Observer; import io.reactivex.Observer;
@@ -90,7 +91,6 @@ public class FormTransaksiTunaiController implements Initializable {
final ObservableList<TabelBarangTunai> daftarTabelTransaksi = FXCollections.observableArrayList(); final ObservableList<TabelBarangTunai> daftarTabelTransaksi = FXCollections.observableArrayList();
@FXML @FXML
private Text lblGrandTotal; private Text lblGrandTotal;
public static final ButtonType btnAction = new ButtonType("BATAL", ButtonBar.ButtonData.YES);


private String noNota = ""; private String noNota = "";
private AmigoPosRx posRx = new AmigoPosRx(); private AmigoPosRx posRx = new AmigoPosRx();
@@ -145,7 +145,7 @@ public class FormTransaksiTunaiController implements Initializable {
ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo)); ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo));
cbxPromo.getSelectionModel().select("Ulang Tahun"); cbxPromo.getSelectionModel().select("Ulang Tahun");
//Button //Button
Button btnAction = new Button("BATAL");
Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON);
btnAction.setOnAction((t) -> { btnAction.setOnAction((t) -> {
Alert alert = AlertUtil.getAlertError( Alert alert = AlertUtil.getAlertError(
AlertUtil.DIALOG_KONFIRMASI_MESSAGE, AlertUtil.DIALOG_KONFIRMASI_MESSAGE,
@@ -221,7 +221,7 @@ public class FormTransaksiTunaiController implements Initializable {
ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo)); ComboBox<String> cbxPromo = new ComboBox<>(FXCollections.observableArrayList(promo));
cbxPromo.getSelectionModel().select("Ulang Tahun"); cbxPromo.getSelectionModel().select("Ulang Tahun");


Button btnAction = new Button("BATAL");
Button btnAction = ButtonUtility.generateButton(ButtonUtility.CLOSE_ICON);
btnAction.setOnAction((t) -> { btnAction.setOnAction((t) -> {
Alert alert = AlertUtil.getAlertDialogKonfirmasi( Alert alert = AlertUtil.getAlertDialogKonfirmasi(
AlertUtil.DIALOG_KONFIRMASI_MESSAGE, AlertUtil.DIALOG_KONFIRMASI_MESSAGE,


+ 3
- 2
src/main/resources/fxml/DialogCariNotaTunda.fxml View File

@@ -14,7 +14,7 @@
<Font size="16.0" /> <Font size="16.0" />
</font> </font>
</Label> </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 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"> <Label layoutX="14.0" layoutY="76.0" text="Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="76.0">
<font> <font>
@@ -26,7 +26,7 @@
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</Label> </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> <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="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" /> <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="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="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="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" /> <TableColumn fx:id="tcPramuniaga" editable="false" prefWidth="75.0" text="Pramuniaga" />
</columns> </columns>
<columnResizePolicy> <columnResizePolicy>


Loading…
Cancel
Save