--
--

-- Started on 2010-11-14 21:59:35

SET escape_string_warning = off;


ALTER TABLE ONLY "Penjualan".master_penjualan_detail DROP CONSTRAINT satuan_order;
ALTER TABLE ONLY "Penjualan".master_so_detail DROP CONSTRAINT satuan_order;
ALTER TABLE ONLY "Penjualan".master_penjualan_detail DROP CONSTRAINT satuan_kecil;
ALTER TABLE ONLY "Penjualan".master_so_detail DROP CONSTRAINT satuan_kecil;
ALTER TABLE ONLY "Penjualan".rekap_barang_detail DROP CONSTRAINT fk_rekap_brg;
ALTER TABLE ONLY "Penjualan".sales_order_detail DROP CONSTRAINT fk_no_so;
ALTER TABLE ONLY "Penjualan".sales_order_detail DROP CONSTRAINT fk_kode_satuan;
ALTER TABLE ONLY "Penjualan".sales_order DROP CONSTRAINT fk_kode_sales;
ALTER TABLE ONLY "Penjualan".master_penjualan DROP CONSTRAINT fk_kode_sales;
ALTER TABLE ONLY "Penjualan".sales_order_detail DROP CONSTRAINT fk_kode_barang;
ALTER TABLE ONLY "Penjualan".master_retur_penjualan_detail DROP CONSTRAINT "FK_satuan_order";
ALTER TABLE ONLY "Penjualan".master_retur_penjualan_detail DROP CONSTRAINT "FK_satuan_kecil";

ALTER TABLE ONLY "Pembelian".purchase_order_detail DROP CONSTRAINT fk_no_po;
ALTER TABLE ONLY "Pembelian".purchase_order DROP CONSTRAINT fk_kode_supplier;
ALTER TABLE ONLY "Pembelian".purchase_order_detail DROP CONSTRAINT fk_kode_satuan;
ALTER TABLE ONLY "Pembelian".purchase_order_detail DROP CONSTRAINT fk_kode_barang;
ALTER TABLE ONLY "Pembelian".master_retur_pembelian_detail DROP CONSTRAINT "FK_satuan_order";
ALTER TABLE ONLY "Pembelian".master_pembelian_detail DROP CONSTRAINT "FK_satuan_order";
ALTER TABLE ONLY "Pembelian".master_retur_pembelian_detail DROP CONSTRAINT "FK_satuan_kecil";
ALTER TABLE ONLY "Pembelian".master_pembelian_detail DROP CONSTRAINT "FK_satuan_kecil";
ALTER TABLE ONLY "Pembelian".master_pembelian_detail DROP CONSTRAINT "FK_master_pembelian";

ALTER TABLE ONLY "Gudang".master_koreksi_detail DROP CONSTRAINT no_faktur_koreksi;
ALTER TABLE ONLY "Gudang".master_koreksi_detail DROP CONSTRAINT master_satuan_koreksi;
ALTER TABLE ONLY "Gudang".master_koreksi_detail DROP CONSTRAINT master_satuan_kecil;
ALTER TABLE ONLY "Gudang".master_mutasi_detail DROP CONSTRAINT master_mutasi_detail_satuan_order_fkey;
ALTER TABLE ONLY "Gudang".master_mutasi_detail DROP CONSTRAINT "FK_no_faktur_mutasi";
ALTER TABLE ONLY "Gudang".daftar_harga DROP CONSTRAINT "FK_kode_satuan";
ALTER TABLE ONLY "Gudang".master_promo_group_detail DROP CONSTRAINT "FK_kode_p_g";
ALTER TABLE ONLY "Gudang".daftar_diskon DROP CONSTRAINT "FK_kode_jenis_diskon";
ALTER TABLE ONLY "Gudang".daftar_diskon_detail DROP CONSTRAINT "FK_kode_diskon";
ALTER TABLE ONLY "Gudang".daftar_satuan_barang DROP CONSTRAINT "FK_daftar_satuan";

DROP INDEX "Penjualan".idx_jual_brg;

DROP INDEX "Gudang"."FKI_kode_jenis_diskon";

DROP INDEX "Akunting".idx_buku_besar;

ALTER TABLE ONLY public.setting DROP CONSTRAINT pk_setting;

ALTER TABLE ONLY "Settings".akses_cheque DROP CONSTRAINT pk_noseri;
ALTER TABLE ONLY "Settings".print_nota DROP CONSTRAINT pk_no_fakprint;
ALTER TABLE ONLY "Settings".akses_edit_jual DROP CONSTRAINT pk_no_fak_edit;
ALTER TABLE ONLY "Settings".akses_retur_jual DROP CONSTRAINT pk_akses_no_fakrj;
ALTER TABLE ONLY "Settings".akses_koreksi_stock DROP CONSTRAINT pk_akses_no_fak_koreksi_stock;
ALTER TABLE ONLY "Settings".akses_piutang DROP CONSTRAINT pk_akses_no_fak;

ALTER TABLE ONLY "Penjualan".rekap_barang DROP CONSTRAINT pk_rekap_brg;
ALTER TABLE ONLY "Penjualan".sales_order DROP CONSTRAINT "PK_sales_order";
ALTER TABLE ONLY "Penjualan".sales DROP CONSTRAINT "PK_sales";
ALTER TABLE ONLY "Penjualan".master_so DROP CONSTRAINT "PK_master_so";
ALTER TABLE ONLY "Penjualan".master_retur_penjualan DROP CONSTRAINT "PK_master_retur_penjualan";
ALTER TABLE ONLY "Penjualan".master_penjualan DROP CONSTRAINT "PK_master_penjualan";
ALTER TABLE ONLY "Penjualan".customer DROP CONSTRAINT "PK_customer2";
ALTER TABLE ONLY "Penjualan".canvas DROP CONSTRAINT "PK_canvas";

ALTER TABLE ONLY "Pembelian".master_supplier DROP CONSTRAINT "PK_supplier";
ALTER TABLE ONLY "Pembelian".purchase_order DROP CONSTRAINT "PK_purchase_order";
ALTER TABLE ONLY "Pembelian".master_pembelian DROP CONSTRAINT "PK_master_pembelian";
ALTER TABLE ONLY "Pegawai".grup DROP CONSTRAINT "PK_grup";

ALTER TABLE ONLY "Keamanan".log_number DROP CONSTRAINT pk_lr;

ALTER TABLE ONLY "Gudang".daftar_satuan_barang DROP CONSTRAINT pk_satuan_brg;
ALTER TABLE ONLY "Gudang".daftar_harga DROP CONSTRAINT pk_harga_brg;
ALTER TABLE ONLY "Gudang".stock_opname DROP CONSTRAINT pk_barang_opname;
ALTER TABLE ONLY "Gudang".gudang DROP CONSTRAINT pk_barang_gudang;
ALTER TABLE ONLY "Gudang".master_mutasi DROP CONSTRAINT "PK_master_mutasi";
ALTER TABLE ONLY "Gudang".master_koreksi DROP CONSTRAINT "PK_master_koreksi";
ALTER TABLE ONLY "Gudang".master_promo_group DROP CONSTRAINT "PK_kode_p_g";
ALTER TABLE ONLY "Gudang".daftar_jenis_diskon DROP CONSTRAINT "PK_kode_jenis";
ALTER TABLE ONLY "Gudang".daftar_diskon DROP CONSTRAINT "PK_kode_diskon";
ALTER TABLE ONLY "Gudang".daftar_satuan DROP CONSTRAINT "PK_daftar_satuan";
ALTER TABLE ONLY "Gudang".barang DROP CONSTRAINT "PK_barang";

ALTER TABLE ONLY "Groupware".todo DROP CONSTRAINT "PK_todo";
ALTER TABLE ONLY "Groupware".pesan DROP CONSTRAINT "PK_pesan";
ALTER TABLE ONLY "Groupware".berita DROP CONSTRAINT "PK_berita";

ALTER TABLE ONLY "Akunting".rekap_spp DROP CONSTRAINT pk_rekap_nagih_spp;
ALTER TABLE ONLY "Akunting".rekap_penagihan DROP CONSTRAINT pk_rekap_nagih;
ALTER TABLE ONLY "Akunting".bank DROP CONSTRAINT pk_nama_bank;
ALTER TABLE ONLY "Akunting".daftar_akunting_posting DROP CONSTRAINT pk_kode_sup_posting;
ALTER TABLE ONLY "Akunting".cek DROP CONSTRAINT pk_kode_cek;
ALTER TABLE ONLY "Akunting".daftar_bank_internal DROP CONSTRAINT pk_kode_bank;
ALTER TABLE ONLY "Akunting".buku_besar DROP CONSTRAINT "PK_kode_buku_besar";
ALTER TABLE ONLY "Akunting".daftar_akunting DROP CONSTRAINT "PK_daftar_akunting";

DROP TABLE public.transfer_detail;
DROP TABLE public.setting;
DROP TABLE public.retur_detail;
DROP TABLE public.rekap_spp_detail;
DROP TABLE public.rekap_spp;
DROP TABLE public.rekap_penagihan_detail;
DROP TABLE public.rekap_penagihan;
DROP TABLE public.kartu_piutang;
DROP TABLE public.kartu_hutang;
DROP TABLE public.daftar_bank_internal;
DROP TABLE public.daftar_akunting_posting;
DROP TABLE public.daftar_akunting;
DROP TABLE public.cek_detail;
DROP TABLE public.cek;
DROP TABLE public.buku_besar;
DROP TABLE public.bank;

DROP TABLE "Settings".setting;
DROP TABLE "Settings".print_nota;
DROP TABLE "Settings".jurnal_transaksi;
DROP TABLE "Settings".info_usaha;
DROP TABLE "Settings".akses_retur_jual;
DROP TABLE "Settings".akses_piutang;
DROP TABLE "Settings".akses_koreksi_stock;
DROP TABLE "Settings".akses_edit_jual;
DROP TABLE "Settings".akses_cheque;

DROP TABLE "Penjualan".wilayah;
DROP TABLE "Penjualan".sales_order_detail;
DROP TABLE "Penjualan".sales_order;
DROP TABLE "Penjualan".sales;
DROP TABLE "Penjualan".rekap_barang_detail;
DROP TABLE "Penjualan".rekap_barang;
DROP TABLE "Penjualan".master_so_detail;
DROP TABLE "Penjualan".master_so;
DROP TABLE "Penjualan".master_retur_penjualan_detail;
DROP TABLE "Penjualan".master_retur_penjualan;
DROP TABLE "Penjualan".master_penjualan_detail_2;
DROP TABLE "Penjualan".master_penjualan_detail;
DROP TABLE "Penjualan".master_penjualan;
DROP TABLE "Penjualan".customer;
DROP TABLE "Penjualan".canvas;

DROP TABLE "Pembelian".purchase_order_detail;
DROP TABLE "Pembelian".purchase_order;
DROP TABLE "Pembelian".master_supplier_detail;
DROP TABLE "Pembelian".master_supplier;
DROP TABLE "Pembelian".master_retur_pembelian_detail;
DROP TABLE "Pembelian".master_retur_pembelian;
DROP TABLE "Pembelian".master_pembelian_detail;
DROP TABLE "Pembelian".master_pembelian;
DROP TABLE "Pegawai".grup;

DROP TABLE "Keamanan".log_number;
DROP TABLE "Keamanan".log_login;

DROP TABLE "Gudang".stock_opname;
DROP TABLE "Gudang".master_promo_group_detail;
DROP TABLE "Gudang".master_promo_group;
DROP TABLE "Gudang".master_mutasi_detail;
DROP TABLE "Gudang".master_mutasi;
DROP TABLE "Gudang".master_koreksi_detail;
DROP TABLE "Gudang".master_koreksi;
DROP TABLE "Gudang".kartu_stock_rsk;
DROP TABLE "Gudang".kartu_stock_2;
DROP TABLE "Gudang".kartu_stock;
DROP TABLE "Gudang".gudang_temp;
DROP TABLE "Gudang".gudang;
DROP TABLE "Gudang".daftar_tag;
DROP TABLE "Gudang".daftar_satuan_barang;
DROP TABLE "Gudang".daftar_satuan;
DROP TABLE "Gudang".daftar_jenis_diskon;
DROP TABLE "Gudang".daftar_harga;
DROP TABLE "Gudang".daftar_diskon_detail;
DROP TABLE "Gudang".daftar_diskon;
DROP TABLE "Gudang".barang;

DROP TABLE "Groupware".todo;
DROP TABLE "Groupware".pesan;
DROP TABLE "Groupware".berita;

DROP TABLE "Akunting".transfer_detail;
DROP TABLE "Akunting".retur_detail;
DROP TABLE "Akunting".rekap_spp_detail;
DROP TABLE "Akunting".rekap_spp;
DROP TABLE "Akunting".rekap_penagihan_detail;
DROP TABLE "Akunting".rekap_penagihan;
DROP TABLE "Akunting".kartu_piutang;
DROP TABLE "Akunting".kartu_hutang;
DROP TABLE "Akunting".daftar_bank_internal;
DROP TABLE "Akunting".daftar_akunting_posting;
DROP TABLE "Akunting".daftar_akunting;
DROP TABLE "Akunting".cek_detail;
DROP TABLE "Akunting".cek;
DROP TABLE "Akunting".buku_besar;
DROP TABLE "Akunting".bank;
DROP PROCEDURAL LANGUAGE plpgsql;
DROP SCHEMA public;
DROP SCHEMA "Settings";
DROP SCHEMA "Penjualan";
DROP SCHEMA "Pembelian";
DROP SCHEMA "Pegawai";
DROP SCHEMA "Keamanan";
DROP SCHEMA "Gudang";
DROP SCHEMA "Groupware";
DROP SCHEMA "Akunting";
--
-- TOC entry 5 (class 2615 OID 3228244)
-- Name: Akunting; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Akunting";


ALTER SCHEMA "Akunting" OWNER TO postgres;

--
-- TOC entry 2153 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA "Akunting"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Akunting" IS 'Skema untuk menyimpan data transaksi yang di posting ke buku besar
';


--
-- TOC entry 6 (class 2615 OID 3228245)
-- Name: Groupware; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Groupware";


ALTER SCHEMA "Groupware" OWNER TO postgres;

--
-- TOC entry 2154 (class 0 OID 0)
-- Dependencies: 6
-- Name: SCHEMA "Groupware"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Groupware" IS 'Skema untuk alur informasi, yaitu berita, pesan/email, dan TODO';


--
-- TOC entry 7 (class 2615 OID 3228246)
-- Name: Gudang; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Gudang";


ALTER SCHEMA "Gudang" OWNER TO postgres;

--
-- TOC entry 8 (class 2615 OID 3228247)
-- Name: Keamanan; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Keamanan";


ALTER SCHEMA "Keamanan" OWNER TO postgres;

--
-- TOC entry 2155 (class 0 OID 0)
-- Dependencies: 8
-- Name: SCHEMA "Keamanan"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Keamanan" IS 'Skema untuk menyimpan catatan pegawai yang pernah login
';


--
-- TOC entry 9 (class 2615 OID 3228248)
-- Name: Pegawai; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Pegawai";


ALTER SCHEMA "Pegawai" OWNER TO postgres;

--
-- TOC entry 2156 (class 0 OID 0)
-- Dependencies: 9
-- Name: SCHEMA "Pegawai"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Pegawai" IS 'Skema untuk menyimpan data pegawai serta segmentasi grupnya';


--
-- TOC entry 10 (class 2615 OID 3228249)
-- Name: Pembelian; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Pembelian";


ALTER SCHEMA "Pembelian" OWNER TO postgres;

--
-- TOC entry 2157 (class 0 OID 0)
-- Dependencies: 10
-- Name: SCHEMA "Pembelian"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Pembelian" IS 'Skema untuk menyimpan data transaksi pembelian';


--
-- TOC entry 11 (class 2615 OID 3228250)
-- Name: Penjualan; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Penjualan";


ALTER SCHEMA "Penjualan" OWNER TO postgres;

--
-- TOC entry 2158 (class 0 OID 0)
-- Dependencies: 11
-- Name: SCHEMA "Penjualan"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Penjualan" IS 'Skema untuk menyimpan data transaksi penjualan';


--
-- TOC entry 12 (class 2615 OID 3228251)
-- Name: Settings; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA "Settings";


ALTER SCHEMA "Settings" OWNER TO postgres;

--
-- TOC entry 2159 (class 0 OID 0)
-- Dependencies: 12
-- Name: SCHEMA "Settings"; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA "Settings" IS 'Untuk mencatat info usaha dan setting';


--
-- TOC entry 13 (class 2615 OID 3227268)
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA public;


ALTER SCHEMA public OWNER TO postgres;

--
-- TOC entry 2160 (class 0 OID 0)
-- Dependencies: 13
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


--
-- TOC entry 449 (class 2612 OID 3228252)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;




--
-- TOC entry 1469 (class 1259 OID 3228253)
-- Dependencies: 5
-- Name: bank; Type: TABLE; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE TABLE bank (
    kode_bank text NOT NULL,
    nama_bank text NOT NULL,
    info text
);


ALTER TABLE "Akunting".bank OWNER TO postgres;

--
-- TOC entry 1470 (class 1259 OID 3228258)
-- Dependencies: 1884 1885 5
-- Name: buku_besar; Type: TABLE; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE TABLE buku_besar (
    kode_buku_besar text NOT NULL,
    kode_akunting text,
    tanggal_akunting timestamp without time zone,
    kode_pegawai text,
    subjek text,
    predikat text,
    objek text,
    debet numeric DEFAULT 0,
    kredit numeric DEFAULT 0,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Akunting".buku_besar OWNER TO postgres;

--
-- TOC entry 2162 (class 0 OID 0)
-- Dependencies: 1470
-- Name: COLUMN buku_besar.subjek; Type: COMMENT; Schema: Akunting; Owner: postgres
--

COMMENT ON COLUMN buku_besar.subjek IS 'kode_sup / kode_cust';


--
-- TOC entry 2163 (class 0 OID 0)
-- Dependencies: 1470
-- Name: COLUMN buku_besar.predikat; Type: COMMENT; Schema: Akunting; Owner: postgres
--

COMMENT ON COLUMN buku_besar.predikat IS 'what to do ';


--
-- TOC entry 2164 (class 0 OID 0)
-- Dependencies: 1470
-- Name: COLUMN buku_besar.objek; Type: COMMENT; Schema: Akunting; Owner: postgres
--

COMMENT ON COLUMN buku_besar.objek IS 'no nota jual/beli/retur beli/retur jual';



--
-- TOC entry 1471 (class 1259 OID 3228265)
-- Dependencies: 1886 1887 5
-- Name: cek; Type: TABLE; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE TABLE cek (
    kode text NOT NULL,
    no_seri text,
    subjek text,
    objek text,
    bank text,
    jumlah numeric,
    tanggal_terima timestamp without time zone,
    jatuh_tempo timestamp without time zone,
    tipe_cek text,
    cair boolean,
    info text,
    jenis text,
    info_pembayaran text,
    kode_pegawai text,
    terpakai numeric DEFAULT 0,
    habis boolean DEFAULT false
);


ALTER TABLE "Akunting".cek OWNER TO postgres;


--
-- TOC entry 1472 (class 1259 OID 3228272)
-- Dependencies: 5
-- Name: cek_detail; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE cek_detail (
    kode text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE "Akunting".cek_detail OWNER TO henry;

--
-- TOC entry 1473 (class 1259 OID 3228277)
-- Dependencies: 5
-- Name: daftar_akunting; Type: TABLE; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_akunting (
    kode_akunting text NOT NULL,
    nama_akunting text,
    jenis_akunting text,
    info_akunting text
);


ALTER TABLE "Akunting".daftar_akunting OWNER TO postgres;

--
-- TOC entry 2165 (class 0 OID 0)
-- Dependencies: 1473
-- Name: COLUMN daftar_akunting.kode_akunting; Type: COMMENT; Schema: Akunting; Owner: postgres
--

COMMENT ON COLUMN daftar_akunting.kode_akunting IS 'misal 001,002';


--
-- TOC entry 1474 (class 1259 OID 3228282)
-- Dependencies: 5
-- Name: daftar_akunting_posting; Type: TABLE; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_akunting_posting (
    kode_supplier text NOT NULL,
    penjualan text,
    persediaan text,
    hpp text,
    info1 text,
    info2 text
);


ALTER TABLE "Akunting".daftar_akunting_posting OWNER TO postgres;

--
-- TOC entry 1475 (class 1259 OID 3228287)
-- Dependencies: 5
-- Name: daftar_bank_internal; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE daftar_bank_internal (
    kode_bank text NOT NULL,
    nama_bank text,
    no_rek text,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Akunting".daftar_bank_internal OWNER TO henry;


--
-- TOC entry 1476 (class 1259 OID 3228292)
-- Dependencies: 1888 1889 1890 5
-- Name: kartu_hutang; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE kartu_hutang (
    kode_customer text,
    no_bukti text,
    uraian text,
    tanggal timestamp without time zone,
    tanggal_lunas timestamp without time zone,
    penjualan numeric DEFAULT 0 NOT NULL,
    pelunasan numeric DEFAULT 0 NOT NULL,
    saldo numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Akunting".kartu_hutang OWNER TO henry;

--
-- TOC entry 1477 (class 1259 OID 3228300)
-- Dependencies: 1891 1892 1893 5
-- Name: kartu_piutang; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE kartu_piutang (
    kode_customer text,
    no_bukti text,
    uraian text,
    tanggal timestamp without time zone,
    tanggal_lunas timestamp without time zone,
    penjualan numeric DEFAULT 0 NOT NULL,
    pelunasan numeric DEFAULT 0 NOT NULL,
    saldo numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Akunting".kartu_piutang OWNER TO henry;


--
-- TOC entry 1478 (class 1259 OID 3228308)
-- Dependencies: 5
-- Name: rekap_penagihan; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_penagihan (
    kode_dpp text NOT NULL,
    kode_sales text,
    wilayah text,
    tanggal timestamp without time zone,
    bkm text,
    info1 text,
    info2 text,
    info3 text,
    status text
);


ALTER TABLE "Akunting".rekap_penagihan OWNER TO henry;

--
-- TOC entry 1479 (class 1259 OID 3228313)
-- Dependencies: 5
-- Name: rekap_penagihan_detail; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_penagihan_detail (
    kode_dpp text NOT NULL,
    kode_customer text,
    kode_wilayah text,
    no_faktur text,
    tgl_terima text,
    jumlah_tag numeric,
    akumulasi numeric,
    ditagihkan numeric,
    pembayaran text,
    retur_pot text,
    kembali text,
    keterangan text
);


ALTER TABLE "Akunting".rekap_penagihan_detail OWNER TO henry;

--
-- TOC entry 1480 (class 1259 OID 3228318)
-- Dependencies: 5
-- Name: rekap_spp; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_spp (
    kode_spp text NOT NULL,
    tanggal timestamp without time zone,
    bukti_kas text,
    info1 text,
    info2 text,
    info3 text,
    status text
);


ALTER TABLE "Akunting".rekap_spp OWNER TO henry;

--
-- TOC entry 1481 (class 1259 OID 3228323)
-- Dependencies: 5
-- Name: rekap_spp_detail; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_spp_detail (
    kode_spp text NOT NULL,
    kode_supplier text,
    no_faktur text,
    tgl_terima text,
    jumlah_tag numeric,
    akumulasi numeric,
    ditagihkan numeric,
    pembayaran text,
    retur_pot text,
    keterangan text
);


ALTER TABLE "Akunting".rekap_spp_detail OWNER TO henry;

--
-- TOC entry 1482 (class 1259 OID 3228328)
-- Dependencies: 5
-- Name: retur_detail; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE retur_detail (
    no_faktur text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE "Akunting".retur_detail OWNER TO henry;

--
-- TOC entry 1483 (class 1259 OID 3228333)
-- Dependencies: 5
-- Name: transfer_detail; Type: TABLE; Schema: Akunting; Owner: henry; Tablespace: 
--

CREATE TABLE transfer_detail (
    kode text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE "Akunting".transfer_detail OWNER TO henry;


--
-- TOC entry 1484 (class 1259 OID 3228338)
-- Dependencies: 6
-- Name: berita; Type: TABLE; Schema: Groupware; Owner: postgres; Tablespace: 
--

CREATE TABLE berita (
    kode text NOT NULL,
    kode_pegawai text,
    tanggal text,
    judul text,
    isi text,
    status text,
    info text
);


ALTER TABLE "Groupware".berita OWNER TO postgres;

--
-- TOC entry 1485 (class 1259 OID 3228343)
-- Dependencies: 6
-- Name: pesan; Type: TABLE; Schema: Groupware; Owner: postgres; Tablespace: 
--

CREATE TABLE pesan (
    kode text NOT NULL,
    kode_pegawai text,
    tanggal text,
    judul text,
    isi text,
    status text,
    tujuan text,
    info text
);


ALTER TABLE "Groupware".pesan OWNER TO postgres;

--
-- TOC entry 1486 (class 1259 OID 3228348)
-- Dependencies: 6
-- Name: todo; Type: TABLE; Schema: Groupware; Owner: postgres; Tablespace: 
--

CREATE TABLE todo (
    kode text NOT NULL,
    kode_pegawai text,
    tanggal text,
    judul text,
    isi text,
    status text,
    info text
);


ALTER TABLE "Groupware".todo OWNER TO postgres;



--
-- TOC entry 1487 (class 1259 OID 3228353)
-- Dependencies: 7
-- Name: barang; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE barang (
    kode_barang text NOT NULL,
    kode_barcode text,
    nama_barang text,
    nickname text,
    gambar_barang text,
    tag text,
    status_barang text,
    limit_barang numeric,
    info text,
    tanggal_masuk timestamp without time zone,
    harga_pokok numeric,
    kode_supplier text
);


ALTER TABLE "Gudang".barang OWNER TO postgres;

--
-- TOC entry 2166 (class 0 OID 0)
-- Dependencies: 1487
-- Name: COLUMN barang.gambar_barang; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN barang.gambar_barang IS 'menyimpan alamat gambar barang
contoh : /images/wafer/tango/tango_coklat.png
';


--
-- TOC entry 2167 (class 0 OID 0)
-- Dependencies: 1487
-- Name: COLUMN barang.tag; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN barang.tag IS 'pengelompokkan jenis barang, pengganti kategori
';


--
-- TOC entry 2168 (class 0 OID 0)
-- Dependencies: 1487
-- Name: COLUMN barang.info; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN barang.info IS 'keterangan barang';



--
-- TOC entry 1488 (class 1259 OID 3228358)
-- Dependencies: 7
-- Name: daftar_diskon; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_diskon (
    kode_diskon text NOT NULL,
    kode_jenis_diskon text NOT NULL,
    nama_diskon text NOT NULL,
    periode_awal timestamp without time zone NOT NULL,
    periode_akhir timestamp without time zone NOT NULL
);


ALTER TABLE "Gudang".daftar_diskon OWNER TO postgres;

--
-- TOC entry 1489 (class 1259 OID 3228363)
-- Dependencies: 1894 1895 1896 7
-- Name: daftar_diskon_detail; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_diskon_detail (
    kode_diskon text NOT NULL,
    ambil_min numeric DEFAULT 0 NOT NULL,
    ambil_max numeric DEFAULT 0 NOT NULL,
    diskon numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Gudang".daftar_diskon_detail OWNER TO postgres;


--
-- TOC entry 1490 (class 1259 OID 3228371)
-- Dependencies: 1897 1898 7
-- Name: daftar_harga; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_harga (
    kode_barang text NOT NULL,
    kode_satuan text NOT NULL,
    jumlah_barang text,
    harga_barang numeric,
    kode_diskon_1 text,
    kode_diskon_2 text,
    kode_diskon_3 text,
    kode_diskon_4 text,
    harga_barang2 numeric,
    harga_barang3 numeric DEFAULT 0,
    harga_barang4 numeric DEFAULT 0
);


ALTER TABLE "Gudang".daftar_harga OWNER TO postgres;

--
-- TOC entry 2170 (class 0 OID 0)
-- Dependencies: 1490
-- Name: COLUMN daftar_harga.jumlah_barang; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN daftar_harga.jumlah_barang IS 'not used';


--
-- TOC entry 2171 (class 0 OID 0)
-- Dependencies: 1490
-- Name: COLUMN daftar_harga.harga_barang3; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN daftar_harga.harga_barang3 IS 'harga motoris';


--
-- TOC entry 2172 (class 0 OID 0)
-- Dependencies: 1490
-- Name: COLUMN daftar_harga.harga_barang4; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN daftar_harga.harga_barang4 IS 'harga canvas';



--
-- TOC entry 1491 (class 1259 OID 3228378)
-- Dependencies: 7
-- Name: daftar_jenis_diskon; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_jenis_diskon (
    kode_jenis text NOT NULL,
    nama_jenis text NOT NULL
);


ALTER TABLE "Gudang".daftar_jenis_diskon OWNER TO postgres;

--
-- TOC entry 1492 (class 1259 OID 3228383)
-- Dependencies: 7
-- Name: daftar_satuan; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_satuan (
    kode_satuan text NOT NULL,
    nama_satuan text,
    info text
);


ALTER TABLE "Gudang".daftar_satuan OWNER TO postgres;

--
-- TOC entry 2173 (class 0 OID 0)
-- Dependencies: 1492
-- Name: COLUMN daftar_satuan.info; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN daftar_satuan.info IS 'keterangan satuan
';



--
-- TOC entry 1493 (class 1259 OID 3228388)
-- Dependencies: 7
-- Name: daftar_satuan_barang; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_satuan_barang (
    kode_barang text NOT NULL,
    kode_satuan text NOT NULL,
    isi_satuan text,
    hierarki_satuan text,
    berat text,
    dimensi text
);


ALTER TABLE "Gudang".daftar_satuan_barang OWNER TO postgres;

--
-- TOC entry 2174 (class 0 OID 0)
-- Dependencies: 1493
-- Name: COLUMN daftar_satuan_barang.isi_satuan; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN daftar_satuan_barang.isi_satuan IS 'isi dari satuan, dilihat dari satuan sebelomnya
contoh: satuan       isi_satuan
             bal             1
             karton        10
             dos             6';



--
-- TOC entry 1494 (class 1259 OID 3228393)
-- Dependencies: 7
-- Name: daftar_tag; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_tag (
    tag text NOT NULL,
    info text
);


ALTER TABLE "Gudang".daftar_tag OWNER TO postgres;


--
-- TOC entry 1495 (class 1259 OID 3228398)
-- Dependencies: 7
-- Name: gudang; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE gudang (
    kode_barang text NOT NULL,
    subkode_barang text NOT NULL,
    no_faktur_beli text,
    tanggal_masuk timestamp without time zone,
    harga_beli numeric,
    jumlah numeric,
    alokasi text NOT NULL
);


ALTER TABLE "Gudang".gudang OWNER TO postgres;

--
-- TOC entry 2175 (class 0 OID 0)
-- Dependencies: 1495
-- Name: COLUMN gudang.no_faktur_beli; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN gudang.no_faktur_beli IS 'nomor faktur pembelian dari barang tersebut';


--
-- TOC entry 2176 (class 0 OID 0)
-- Dependencies: 1495
-- Name: COLUMN gudang.tanggal_masuk; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN gudang.tanggal_masuk IS 'tanggal masuk barang ke gudang
';


--
-- TOC entry 2177 (class 0 OID 0)
-- Dependencies: 1495
-- Name: COLUMN gudang.alokasi; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN gudang.alokasi IS 'alokasi barang untuk salah satu toko
alokasi barang tidak dapat diambil toko lain, namun dapat di pindah alokasi, atau dimutasi ';


--
-- TOC entry 1496 (class 1259 OID 3228403)
-- Dependencies: 7
-- Name: gudang_temp; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE gudang_temp (
    kode_barang text NOT NULL,
    subkode_barang text NOT NULL,
    no_faktur_beli text,
    tanggal_masuk timestamp without time zone,
    harga_beli numeric,
    jumlah numeric,
    alokasi text,
    no_faktur text
);


ALTER TABLE "Gudang".gudang_temp OWNER TO henry;


--
-- TOC entry 1497 (class 1259 OID 3228408)
-- Dependencies: 1899 1900 1901 1902 1903 1904 1905 1906 1907 7
-- Name: kartu_stock; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE kartu_stock (
    kode_barang text,
    no_nota text,
    uraian text,
    tanggal timestamp without time zone,
    qty_beli numeric DEFAULT 0 NOT NULL,
    harga_beli numeric DEFAULT 0 NOT NULL,
    total_beli numeric DEFAULT 0 NOT NULL,
    qty_jual numeric DEFAULT 0 NOT NULL,
    harga_jual numeric DEFAULT 0 NOT NULL,
    total_jual numeric DEFAULT 0 NOT NULL,
    qty_akhir numeric DEFAULT 0 NOT NULL,
    harga_akhir numeric DEFAULT 0 NOT NULL,
    total_akhir numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Gudang".kartu_stock OWNER TO henry;


--
-- TOC entry 1498 (class 1259 OID 3228422)
-- Dependencies: 1908 1909 1910 1911 1912 1913 1914 1915 1916 7
-- Name: kartu_stock_2; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE kartu_stock_2 (
    kode_barang text,
    no_nota text,
    uraian text,
    tanggal timestamp without time zone,
    qty_beli numeric DEFAULT 0 NOT NULL,
    harga_beli numeric DEFAULT 0 NOT NULL,
    total_beli numeric DEFAULT 0 NOT NULL,
    qty_jual numeric DEFAULT 0 NOT NULL,
    harga_jual numeric DEFAULT 0 NOT NULL,
    total_jual numeric DEFAULT 0 NOT NULL,
    qty_akhir numeric DEFAULT 0 NOT NULL,
    harga_akhir numeric DEFAULT 0 NOT NULL,
    total_akhir numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Gudang".kartu_stock_2 OWNER TO henry;

--
-- TOC entry 1499 (class 1259 OID 3228436)
-- Dependencies: 1917 1918 1919 1920 1921 1922 1923 1924 1925 7
-- Name: kartu_stock_rsk; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE kartu_stock_rsk (
    kode_barang text,
    no_nota text,
    uraian text,
    tanggal timestamp without time zone,
    qty_beli numeric DEFAULT 0 NOT NULL,
    harga_beli numeric DEFAULT 0 NOT NULL,
    total_beli numeric DEFAULT 0 NOT NULL,
    qty_jual numeric DEFAULT 0 NOT NULL,
    harga_jual numeric DEFAULT 0 NOT NULL,
    total_jual numeric DEFAULT 0 NOT NULL,
    qty_akhir numeric DEFAULT 0 NOT NULL,
    harga_akhir numeric DEFAULT 0 NOT NULL,
    total_akhir numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Gudang".kartu_stock_rsk OWNER TO henry;


--
-- TOC entry 1500 (class 1259 OID 3228450)
-- Dependencies: 7
-- Name: master_koreksi; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE master_koreksi (
    no_faktur text NOT NULL,
    kode_pegawai text,
    tanggal_faktur timestamp without time zone,
    sumber text,
    tipe text,
    netto numeric,
    info text,
    info2 text,
    info3 text,
    status_nota text
);


ALTER TABLE "Gudang".master_koreksi OWNER TO henry;


--
-- TOC entry 1501 (class 1259 OID 3228455)
-- Dependencies: 7
-- Name: master_koreksi_detail; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE master_koreksi_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    tipe_koreksi text,
    harga_satuan numeric,
    subtotal numeric,
    info1 text,
    info2 text
);


ALTER TABLE "Gudang".master_koreksi_detail OWNER TO henry;

--
-- TOC entry 1502 (class 1259 OID 3228460)
-- Dependencies: 7
-- Name: master_mutasi; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE master_mutasi (
    no_faktur_mutasi text NOT NULL,
    kode_pegawai text,
    tanggal_mutasi timestamp without time zone,
    sumber text,
    tujuan text,
    info text
);


ALTER TABLE "Gudang".master_mutasi OWNER TO postgres;

--
-- TOC entry 2178 (class 0 OID 0)
-- Dependencies: 1502
-- Name: COLUMN master_mutasi.no_faktur_mutasi; Type: COMMENT; Schema: Gudang; Owner: postgres
--

COMMENT ON COLUMN master_mutasi.no_faktur_mutasi IS 'unicode mutasi';


--
-- TOC entry 1503 (class 1259 OID 3228465)
-- Dependencies: 7
-- Name: master_mutasi_detail; Type: TABLE; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE TABLE master_mutasi_detail (
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    no_faktur_mutasi text,
    info text
);


ALTER TABLE "Gudang".master_mutasi_detail OWNER TO postgres;

--
-- TOC entry 1504 (class 1259 OID 3228470)
-- Dependencies: 7
-- Name: master_promo_group; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE master_promo_group (
    kode_p_g text NOT NULL,
    tag text,
    info text
);


ALTER TABLE "Gudang".master_promo_group OWNER TO henry;

--
-- TOC entry 1505 (class 1259 OID 3228475)
-- Dependencies: 1926 1927 1928 7
-- Name: master_promo_group_detail; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE master_promo_group_detail (
    kode_p_g text,
    ambil_min numeric DEFAULT 0 NOT NULL,
    ambil_max numeric DEFAULT 0 NOT NULL,
    tipe_diskon text,
    diskon numeric DEFAULT 0 NOT NULL
);


ALTER TABLE "Gudang".master_promo_group_detail OWNER TO henry;

--
-- TOC entry 1506 (class 1259 OID 3228483)
-- Dependencies: 7
-- Name: stock_opname; Type: TABLE; Schema: Gudang; Owner: henry; Tablespace: 
--

CREATE TABLE stock_opname (
    kode_barang text NOT NULL,
    tanggal_masuk timestamp without time zone NOT NULL,
    harga_beli numeric,
    jumlah numeric,
    alokasi text,
    info text
);


ALTER TABLE "Gudang".stock_opname OWNER TO henry;



--
-- TOC entry 1507 (class 1259 OID 3228488)
-- Dependencies: 8
-- Name: log_login; Type: TABLE; Schema: Keamanan; Owner: postgres; Tablespace: 
--

CREATE TABLE log_login (
    ip_address text NOT NULL,
    nama_user text,
    jam text,
    info text
);


ALTER TABLE "Keamanan".log_login OWNER TO postgres;

--
-- TOC entry 1508 (class 1259 OID 3228493)
-- Dependencies: 8
-- Name: log_number; Type: TABLE; Schema: Keamanan; Owner: postgres; Tablespace: 
--

CREATE TABLE log_number (
    ip_address text NOT NULL,
    nama_user text,
    jam text,
    info text
);


ALTER TABLE "Keamanan".log_number OWNER TO postgres;


--
-- TOC entry 1509 (class 1259 OID 3228498)
-- Dependencies: 9
-- Name: grup; Type: TABLE; Schema: Pegawai; Owner: postgres; Tablespace: 
--

CREATE TABLE grup (
    nama text NOT NULL,
    deskripsi text,
    status text,
    akses text,
    hak_akses text
);


ALTER TABLE "Pegawai".grup OWNER TO postgres;



--
-- TOC entry 1511 (class 1259 OID 3228508)
-- Dependencies: 10
-- Name: master_pembelian; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_pembelian (
    no_faktur text NOT NULL,
    no_faktur_asli text,
    kode_pegawai text,
    kode_supplier text,
    tanggal_faktur timestamp without time zone,
    jatuh_tempo timestamp without time zone,
    netto numeric,
    status_lunas boolean,
    status_gudang boolean,
    info text,
    no_po text,
    surat_jalan text,
    no_truck text,
    ekspedisi text,
    no_faktur_pajak text,
    tanggal_faktur_pajak timestamp without time zone,
    bulan_lapor text,
    tahun_lapor text,
    tanggal_terima_barang timestamp without time zone
);


ALTER TABLE "Pembelian".master_pembelian OWNER TO postgres;

--
-- TOC entry 2179 (class 0 OID 0)
-- Dependencies: 1511
-- Name: COLUMN master_pembelian.no_faktur; Type: COMMENT; Schema: Pembelian; Owner: postgres
--

COMMENT ON COLUMN master_pembelian.no_faktur IS 'unicode faktur internal, di generate sendiri';


--
-- TOC entry 2180 (class 0 OID 0)
-- Dependencies: 1511
-- Name: COLUMN master_pembelian.no_faktur_asli; Type: COMMENT; Schema: Pembelian; Owner: postgres
--

COMMENT ON COLUMN master_pembelian.no_faktur_asli IS 'no_faktur sesungguhnya pada faktur pembelian';


--
-- TOC entry 2181 (class 0 OID 0)
-- Dependencies: 1511
-- Name: COLUMN master_pembelian.tanggal_terima_barang; Type: COMMENT; Schema: Pembelian; Owner: postgres
--

COMMENT ON COLUMN master_pembelian.tanggal_terima_barang IS 'tgl terima barang sesuai dg surat jalan supplier';


--
-- TOC entry 1512 (class 1259 OID 3228513)
-- Dependencies: 10
-- Name: master_pembelian_detail; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_pembelian_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    harga_satuan numeric,
    subtotal numeric,
    diskon numeric,
    info text
);


ALTER TABLE "Pembelian".master_pembelian_detail OWNER TO postgres;

--
-- TOC entry 1513 (class 1259 OID 3228518)
-- Dependencies: 1929 10
-- Name: master_retur_pembelian; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_retur_pembelian (
    no_faktur text NOT NULL,
    kode_supplier text,
    kode_pegawai text,
    tanggal_faktur timestamp without time zone,
    netto numeric,
    status_lunas boolean,
    status_gudang boolean,
    info text,
    terpakai numeric DEFAULT 0
);


ALTER TABLE "Pembelian".master_retur_pembelian OWNER TO postgres;

--
-- TOC entry 2182 (class 0 OID 0)
-- Dependencies: 1513
-- Name: COLUMN master_retur_pembelian.no_faktur; Type: COMMENT; Schema: Pembelian; Owner: postgres
--

COMMENT ON COLUMN master_retur_pembelian.no_faktur IS 'no_faktur tidak sama dengan no_faktur pada master_pembelian';


--
-- TOC entry 1514 (class 1259 OID 3228524)
-- Dependencies: 10
-- Name: master_retur_pembelian_detail; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_retur_pembelian_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    harga_satuan numeric,
    subtotal numeric,
    info text
);


ALTER TABLE "Pembelian".master_retur_pembelian_detail OWNER TO postgres;

--
-- TOC entry 1515 (class 1259 OID 3228529)
-- Dependencies: 10
-- Name: master_supplier; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_supplier (
    kode_supplier text NOT NULL,
    nama_supplier text,
    alamat_supplier text,
    telp_supplier text,
    info text,
    kontak_person1 text,
    telp_kp1 text,
    kontak_person2 text,
    telp_kp2 text,
    status boolean,
    limit_supplier integer
);


ALTER TABLE "Pembelian".master_supplier OWNER TO postgres;

--
-- TOC entry 1516 (class 1259 OID 3228534)
-- Dependencies: 10
-- Name: master_supplier_detail; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE master_supplier_detail (
    kode_supplier text,
    kode_barang text,
    no_nota text
);


ALTER TABLE "Pembelian".master_supplier_detail OWNER TO postgres;


--
-- TOC entry 1517 (class 1259 OID 3228539)
-- Dependencies: 1930 10
-- Name: purchase_order; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE purchase_order (
    no_po text NOT NULL,
    tanggal timestamp without time zone,
    kode_supplier text,
    kode_pegawai text,
    tersedia boolean DEFAULT false,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Pembelian".purchase_order OWNER TO postgres;

--
-- TOC entry 1518 (class 1259 OID 3228545)
-- Dependencies: 1931 1932 10
-- Name: purchase_order_detail; Type: TABLE; Schema: Pembelian; Owner: postgres; Tablespace: 
--

CREATE TABLE purchase_order_detail (
    no_po text,
    kode_barang text,
    jumlah_barang integer DEFAULT 0,
    kode_satuan text,
    tersedia boolean DEFAULT false,
    info1 text
);


ALTER TABLE "Pembelian".purchase_order_detail OWNER TO postgres;



--
-- TOC entry 1519 (class 1259 OID 3228552)
-- Dependencies: 11
-- Name: canvas; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE canvas (
    kode_canvas text NOT NULL,
    nama_canvas text,
    tanggal_masuk timestamp without time zone,
    wilayah_canvas text,
    status boolean,
    kontak_person1 text,
    telp_kp1 text,
    kontak_person2 text,
    telp_kp2 text,
    limit_canvas numeric,
    plafon_canvas integer,
    jenis_canvas text,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Penjualan".canvas OWNER TO postgres;

--
-- TOC entry 1520 (class 1259 OID 3228557)
-- Dependencies: 11
-- Name: customer; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE customer (
    kode_customer text NOT NULL,
    nama_customer text,
    tanggal_masuk timestamp without time zone,
    jenis_kelamin character(1),
    tanggal_lahir timestamp without time zone,
    alamat_customer text,
    telpon_customer text,
    wilayah_customer text,
    status boolean,
    info text,
    kontak_person1 text,
    telp_kp1 text,
    kontak_person2 text,
    telp_kp2 text,
    limit_customer numeric,
    plafon_customer integer,
    jenis_customer text,
    kode_pos text,
    no_npwp text,
    jenis_pajak text,
    info2 text,
    info3 text
);


ALTER TABLE "Penjualan".customer OWNER TO postgres;


--
-- TOC entry 1521 (class 1259 OID 3228562)
-- Dependencies: 1933 1934 1935 11
-- Name: master_penjualan; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_penjualan (
    no_faktur text NOT NULL,
    kode_customer text,
    tanggal_faktur timestamp without time zone,
    jumlah_barang numeric,
    total_cash numeric DEFAULT 0,
    total_kredit numeric DEFAULT 0,
    status_nota boolean,
    jatuh_tempo timestamp without time zone,
    total_brutto numeric,
    diskon numeric,
    total_netto numeric,
    total_hpp numeric,
    info text,
    kode_pegawai text,
    total_cheque numeric DEFAULT 0,
    kode_sales text,
    no_so text,
    tanggal_so timestamp without time zone,
    no_po text,
    tanggal_po timestamp without time zone,
    diskon_cash numeric,
    no_faktur_pajak text,
    info2 text
);


ALTER TABLE "Penjualan".master_penjualan OWNER TO postgres;


--
-- TOC entry 1522 (class 1259 OID 3228570)
-- Dependencies: 11
-- Name: master_penjualan_detail; Type: TABLE; Schema: Penjualan; Owner: henry; Tablespace: 
--

CREATE TABLE master_penjualan_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    harga_satuan numeric,
    subtotal_brutto numeric,
    diskon1 numeric,
    diskon2 numeric,
    diskon3 numeric,
    diskon4 numeric,
    subtotal_netto numeric,
    harga_pokok numeric,
    info text
);


ALTER TABLE "Penjualan".master_penjualan_detail OWNER TO henry;


--
-- TOC entry 1523 (class 1259 OID 3228575)
-- Dependencies: 11
-- Name: master_penjualan_detail_2; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_penjualan_detail_2 (
    no_faktur text NOT NULL,
    kode_barang text NOT NULL,
    faktur_beli text,
    jumlah numeric NOT NULL
);


ALTER TABLE "Penjualan".master_penjualan_detail_2 OWNER TO postgres;


--
-- TOC entry 1524 (class 1259 OID 3228580)
-- Dependencies: 1936 11
-- Name: master_retur_penjualan; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_retur_penjualan (
    no_faktur text NOT NULL,
    kode_customer text,
    kode_pegawai text,
    tanggal_faktur timestamp without time zone,
    jumlah_barang numeric,
    status_nota boolean,
    total_netto numeric,
    total_hpp numeric,
    info text,
    kode_sales text,
    terpakai numeric DEFAULT 0
);


ALTER TABLE "Penjualan".master_retur_penjualan OWNER TO postgres;

--
-- TOC entry 1525 (class 1259 OID 3228586)
-- Dependencies: 11
-- Name: master_retur_penjualan_detail; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_retur_penjualan_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    harga_satuan numeric,
    subtotal_brutto numeric,
    subtotal_netto numeric,
    harga_pokok numeric,
    info text
);


ALTER TABLE "Penjualan".master_retur_penjualan_detail OWNER TO postgres;


--
-- TOC entry 1526 (class 1259 OID 3228591)
-- Dependencies: 11
-- Name: master_so; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_so (
    no_faktur text NOT NULL,
    kode_customer text,
    tanggal_faktur timestamp without time zone,
    jumlah_barang numeric,
    status_nota boolean,
    jatuh_tempo timestamp without time zone,
    info text,
    kode_pegawai text,
    kode_sales text
);


ALTER TABLE "Penjualan".master_so OWNER TO postgres;


--
-- TOC entry 1527 (class 1259 OID 3228596)
-- Dependencies: 11
-- Name: master_so_detail; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE master_so_detail (
    no_faktur text,
    kode_barang text,
    qpcs_order numeric,
    satuan_order text,
    qpcs_kecil numeric,
    satuan_kecil text,
    harga_satuan numeric,
    subtotal_brutto numeric,
    diskon text,
    subtotal_netto numeric,
    harga_pokok numeric,
    info text
);


ALTER TABLE "Penjualan".master_so_detail OWNER TO postgres;

--
-- TOC entry 1528 (class 1259 OID 3228601)
-- Dependencies: 11
-- Name: rekap_barang; Type: TABLE; Schema: Penjualan; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_barang (
    no_rekap text NOT NULL,
    tanggal timestamp without time zone,
    driver text,
    truck text,
    wilayah text,
    status text,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Penjualan".rekap_barang OWNER TO henry;

--
-- TOC entry 1529 (class 1259 OID 3228606)
-- Dependencies: 11
-- Name: rekap_barang_detail; Type: TABLE; Schema: Penjualan; Owner: henry; Tablespace: 
--

CREATE TABLE rekap_barang_detail (
    no_rekap text NOT NULL,
    no_faktur text,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE "Penjualan".rekap_barang_detail OWNER TO henry;

--
-- TOC entry 1530 (class 1259 OID 3228611)
-- Dependencies: 11
-- Name: sales; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE sales (
    kode_sales text NOT NULL,
    nama_sales text,
    tanggal_masuk text,
    jenis_kelamin character(1),
    tanggal_lahir timestamp without time zone,
    alamat_sales text,
    telpon_sales text,
    wilayah_sales text,
    status boolean,
    info text,
    kontak_person1 text,
    telp_kp1 text,
    kontak_person2 text,
    telp_kp2 text,
    limit_sales integer,
    plafon_sales integer
);


ALTER TABLE "Penjualan".sales OWNER TO postgres;


--
-- TOC entry 1531 (class 1259 OID 3228616)
-- Dependencies: 1937 11
-- Name: sales_order; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE sales_order (
    no_so text NOT NULL,
    tanggal timestamp without time zone,
    kode_customer text,
    kode_sales text,
    tersedia boolean DEFAULT false,
    kode_supplier text,
    kode_pajak text,
    jatuh_tempo timestamp without time zone,
    status text,
    gudang text
);


ALTER TABLE "Penjualan".sales_order OWNER TO postgres;

--
-- TOC entry 2183 (class 0 OID 0)
-- Dependencies: 1531
-- Name: COLUMN sales_order.gudang; Type: COMMENT; Schema: Penjualan; Owner: postgres
--

COMMENT ON COLUMN sales_order.gudang IS 'dari gudang mana';


--
-- TOC entry 1532 (class 1259 OID 3228622)
-- Dependencies: 1938 1939 11
-- Name: sales_order_detail; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE sales_order_detail (
    no_so text NOT NULL,
    kode_barang text NOT NULL,
    jumlah_barang integer DEFAULT 0,
    kode_satuan text NOT NULL,
    tersedia boolean DEFAULT false,
    info text
);


ALTER TABLE "Penjualan".sales_order_detail OWNER TO postgres;


--
-- TOC entry 1533 (class 1259 OID 3228629)
-- Dependencies: 11
-- Name: wilayah; Type: TABLE; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE TABLE wilayah (
    kode text NOT NULL,
    wilayah text NOT NULL,
    info text
);


ALTER TABLE "Penjualan".wilayah OWNER TO postgres;



--
-- TOC entry 1534 (class 1259 OID 3228634)
-- Dependencies: 12
-- Name: akses_cheque; Type: TABLE; Schema: Settings; Owner: henry; Tablespace: 
--

CREATE TABLE akses_cheque (
    no_seri text NOT NULL,
    info1 text,
    info2 text
);


ALTER TABLE "Settings".akses_cheque OWNER TO henry;


--
-- TOC entry 1535 (class 1259 OID 3228639)
-- Dependencies: 12
-- Name: akses_edit_jual; Type: TABLE; Schema: Settings; Owner: postgres; Tablespace: 
--

CREATE TABLE akses_edit_jual (
    no_faktur text NOT NULL,
    status_edit text,
    status_print text,
    info1 text
);


ALTER TABLE "Settings".akses_edit_jual OWNER TO postgres;


--
-- TOC entry 1536 (class 1259 OID 3228644)
-- Dependencies: 12
-- Name: akses_koreksi_stock; Type: TABLE; Schema: Settings; Owner: henry; Tablespace: 
--

CREATE TABLE akses_koreksi_stock (
    no_faktur text NOT NULL,
    info1 text,
    info2 text
);


ALTER TABLE "Settings".akses_koreksi_stock OWNER TO henry;

--
-- TOC entry 1537 (class 1259 OID 3228649)
-- Dependencies: 12
-- Name: akses_piutang; Type: TABLE; Schema: Settings; Owner: henry; Tablespace: 
--

CREATE TABLE akses_piutang (
    no_faktur text NOT NULL,
    info1 text,
    info2 text
);


ALTER TABLE "Settings".akses_piutang OWNER TO henry;

--
-- TOC entry 1538 (class 1259 OID 3228654)
-- Dependencies: 12
-- Name: akses_retur_jual; Type: TABLE; Schema: Settings; Owner: henry; Tablespace: 
--

CREATE TABLE akses_retur_jual (
    no_faktur text NOT NULL,
    info1 text,
    info2 text
);


ALTER TABLE "Settings".akses_retur_jual OWNER TO henry;

--
-- TOC entry 1539 (class 1259 OID 3228659)
-- Dependencies: 12
-- Name: info_usaha; Type: TABLE; Schema: Settings; Owner: postgres; Tablespace: 
--

CREATE TABLE info_usaha (
    nama text,
    data text
);


ALTER TABLE "Settings".info_usaha OWNER TO postgres;


--
-- TOC entry 1540 (class 1259 OID 3228664)
-- Dependencies: 12
-- Name: jurnal_transaksi; Type: TABLE; Schema: Settings; Owner: postgres; Tablespace: 
--

CREATE TABLE jurnal_transaksi (
    waktu timestamp without time zone,
    kode_transaksi text,
    data text
);


ALTER TABLE "Settings".jurnal_transaksi OWNER TO postgres;


--
-- TOC entry 1541 (class 1259 OID 3228669)
-- Dependencies: 12
-- Name: print_nota; Type: TABLE; Schema: Settings; Owner: henry; Tablespace: 
--

CREATE TABLE print_nota (
    no_faktur text NOT NULL,
    data text,
    info1 text,
    info2 text
);


ALTER TABLE "Settings".print_nota OWNER TO henry;

--
-- TOC entry 1542 (class 1259 OID 3228674)
-- Dependencies: 12
-- Name: setting; Type: TABLE; Schema: Settings; Owner: postgres; Tablespace: 
--

CREATE TABLE setting (
    nama text,
    data text
);


ALTER TABLE "Settings".setting OWNER TO postgres;


--
-- TOC entry 1454 (class 1259 OID 3227270)
-- Dependencies: 13
-- Name: bank; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE bank (
    kode_bank text NOT NULL,
    nama_bank text NOT NULL,
    info text
);


ALTER TABLE public.bank OWNER TO postgres;

--
-- TOC entry 1455 (class 1259 OID 3227275)
-- Dependencies: 1874 1875 13
-- Name: buku_besar; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE buku_besar (
    kode_buku_besar text NOT NULL,
    kode_akunting text,
    tanggal_akunting timestamp without time zone,
    kode_pegawai text,
    subjek text,
    predikat text,
    objek text,
    debet numeric DEFAULT 0,
    kredit numeric DEFAULT 0,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE public.buku_besar OWNER TO postgres;

--
-- TOC entry 2184 (class 0 OID 0)
-- Dependencies: 1455
-- Name: COLUMN buku_besar.subjek; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN buku_besar.subjek IS 'kode_sup / kode_cust';


--
-- TOC entry 2185 (class 0 OID 0)
-- Dependencies: 1455
-- Name: COLUMN buku_besar.predikat; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN buku_besar.predikat IS 'what to do ';


--
-- TOC entry 2186 (class 0 OID 0)
-- Dependencies: 1455
-- Name: COLUMN buku_besar.objek; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN buku_besar.objek IS 'no nota jual/beli/retur beli/retur jual';



--
-- TOC entry 1456 (class 1259 OID 3227282)
-- Dependencies: 1876 1877 13
-- Name: cek; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cek (
    kode text NOT NULL,
    no_seri text,
    subjek text,
    objek text,
    bank text,
    jumlah numeric,
    tanggal_terima timestamp without time zone,
    jatuh_tempo timestamp without time zone,
    tipe_cek text,
    cair boolean,
    info text,
    jenis text,
    info_pembayaran text,
    kode_pegawai text,
    terpakai numeric DEFAULT 0,
    habis boolean DEFAULT false
);


ALTER TABLE public.cek OWNER TO postgres;


--
-- TOC entry 1457 (class 1259 OID 3227289)
-- Dependencies: 13
-- Name: cek_detail; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cek_detail (
    kode text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE public.cek_detail OWNER TO postgres;

--
-- TOC entry 1458 (class 1259 OID 3227294)
-- Dependencies: 13
-- Name: daftar_akunting; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_akunting (
    kode_akunting text NOT NULL,
    nama_akunting text,
    jenis_akunting text,
    info_akunting text
);


ALTER TABLE public.daftar_akunting OWNER TO postgres;

--
-- TOC entry 2187 (class 0 OID 0)
-- Dependencies: 1458
-- Name: COLUMN daftar_akunting.kode_akunting; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN daftar_akunting.kode_akunting IS 'misal 001,002';


--
-- TOC entry 1459 (class 1259 OID 3227299)
-- Dependencies: 13
-- Name: daftar_akunting_posting; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_akunting_posting (
    kode_supplier text NOT NULL,
    penjualan text,
    persediaan text,
    hpp text,
    info1 text,
    info2 text
);


ALTER TABLE public.daftar_akunting_posting OWNER TO postgres;

--
-- TOC entry 1460 (class 1259 OID 3227304)
-- Dependencies: 13
-- Name: daftar_bank_internal; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE daftar_bank_internal (
    kode_bank text NOT NULL,
    nama_bank text,
    no_rek text,
    info1 text,
    info2 text,
    info3 text
);


ALTER TABLE public.daftar_bank_internal OWNER TO postgres;


--
-- TOC entry 1461 (class 1259 OID 3227309)
-- Dependencies: 1878 1879 1880 13
-- Name: kartu_hutang; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE kartu_hutang (
    kode_customer text,
    no_bukti text,
    uraian text,
    tanggal timestamp without time zone,
    tanggal_lunas timestamp without time zone,
    penjualan numeric DEFAULT 0 NOT NULL,
    pelunasan numeric DEFAULT 0 NOT NULL,
    saldo numeric DEFAULT 0 NOT NULL
);


ALTER TABLE public.kartu_hutang OWNER TO postgres;

--
-- TOC entry 1462 (class 1259 OID 3227317)
-- Dependencies: 1881 1882 1883 13
-- Name: kartu_piutang; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE kartu_piutang (
    kode_customer text,
    no_bukti text,
    uraian text,
    tanggal timestamp without time zone,
    tanggal_lunas timestamp without time zone,
    penjualan numeric DEFAULT 0 NOT NULL,
    pelunasan numeric DEFAULT 0 NOT NULL,
    saldo numeric DEFAULT 0 NOT NULL
);


ALTER TABLE public.kartu_piutang OWNER TO postgres;


--
-- TOC entry 1463 (class 1259 OID 3227325)
-- Dependencies: 13
-- Name: rekap_penagihan; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE rekap_penagihan (
    kode_dpp text NOT NULL,
    kode_sales text,
    wilayah text,
    tanggal timestamp without time zone,
    bkm text,
    info1 text,
    info2 text,
    info3 text,
    status text
);


ALTER TABLE public.rekap_penagihan OWNER TO postgres;

--
-- TOC entry 1464 (class 1259 OID 3227330)
-- Dependencies: 13
-- Name: rekap_penagihan_detail; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE rekap_penagihan_detail (
    kode_dpp text NOT NULL,
    kode_customer text,
    kode_wilayah text,
    no_faktur text,
    tgl_terima text,
    jumlah_tag numeric,
    akumulasi numeric,
    ditagihkan numeric,
    pembayaran text,
    retur_pot text,
    kembali text,
    keterangan text
);


ALTER TABLE public.rekap_penagihan_detail OWNER TO postgres;

--
-- TOC entry 1465 (class 1259 OID 3227335)
-- Dependencies: 13
-- Name: rekap_spp; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE rekap_spp (
    kode_spp text NOT NULL,
    tanggal timestamp without time zone,
    bukti_kas text,
    info1 text,
    info2 text,
    info3 text,
    status text
);


ALTER TABLE public.rekap_spp OWNER TO postgres;

--
-- TOC entry 1466 (class 1259 OID 3227340)
-- Dependencies: 13
-- Name: rekap_spp_detail; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE rekap_spp_detail (
    kode_spp text NOT NULL,
    kode_supplier text,
    no_faktur text,
    tgl_terima text,
    jumlah_tag numeric,
    akumulasi numeric,
    ditagihkan numeric,
    pembayaran text,
    retur_pot text,
    keterangan text
);


ALTER TABLE public.rekap_spp_detail OWNER TO postgres;

--
-- TOC entry 1467 (class 1259 OID 3227345)
-- Dependencies: 13
-- Name: retur_detail; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE retur_detail (
    no_faktur text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE public.retur_detail OWNER TO postgres;

--
-- TOC entry 1543 (class 1259 OID 3228679)
-- Dependencies: 13
-- Name: setting; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE setting (
    kode text NOT NULL,
    nama text
);


ALTER TABLE public.setting OWNER TO postgres;

--
-- TOC entry 1468 (class 1259 OID 3227350)
-- Dependencies: 13
-- Name: transfer_detail; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE transfer_detail (
    kode text,
    objek text,
    no_bukti text,
    jumlah numeric,
    info1 text,
    info2 text
);


ALTER TABLE public.transfer_detail OWNER TO postgres;


--
-- TOC entry 2075 (class 0 OID 3228253)
-- Dependencies: 1469
-- Data for Name: bank; Type: TABLE DATA; Schema: Akunting; Owner: postgres
--

COPY bank (kode_bank, nama_bank, info) FROM stdin;
\.


--
-- TOC entry 2076 (class 0 OID 3228258)
-- Dependencies: 1470
-- Data for Name: buku_besar; Type: TABLE DATA; Schema: Akunting; Owner: postgres
--

COPY buku_besar (kode_buku_besar, kode_akunting, tanggal_akunting, kode_pegawai, subjek, predikat, objek, debet, kredit, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2077 (class 0 OID 3228265)
-- Dependencies: 1471
-- Data for Name: cek; Type: TABLE DATA; Schema: Akunting; Owner: postgres
--

COPY cek (kode, no_seri, subjek, objek, bank, jumlah, tanggal_terima, jatuh_tempo, tipe_cek, cair, info, jenis, info_pembayaran, kode_pegawai, terpakai, habis) FROM stdin;
\.


--
-- TOC entry 2078 (class 0 OID 3228272)
-- Dependencies: 1472
-- Data for Name: cek_detail; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY cek_detail (kode, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.


--
-- TOC entry 2079 (class 0 OID 3228277)
-- Dependencies: 1473
-- Data for Name: daftar_akunting; Type: TABLE DATA; Schema: Akunting; Owner: postgres
--

COPY daftar_akunting (kode_akunting, nama_akunting, jenis_akunting, info_akunting) FROM stdin;
\.


--
-- TOC entry 2080 (class 0 OID 3228282)
-- Dependencies: 1474
-- Data for Name: daftar_akunting_posting; Type: TABLE DATA; Schema: Akunting; Owner: postgres
--

COPY daftar_akunting_posting (kode_supplier, penjualan, persediaan, hpp, info1, info2) FROM stdin;
\.


--
-- TOC entry 2081 (class 0 OID 3228287)
-- Dependencies: 1475
-- Data for Name: daftar_bank_internal; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY daftar_bank_internal (kode_bank, nama_bank, no_rek, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2082 (class 0 OID 3228292)
-- Dependencies: 1476
-- Data for Name: kartu_hutang; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY kartu_hutang (kode_customer, no_bukti, uraian, tanggal, tanggal_lunas, penjualan, pelunasan, saldo) FROM stdin;
\.


--
-- TOC entry 2083 (class 0 OID 3228300)
-- Dependencies: 1477
-- Data for Name: kartu_piutang; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY kartu_piutang (kode_customer, no_bukti, uraian, tanggal, tanggal_lunas, penjualan, pelunasan, saldo) FROM stdin;
\.


--
-- TOC entry 2084 (class 0 OID 3228308)
-- Dependencies: 1478
-- Data for Name: rekap_penagihan; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY rekap_penagihan (kode_dpp, kode_sales, wilayah, tanggal, bkm, info1, info2, info3, status) FROM stdin;
\.


--
-- TOC entry 2085 (class 0 OID 3228313)
-- Dependencies: 1479
-- Data for Name: rekap_penagihan_detail; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY rekap_penagihan_detail (kode_dpp, kode_customer, kode_wilayah, no_faktur, tgl_terima, jumlah_tag, akumulasi, ditagihkan, pembayaran, retur_pot, kembali, keterangan) FROM stdin;
\.


--
-- TOC entry 2086 (class 0 OID 3228318)
-- Dependencies: 1480
-- Data for Name: rekap_spp; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY rekap_spp (kode_spp, tanggal, bukti_kas, info1, info2, info3, status) FROM stdin;
\.


--
-- TOC entry 2087 (class 0 OID 3228323)
-- Dependencies: 1481
-- Data for Name: rekap_spp_detail; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY rekap_spp_detail (kode_spp, kode_supplier, no_faktur, tgl_terima, jumlah_tag, akumulasi, ditagihkan, pembayaran, retur_pot, keterangan) FROM stdin;
\.


--
-- TOC entry 2088 (class 0 OID 3228328)
-- Dependencies: 1482
-- Data for Name: retur_detail; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY retur_detail (no_faktur, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.


--
-- TOC entry 2089 (class 0 OID 3228333)
-- Dependencies: 1483
-- Data for Name: transfer_detail; Type: TABLE DATA; Schema: Akunting; Owner: henry
--

COPY transfer_detail (kode, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.



--
-- TOC entry 2090 (class 0 OID 3228338)
-- Dependencies: 1484
-- Data for Name: berita; Type: TABLE DATA; Schema: Groupware; Owner: postgres
--

COPY berita (kode, kode_pegawai, tanggal, judul, isi, status, info) FROM stdin;
\.


--
-- TOC entry 2091 (class 0 OID 3228343)
-- Dependencies: 1485
-- Data for Name: pesan; Type: TABLE DATA; Schema: Groupware; Owner: postgres
--

COPY pesan (kode, kode_pegawai, tanggal, judul, isi, status, tujuan, info) FROM stdin;
\.


--
-- TOC entry 2092 (class 0 OID 3228348)
-- Dependencies: 1486
-- Data for Name: todo; Type: TABLE DATA; Schema: Groupware; Owner: postgres
--

COPY todo (kode, kode_pegawai, tanggal, judul, isi, status, info) FROM stdin;
\.



--
-- TOC entry 2093 (class 0 OID 3228353)
-- Dependencies: 1487
-- Data for Name: barang; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY barang (kode_barang, kode_barcode, nama_barang, nickname, gambar_barang, tag, status_barang, limit_barang, info, tanggal_masuk, harga_pokok, kode_supplier) FROM stdin;
\.


--
-- TOC entry 2094 (class 0 OID 3228358)
-- Dependencies: 1488
-- Data for Name: daftar_diskon; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_diskon (kode_diskon, kode_jenis_diskon, nama_diskon, periode_awal, periode_akhir) FROM stdin;
\.


--
-- TOC entry 2095 (class 0 OID 3228363)
-- Dependencies: 1489
-- Data for Name: daftar_diskon_detail; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_diskon_detail (kode_diskon, ambil_min, ambil_max, diskon) FROM stdin;
\.


--
-- TOC entry 2096 (class 0 OID 3228371)
-- Dependencies: 1490
-- Data for Name: daftar_harga; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_harga (kode_barang, kode_satuan, jumlah_barang, harga_barang, kode_diskon_1, kode_diskon_2, kode_diskon_3, kode_diskon_4, harga_barang2, harga_barang3, harga_barang4) FROM stdin;
\.


--
-- TOC entry 2097 (class 0 OID 3228378)
-- Dependencies: 1491
-- Data for Name: daftar_jenis_diskon; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_jenis_diskon (kode_jenis, nama_jenis) FROM stdin;
\.


--
-- TOC entry 2098 (class 0 OID 3228383)
-- Dependencies: 1492
-- Data for Name: daftar_satuan; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_satuan (kode_satuan, nama_satuan, info) FROM stdin;
\.


--
-- TOC entry 2099 (class 0 OID 3228388)
-- Dependencies: 1493
-- Data for Name: daftar_satuan_barang; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_satuan_barang (kode_barang, kode_satuan, isi_satuan, hierarki_satuan, berat, dimensi) FROM stdin;
\.


--
-- TOC entry 2100 (class 0 OID 3228393)
-- Dependencies: 1494
-- Data for Name: daftar_tag; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY daftar_tag (tag, info) FROM stdin;
\.


--
-- TOC entry 2101 (class 0 OID 3228398)
-- Dependencies: 1495
-- Data for Name: gudang; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY gudang (kode_barang, subkode_barang, no_faktur_beli, tanggal_masuk, harga_beli, jumlah, alokasi) FROM stdin;
\.


--
-- TOC entry 2102 (class 0 OID 3228403)
-- Dependencies: 1496
-- Data for Name: gudang_temp; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY gudang_temp (kode_barang, subkode_barang, no_faktur_beli, tanggal_masuk, harga_beli, jumlah, alokasi, no_faktur) FROM stdin;
\.


--
-- TOC entry 2103 (class 0 OID 3228408)
-- Dependencies: 1497
-- Data for Name: kartu_stock; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY kartu_stock (kode_barang, no_nota, uraian, tanggal, qty_beli, harga_beli, total_beli, qty_jual, harga_jual, total_jual, qty_akhir, harga_akhir, total_akhir) FROM stdin;
\.


--
-- TOC entry 2104 (class 0 OID 3228422)
-- Dependencies: 1498
-- Data for Name: kartu_stock_2; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY kartu_stock_2 (kode_barang, no_nota, uraian, tanggal, qty_beli, harga_beli, total_beli, qty_jual, harga_jual, total_jual, qty_akhir, harga_akhir, total_akhir) FROM stdin;
\.


--
-- TOC entry 2105 (class 0 OID 3228436)
-- Dependencies: 1499
-- Data for Name: kartu_stock_rsk; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY kartu_stock_rsk (kode_barang, no_nota, uraian, tanggal, qty_beli, harga_beli, total_beli, qty_jual, harga_jual, total_jual, qty_akhir, harga_akhir, total_akhir) FROM stdin;
\.


--
-- TOC entry 2106 (class 0 OID 3228450)
-- Dependencies: 1500
-- Data for Name: master_koreksi; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY master_koreksi (no_faktur, kode_pegawai, tanggal_faktur, sumber, tipe, netto, info, info2, info3, status_nota) FROM stdin;
\.


--
-- TOC entry 2107 (class 0 OID 3228455)
-- Dependencies: 1501
-- Data for Name: master_koreksi_detail; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY master_koreksi_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, tipe_koreksi, harga_satuan, subtotal, info1, info2) FROM stdin;
\.


--
-- TOC entry 2108 (class 0 OID 3228460)
-- Dependencies: 1502
-- Data for Name: master_mutasi; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY master_mutasi (no_faktur_mutasi, kode_pegawai, tanggal_mutasi, sumber, tujuan, info) FROM stdin;
\.


--
-- TOC entry 2109 (class 0 OID 3228465)
-- Dependencies: 1503
-- Data for Name: master_mutasi_detail; Type: TABLE DATA; Schema: Gudang; Owner: postgres
--

COPY master_mutasi_detail (kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, no_faktur_mutasi, info) FROM stdin;
\.


--
-- TOC entry 2110 (class 0 OID 3228470)
-- Dependencies: 1504
-- Data for Name: master_promo_group; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY master_promo_group (kode_p_g, tag, info) FROM stdin;
\.


--
-- TOC entry 2111 (class 0 OID 3228475)
-- Dependencies: 1505
-- Data for Name: master_promo_group_detail; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY master_promo_group_detail (kode_p_g, ambil_min, ambil_max, tipe_diskon, diskon) FROM stdin;
\.


--
-- TOC entry 2112 (class 0 OID 3228483)
-- Dependencies: 1506
-- Data for Name: stock_opname; Type: TABLE DATA; Schema: Gudang; Owner: henry
--

COPY stock_opname (kode_barang, tanggal_masuk, harga_beli, jumlah, alokasi, info) FROM stdin;
\.



--
-- TOC entry 2113 (class 0 OID 3228488)
-- Dependencies: 1507
-- Data for Name: log_login; Type: TABLE DATA; Schema: Keamanan; Owner: postgres
--

COPY log_login (ip_address, nama_user, jam, info) FROM stdin;
\.


--
-- TOC entry 2114 (class 0 OID 3228493)
-- Dependencies: 1508
-- Data for Name: log_number; Type: TABLE DATA; Schema: Keamanan; Owner: postgres
--

COPY log_number (ip_address, nama_user, jam, info) FROM stdin;
127.0.0.1	henry	14/11/2010 - 21:53:1	Login Ulang Sukses
\.



--
-- TOC entry 2115 (class 0 OID 3228498)
-- Dependencies: 1509
-- Data for Name: grup; Type: TABLE DATA; Schema: Pegawai; Owner: postgres
--

COPY grup (nama, deskripsi, status, akses, hak_akses) FROM stdin;
ownzx		Aktif	Pemilik	[\n\t{\n\t\t"nama":"Home",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t{\n\t\t\t\t"nama":"Hari Ini",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../home/hari_ini.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Kegiatan",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../home/kegiatan.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Berita",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../home/berita.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Pesan",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../home/pesan.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Profil",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../home/profil.php"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"nama":"Master",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t\n\t\t\t{\n\t\t\t\t"nama":"Barang",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Barang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../master/master_barang.php"\n\t\t\t\t\t},\n\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Hirarki, Harga jual & Diskon",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../master/master_hirarki.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Lain-lain",\n\t\t\t\t\t\t"class":"container",\n\t\t\t\t\t\t"submenu":[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t"nama":"Satuan",\n\t\t\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t\t\t"value":"../master/master_satuan.php"\n\t\t\t\t\t\t\t},\n\t\t\t\t\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t"nama":"Tag",\n\t\t\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t\t\t"value":"../master/master_tag.php"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Wilayah",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_wilayah.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Customer",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_customer.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Supplier",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_supplier.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Sales",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_sales.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Bank",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_bank.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Daftar Akunting",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../master/master_akunting.php"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"nama":"Transaksi",\n\t\t"class":"container",\n\t\t"submenu":[\t\t\t\n\t\t\t{\n\t\t\t\t"nama":"Pembelian",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Purchase Order",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../pembelian/po_pembelian.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Pembelian",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../pembelian/create_pembelian.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Retur Pembelian",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../pembelian/retur_pembelian.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Penjualan",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Sales Order ",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/so_penjualan.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Edit SO",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/edit_so.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Confirm SO",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/confirm_so.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Edit Penjualan",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/edit_penjualan.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Confirm Penjualan",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/confirm_penjualan.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Retur Penjualan",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../penjualan/retur_penjualan.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Mutasi Barang ",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../penjualan/mutasi_barang.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Koreksi Stock",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../penjualan/koreksi_stock.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Stock Opname",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../penjualan/laporan_stok_opname.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Rekap Kirim Barang",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../penjualan/laporan_rekap_barang.php"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"nama":"Laporan",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t{\n\t\t\t\t"nama":"Barang ",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Barang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_barang.php"\n\t\t\t\t\t},\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Gudang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_gudang.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Kartu Stock",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/kartu_stock.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Kartu Stock Rusak",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/kartu_stock_rusak.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Koreksi Stock",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_koreksi_stock.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Customer",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_customer.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Supplier",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_supplier.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Pembelian",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"PO",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_po.php"\n\t\t\t\t\t},\t\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Pembelian",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_pembelian.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Penjualan",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"SO",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_so.php"\n\t\t\t\t\t},\t\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Penjualan",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_penjualan.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Penjualan Barang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_penjualan_detail.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Penjualan Customer",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../laporan/laporan_penjualan_cust.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Retur Pembelian",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_retur_pembelian.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Retur Penjualan",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_retur_penjualan.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Mutasi Barang",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_mutasi.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Faktur Pajak",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/laporan_faktur_pajak.php"\n\t\t\t\t\t\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"DashBoard",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../laporan/login_setting.php"\n\t\t\t\t\t\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"nama":"Akuntansi",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t\n\t\t\t{\n\t\t\t\t"nama":"Piutang",\n\t\t\t\t"class":"container",\n\t\t\t\t"submenu":[\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"DPP",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../akunting/rekap_penagihan.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Pelunasan DPP",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../akunting/pelunasan_dpp.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Pelunasan Piutang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../akunting/pelunasan_piutang.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Kartu Piutang",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../akunting/kartu_piutang.php"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"nama":"Daftar Pembayaran",\n\t\t\t\t\t\t"class":"node",\n\t\t\t\t\t\t"value":"../akunting/pembayaran_cust.php"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Transaksi Pendapatan Lain",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"penjualan/transaksi_pendapatan_lain_lain.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Transaksi Pelunasan Pembelian",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"pembelian/transaksi_lunas_beli.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Transaksi Pelunasan Penjualan",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"penjualan/transaksi_pelunasan_penjualan.php"\n\t\t\t}\n\t\t]\n\t},\n\t\n\t\n\t{\n\t\t"nama":"Administrasi",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t{\n\t\t\t\t"nama":"Administrasi Group",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../security/group_admin/group_add.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Administrasi User",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../security/user_admin/user_add.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Daftar User Aktif",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../security/login/login_viewer.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Log",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../security/login/log_login_viewer.php"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"nama":"Setting",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../setting/settings.php"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"nama":"About",\n\t\t"class":"node",\n\t\t"value":"../about/about.php"\n\t},\t\t\n\t{\n\t\t"nama":"Log Out",\n\t\t"class":"container",\n\t\t"submenu":[\n\t\t\t{\n\t\t\t\t"nama":"Keluar",\n\t\t\t\t"class":"node",\n\t\t\t\t"value":"../logout/menu_logout.php"\n\t\t\t}\n\t\t]\t\n\t}\n]\n
\.



--
-- TOC entry 2117 (class 0 OID 3228508)
-- Dependencies: 1511
-- Data for Name: master_pembelian; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_pembelian (no_faktur, no_faktur_asli, kode_pegawai, kode_supplier, tanggal_faktur, jatuh_tempo, netto, status_lunas, status_gudang, info, no_po, surat_jalan, no_truck, ekspedisi, no_faktur_pajak, tanggal_faktur_pajak, bulan_lapor, tahun_lapor, tanggal_terima_barang) FROM stdin;
\.


--
-- TOC entry 2118 (class 0 OID 3228513)
-- Dependencies: 1512
-- Data for Name: master_pembelian_detail; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_pembelian_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, harga_satuan, subtotal, diskon, info) FROM stdin;
\.


--
-- TOC entry 2119 (class 0 OID 3228518)
-- Dependencies: 1513
-- Data for Name: master_retur_pembelian; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_retur_pembelian (no_faktur, kode_supplier, kode_pegawai, tanggal_faktur, netto, status_lunas, status_gudang, info, terpakai) FROM stdin;
\.


--
-- TOC entry 2120 (class 0 OID 3228524)
-- Dependencies: 1514
-- Data for Name: master_retur_pembelian_detail; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_retur_pembelian_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, harga_satuan, subtotal, info) FROM stdin;
\.


--
-- TOC entry 2121 (class 0 OID 3228529)
-- Dependencies: 1515
-- Data for Name: master_supplier; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_supplier (kode_supplier, nama_supplier, alamat_supplier, telp_supplier, info, kontak_person1, telp_kp1, kontak_person2, telp_kp2, status, limit_supplier) FROM stdin;
\.


--
-- TOC entry 2122 (class 0 OID 3228534)
-- Dependencies: 1516
-- Data for Name: master_supplier_detail; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY master_supplier_detail (kode_supplier, kode_barang, no_nota) FROM stdin;
\.


--
-- TOC entry 2123 (class 0 OID 3228539)
-- Dependencies: 1517
-- Data for Name: purchase_order; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY purchase_order (no_po, tanggal, kode_supplier, kode_pegawai, tersedia, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2124 (class 0 OID 3228545)
-- Dependencies: 1518
-- Data for Name: purchase_order_detail; Type: TABLE DATA; Schema: Pembelian; Owner: postgres
--

COPY purchase_order_detail (no_po, kode_barang, jumlah_barang, kode_satuan, tersedia, info1) FROM stdin;
\.



--
-- TOC entry 2125 (class 0 OID 3228552)
-- Dependencies: 1519
-- Data for Name: canvas; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY canvas (kode_canvas, nama_canvas, tanggal_masuk, wilayah_canvas, status, kontak_person1, telp_kp1, kontak_person2, telp_kp2, limit_canvas, plafon_canvas, jenis_canvas, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2126 (class 0 OID 3228557)
-- Dependencies: 1520
-- Data for Name: customer; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY customer (kode_customer, nama_customer, tanggal_masuk, jenis_kelamin, tanggal_lahir, alamat_customer, telpon_customer, wilayah_customer, status, info, kontak_person1, telp_kp1, kontak_person2, telp_kp2, limit_customer, plafon_customer, jenis_customer, kode_pos, no_npwp, jenis_pajak, info2, info3) FROM stdin;
\.


--
-- TOC entry 2127 (class 0 OID 3228562)
-- Dependencies: 1521
-- Data for Name: master_penjualan; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_penjualan (no_faktur, kode_customer, tanggal_faktur, jumlah_barang, total_cash, total_kredit, status_nota, jatuh_tempo, total_brutto, diskon, total_netto, total_hpp, info, kode_pegawai, total_cheque, kode_sales, no_so, tanggal_so, no_po, tanggal_po, diskon_cash, no_faktur_pajak, info2) FROM stdin;
\.


--
-- TOC entry 2128 (class 0 OID 3228570)
-- Dependencies: 1522
-- Data for Name: master_penjualan_detail; Type: TABLE DATA; Schema: Penjualan; Owner: henry
--

COPY master_penjualan_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, harga_satuan, subtotal_brutto, diskon1, diskon2, diskon3, diskon4, subtotal_netto, harga_pokok, info) FROM stdin;
\.


--
-- TOC entry 2129 (class 0 OID 3228575)
-- Dependencies: 1523
-- Data for Name: master_penjualan_detail_2; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_penjualan_detail_2 (no_faktur, kode_barang, faktur_beli, jumlah) FROM stdin;
\.


--
-- TOC entry 2130 (class 0 OID 3228580)
-- Dependencies: 1524
-- Data for Name: master_retur_penjualan; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_retur_penjualan (no_faktur, kode_customer, kode_pegawai, tanggal_faktur, jumlah_barang, status_nota, total_netto, total_hpp, info, kode_sales, terpakai) FROM stdin;
\.


--
-- TOC entry 2131 (class 0 OID 3228586)
-- Dependencies: 1525
-- Data for Name: master_retur_penjualan_detail; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_retur_penjualan_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, harga_satuan, subtotal_brutto, subtotal_netto, harga_pokok, info) FROM stdin;
\.


--
-- TOC entry 2132 (class 0 OID 3228591)
-- Dependencies: 1526
-- Data for Name: master_so; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_so (no_faktur, kode_customer, tanggal_faktur, jumlah_barang, status_nota, jatuh_tempo, info, kode_pegawai, kode_sales) FROM stdin;
\.


--
-- TOC entry 2133 (class 0 OID 3228596)
-- Dependencies: 1527
-- Data for Name: master_so_detail; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY master_so_detail (no_faktur, kode_barang, qpcs_order, satuan_order, qpcs_kecil, satuan_kecil, harga_satuan, subtotal_brutto, diskon, subtotal_netto, harga_pokok, info) FROM stdin;
\.


--
-- TOC entry 2134 (class 0 OID 3228601)
-- Dependencies: 1528
-- Data for Name: rekap_barang; Type: TABLE DATA; Schema: Penjualan; Owner: henry
--

COPY rekap_barang (no_rekap, tanggal, driver, truck, wilayah, status, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2135 (class 0 OID 3228606)
-- Dependencies: 1529
-- Data for Name: rekap_barang_detail; Type: TABLE DATA; Schema: Penjualan; Owner: henry
--

COPY rekap_barang_detail (no_rekap, no_faktur, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2136 (class 0 OID 3228611)
-- Dependencies: 1530
-- Data for Name: sales; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY sales (kode_sales, nama_sales, tanggal_masuk, jenis_kelamin, tanggal_lahir, alamat_sales, telpon_sales, wilayah_sales, status, info, kontak_person1, telp_kp1, kontak_person2, telp_kp2, limit_sales, plafon_sales) FROM stdin;
\.


--
-- TOC entry 2137 (class 0 OID 3228616)
-- Dependencies: 1531
-- Data for Name: sales_order; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY sales_order (no_so, tanggal, kode_customer, kode_sales, tersedia, kode_supplier, kode_pajak, jatuh_tempo, status, gudang) FROM stdin;
\.


--
-- TOC entry 2138 (class 0 OID 3228622)
-- Dependencies: 1532
-- Data for Name: sales_order_detail; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY sales_order_detail (no_so, kode_barang, jumlah_barang, kode_satuan, tersedia, info) FROM stdin;
\.


--
-- TOC entry 2139 (class 0 OID 3228629)
-- Dependencies: 1533
-- Data for Name: wilayah; Type: TABLE DATA; Schema: Penjualan; Owner: postgres
--

COPY wilayah (kode, wilayah, info) FROM stdin;
\.



--
-- TOC entry 2140 (class 0 OID 3228634)
-- Dependencies: 1534
-- Data for Name: akses_cheque; Type: TABLE DATA; Schema: Settings; Owner: henry
--

COPY akses_cheque (no_seri, info1, info2) FROM stdin;
\.


--
-- TOC entry 2141 (class 0 OID 3228639)
-- Dependencies: 1535
-- Data for Name: akses_edit_jual; Type: TABLE DATA; Schema: Settings; Owner: postgres
--

COPY akses_edit_jual (no_faktur, status_edit, status_print, info1) FROM stdin;
\.


--
-- TOC entry 2142 (class 0 OID 3228644)
-- Dependencies: 1536
-- Data for Name: akses_koreksi_stock; Type: TABLE DATA; Schema: Settings; Owner: henry
--

COPY akses_koreksi_stock (no_faktur, info1, info2) FROM stdin;
\.


--
-- TOC entry 2143 (class 0 OID 3228649)
-- Dependencies: 1537
-- Data for Name: akses_piutang; Type: TABLE DATA; Schema: Settings; Owner: henry
--

COPY akses_piutang (no_faktur, info1, info2) FROM stdin;
\.


--
-- TOC entry 2144 (class 0 OID 3228654)
-- Dependencies: 1538
-- Data for Name: akses_retur_jual; Type: TABLE DATA; Schema: Settings; Owner: henry
--

COPY akses_retur_jual (no_faktur, info1, info2) FROM stdin;
\.


--
-- TOC entry 2145 (class 0 OID 3228659)
-- Dependencies: 1539
-- Data for Name: info_usaha; Type: TABLE DATA; Schema: Settings; Owner: postgres
--

COPY info_usaha (nama, data) FROM stdin;
\.


--
-- TOC entry 2146 (class 0 OID 3228664)
-- Dependencies: 1540
-- Data for Name: jurnal_transaksi; Type: TABLE DATA; Schema: Settings; Owner: postgres
--

COPY jurnal_transaksi (waktu, kode_transaksi, data) FROM stdin;
\.


--
-- TOC entry 2147 (class 0 OID 3228669)
-- Dependencies: 1541
-- Data for Name: print_nota; Type: TABLE DATA; Schema: Settings; Owner: henry
--

COPY print_nota (no_faktur, data, info1, info2) FROM stdin;
\.


--
-- TOC entry 2148 (class 0 OID 3228674)
-- Dependencies: 1542
-- Data for Name: setting; Type: TABLE DATA; Schema: Settings; Owner: postgres
--

COPY setting (nama, data) FROM stdin;
\.



--
-- TOC entry 2060 (class 0 OID 3227270)
-- Dependencies: 1454
-- Data for Name: bank; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY bank (kode_bank, nama_bank, info) FROM stdin;
\.


--
-- TOC entry 2061 (class 0 OID 3227275)
-- Dependencies: 1455
-- Data for Name: buku_besar; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY buku_besar (kode_buku_besar, kode_akunting, tanggal_akunting, kode_pegawai, subjek, predikat, objek, debet, kredit, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2062 (class 0 OID 3227282)
-- Dependencies: 1456
-- Data for Name: cek; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY cek (kode, no_seri, subjek, objek, bank, jumlah, tanggal_terima, jatuh_tempo, tipe_cek, cair, info, jenis, info_pembayaran, kode_pegawai, terpakai, habis) FROM stdin;
\.


--
-- TOC entry 2063 (class 0 OID 3227289)
-- Dependencies: 1457
-- Data for Name: cek_detail; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY cek_detail (kode, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.


--
-- TOC entry 2064 (class 0 OID 3227294)
-- Dependencies: 1458
-- Data for Name: daftar_akunting; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY daftar_akunting (kode_akunting, nama_akunting, jenis_akunting, info_akunting) FROM stdin;
\.


--
-- TOC entry 2065 (class 0 OID 3227299)
-- Dependencies: 1459
-- Data for Name: daftar_akunting_posting; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY daftar_akunting_posting (kode_supplier, penjualan, persediaan, hpp, info1, info2) FROM stdin;
\.


--
-- TOC entry 2066 (class 0 OID 3227304)
-- Dependencies: 1460
-- Data for Name: daftar_bank_internal; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY daftar_bank_internal (kode_bank, nama_bank, no_rek, info1, info2, info3) FROM stdin;
\.


--
-- TOC entry 2067 (class 0 OID 3227309)
-- Dependencies: 1461
-- Data for Name: kartu_hutang; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY kartu_hutang (kode_customer, no_bukti, uraian, tanggal, tanggal_lunas, penjualan, pelunasan, saldo) FROM stdin;
\.


--
-- TOC entry 2068 (class 0 OID 3227317)
-- Dependencies: 1462
-- Data for Name: kartu_piutang; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY kartu_piutang (kode_customer, no_bukti, uraian, tanggal, tanggal_lunas, penjualan, pelunasan, saldo) FROM stdin;
\.


--
-- TOC entry 2069 (class 0 OID 3227325)
-- Dependencies: 1463
-- Data for Name: rekap_penagihan; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY rekap_penagihan (kode_dpp, kode_sales, wilayah, tanggal, bkm, info1, info2, info3, status) FROM stdin;
\.


--
-- TOC entry 2070 (class 0 OID 3227330)
-- Dependencies: 1464
-- Data for Name: rekap_penagihan_detail; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY rekap_penagihan_detail (kode_dpp, kode_customer, kode_wilayah, no_faktur, tgl_terima, jumlah_tag, akumulasi, ditagihkan, pembayaran, retur_pot, kembali, keterangan) FROM stdin;
\.


--
-- TOC entry 2071 (class 0 OID 3227335)
-- Dependencies: 1465
-- Data for Name: rekap_spp; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY rekap_spp (kode_spp, tanggal, bukti_kas, info1, info2, info3, status) FROM stdin;
\.


--
-- TOC entry 2072 (class 0 OID 3227340)
-- Dependencies: 1466
-- Data for Name: rekap_spp_detail; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY rekap_spp_detail (kode_spp, kode_supplier, no_faktur, tgl_terima, jumlah_tag, akumulasi, ditagihkan, pembayaran, retur_pot, keterangan) FROM stdin;
\.


--
-- TOC entry 2073 (class 0 OID 3227345)
-- Dependencies: 1467
-- Data for Name: retur_detail; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY retur_detail (no_faktur, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.


--
-- TOC entry 2149 (class 0 OID 3228679)
-- Dependencies: 1543
-- Data for Name: setting; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY setting (kode, nama) FROM stdin;
\.


--
-- TOC entry 2074 (class 0 OID 3227350)
-- Dependencies: 1468
-- Data for Name: transfer_detail; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY transfer_detail (kode, objek, no_bukti, jumlah, info1, info2) FROM stdin;
\.



--
-- TOC entry 1948 (class 2606 OID 3228685)
-- Dependencies: 1473 1473
-- Name: PK_daftar_akunting; Type: CONSTRAINT; Schema: Akunting; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_akunting
    ADD CONSTRAINT "PK_daftar_akunting" PRIMARY KEY (kode_akunting);


--
-- TOC entry 1943 (class 2606 OID 3228687)
-- Dependencies: 1470 1470
-- Name: PK_kode_buku_besar; Type: CONSTRAINT; Schema: Akunting; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY buku_besar
    ADD CONSTRAINT "PK_kode_buku_besar" PRIMARY KEY (kode_buku_besar);


--
-- TOC entry 1952 (class 2606 OID 3228689)
-- Dependencies: 1475 1475
-- Name: pk_kode_bank; Type: CONSTRAINT; Schema: Akunting; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY daftar_bank_internal
    ADD CONSTRAINT pk_kode_bank PRIMARY KEY (kode_bank);


--
-- TOC entry 1946 (class 2606 OID 3228691)
-- Dependencies: 1471 1471
-- Name: pk_kode_cek; Type: CONSTRAINT; Schema: Akunting; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cek
    ADD CONSTRAINT pk_kode_cek PRIMARY KEY (kode);


--
-- TOC entry 1950 (class 2606 OID 3228693)
-- Dependencies: 1474 1474
-- Name: pk_kode_sup_posting; Type: CONSTRAINT; Schema: Akunting; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_akunting_posting
    ADD CONSTRAINT pk_kode_sup_posting PRIMARY KEY (kode_supplier);


--
-- TOC entry 1941 (class 2606 OID 3228695)
-- Dependencies: 1469 1469
-- Name: pk_nama_bank; Type: CONSTRAINT; Schema: Akunting; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bank
    ADD CONSTRAINT pk_nama_bank PRIMARY KEY (nama_bank);


--
-- TOC entry 1954 (class 2606 OID 3228697)
-- Dependencies: 1478 1478
-- Name: pk_rekap_nagih; Type: CONSTRAINT; Schema: Akunting; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY rekap_penagihan
    ADD CONSTRAINT pk_rekap_nagih PRIMARY KEY (kode_dpp);


--
-- TOC entry 1956 (class 2606 OID 3228699)
-- Dependencies: 1480 1480
-- Name: pk_rekap_nagih_spp; Type: CONSTRAINT; Schema: Akunting; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY rekap_spp
    ADD CONSTRAINT pk_rekap_nagih_spp PRIMARY KEY (kode_spp);



--
-- TOC entry 1958 (class 2606 OID 3228701)
-- Dependencies: 1484 1484
-- Name: PK_berita; Type: CONSTRAINT; Schema: Groupware; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY berita
    ADD CONSTRAINT "PK_berita" PRIMARY KEY (kode);


--
-- TOC entry 1960 (class 2606 OID 3228703)
-- Dependencies: 1485 1485
-- Name: PK_pesan; Type: CONSTRAINT; Schema: Groupware; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pesan
    ADD CONSTRAINT "PK_pesan" PRIMARY KEY (kode);


--
-- TOC entry 1962 (class 2606 OID 3228705)
-- Dependencies: 1486 1486
-- Name: PK_todo; Type: CONSTRAINT; Schema: Groupware; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY todo
    ADD CONSTRAINT "PK_todo" PRIMARY KEY (kode);



--
-- TOC entry 1964 (class 2606 OID 3228707)
-- Dependencies: 1487 1487
-- Name: PK_barang; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY barang
    ADD CONSTRAINT "PK_barang" PRIMARY KEY (kode_barang);


--
-- TOC entry 1973 (class 2606 OID 3228709)
-- Dependencies: 1492 1492
-- Name: PK_daftar_satuan; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_satuan
    ADD CONSTRAINT "PK_daftar_satuan" PRIMARY KEY (kode_satuan);


--
-- TOC entry 1967 (class 2606 OID 3228711)
-- Dependencies: 1488 1488
-- Name: PK_kode_diskon; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_diskon
    ADD CONSTRAINT "PK_kode_diskon" PRIMARY KEY (kode_diskon);


--
-- TOC entry 1971 (class 2606 OID 3228713)
-- Dependencies: 1491 1491
-- Name: PK_kode_jenis; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_jenis_diskon
    ADD CONSTRAINT "PK_kode_jenis" PRIMARY KEY (kode_jenis);


--
-- TOC entry 1983 (class 2606 OID 3228715)
-- Dependencies: 1504 1504
-- Name: PK_kode_p_g; Type: CONSTRAINT; Schema: Gudang; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY master_promo_group
    ADD CONSTRAINT "PK_kode_p_g" PRIMARY KEY (kode_p_g);


--
-- TOC entry 1979 (class 2606 OID 3228717)
-- Dependencies: 1500 1500
-- Name: PK_master_koreksi; Type: CONSTRAINT; Schema: Gudang; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY master_koreksi
    ADD CONSTRAINT "PK_master_koreksi" PRIMARY KEY (no_faktur);


--
-- TOC entry 1981 (class 2606 OID 3228719)
-- Dependencies: 1502 1502
-- Name: PK_master_mutasi; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_mutasi
    ADD CONSTRAINT "PK_master_mutasi" PRIMARY KEY (no_faktur_mutasi);


--
-- TOC entry 1977 (class 2606 OID 3228721)
-- Dependencies: 1495 1495 1495 1495
-- Name: pk_barang_gudang; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY gudang
    ADD CONSTRAINT pk_barang_gudang PRIMARY KEY (kode_barang, subkode_barang, alokasi);


--
-- TOC entry 1985 (class 2606 OID 3228723)
-- Dependencies: 1506 1506 1506
-- Name: pk_barang_opname; Type: CONSTRAINT; Schema: Gudang; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY stock_opname
    ADD CONSTRAINT pk_barang_opname PRIMARY KEY (kode_barang, tanggal_masuk);


--
-- TOC entry 1969 (class 2606 OID 3228725)
-- Dependencies: 1490 1490 1490
-- Name: pk_harga_brg; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_harga
    ADD CONSTRAINT pk_harga_brg PRIMARY KEY (kode_barang, kode_satuan);


--
-- TOC entry 1975 (class 2606 OID 3228727)
-- Dependencies: 1493 1493 1493
-- Name: pk_satuan_brg; Type: CONSTRAINT; Schema: Gudang; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY daftar_satuan_barang
    ADD CONSTRAINT pk_satuan_brg PRIMARY KEY (kode_barang, kode_satuan);



--
-- TOC entry 1987 (class 2606 OID 3228729)
-- Dependencies: 1508 1508
-- Name: pk_lr; Type: CONSTRAINT; Schema: Keamanan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY log_number
    ADD CONSTRAINT pk_lr PRIMARY KEY (ip_address);



--
-- TOC entry 1989 (class 2606 OID 3228731)
-- Dependencies: 1509 1509
-- Name: PK_grup; Type: CONSTRAINT; Schema: Pegawai; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY grup
    ADD CONSTRAINT "PK_grup" PRIMARY KEY (nama);



--
-- TOC entry 1993 (class 2606 OID 3228735)
-- Dependencies: 1511 1511
-- Name: PK_master_pembelian; Type: CONSTRAINT; Schema: Pembelian; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_pembelian
    ADD CONSTRAINT "PK_master_pembelian" PRIMARY KEY (no_faktur);


--
-- TOC entry 1997 (class 2606 OID 3228737)
-- Dependencies: 1517 1517
-- Name: PK_purchase_order; Type: CONSTRAINT; Schema: Pembelian; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY purchase_order
    ADD CONSTRAINT "PK_purchase_order" PRIMARY KEY (no_po);


--
-- TOC entry 1995 (class 2606 OID 3228739)
-- Dependencies: 1515 1515
-- Name: PK_supplier; Type: CONSTRAINT; Schema: Pembelian; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_supplier
    ADD CONSTRAINT "PK_supplier" PRIMARY KEY (kode_supplier);



--
-- TOC entry 1999 (class 2606 OID 3228741)
-- Dependencies: 1519 1519
-- Name: PK_canvas; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY canvas
    ADD CONSTRAINT "PK_canvas" PRIMARY KEY (kode_canvas);


--
-- TOC entry 2001 (class 2606 OID 3228743)
-- Dependencies: 1520 1520
-- Name: PK_customer2; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY customer
    ADD CONSTRAINT "PK_customer2" PRIMARY KEY (kode_customer);


--
-- TOC entry 2003 (class 2606 OID 3228745)
-- Dependencies: 1521 1521
-- Name: PK_master_penjualan; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_penjualan
    ADD CONSTRAINT "PK_master_penjualan" PRIMARY KEY (no_faktur);


--
-- TOC entry 2006 (class 2606 OID 3228747)
-- Dependencies: 1524 1524
-- Name: PK_master_retur_penjualan; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_retur_penjualan
    ADD CONSTRAINT "PK_master_retur_penjualan" PRIMARY KEY (no_faktur);


--
-- TOC entry 2008 (class 2606 OID 3228749)
-- Dependencies: 1526 1526
-- Name: PK_master_so; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY master_so
    ADD CONSTRAINT "PK_master_so" PRIMARY KEY (no_faktur);


--
-- TOC entry 2012 (class 2606 OID 3228751)
-- Dependencies: 1530 1530
-- Name: PK_sales; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sales
    ADD CONSTRAINT "PK_sales" PRIMARY KEY (kode_sales);


--
-- TOC entry 2014 (class 2606 OID 3228753)
-- Dependencies: 1531 1531
-- Name: PK_sales_order; Type: CONSTRAINT; Schema: Penjualan; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sales_order
    ADD CONSTRAINT "PK_sales_order" PRIMARY KEY (no_so);


--
-- TOC entry 2010 (class 2606 OID 3228755)
-- Dependencies: 1528 1528
-- Name: pk_rekap_brg; Type: CONSTRAINT; Schema: Penjualan; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY rekap_barang
    ADD CONSTRAINT pk_rekap_brg PRIMARY KEY (no_rekap);



--
-- TOC entry 2022 (class 2606 OID 3228757)
-- Dependencies: 1537 1537
-- Name: pk_akses_no_fak; Type: CONSTRAINT; Schema: Settings; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY akses_piutang
    ADD CONSTRAINT pk_akses_no_fak PRIMARY KEY (no_faktur);


--
-- TOC entry 2020 (class 2606 OID 3228759)
-- Dependencies: 1536 1536
-- Name: pk_akses_no_fak_koreksi_stock; Type: CONSTRAINT; Schema: Settings; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY akses_koreksi_stock
    ADD CONSTRAINT pk_akses_no_fak_koreksi_stock PRIMARY KEY (no_faktur);


--
-- TOC entry 2024 (class 2606 OID 3228761)
-- Dependencies: 1538 1538
-- Name: pk_akses_no_fakrj; Type: CONSTRAINT; Schema: Settings; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY akses_retur_jual
    ADD CONSTRAINT pk_akses_no_fakrj PRIMARY KEY (no_faktur);


--
-- TOC entry 2018 (class 2606 OID 3228763)
-- Dependencies: 1535 1535
-- Name: pk_no_fak_edit; Type: CONSTRAINT; Schema: Settings; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY akses_edit_jual
    ADD CONSTRAINT pk_no_fak_edit PRIMARY KEY (no_faktur);


--
-- TOC entry 2026 (class 2606 OID 3228765)
-- Dependencies: 1541 1541
-- Name: pk_no_fakprint; Type: CONSTRAINT; Schema: Settings; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY print_nota
    ADD CONSTRAINT pk_no_fakprint PRIMARY KEY (no_faktur);


--
-- TOC entry 2016 (class 2606 OID 3228767)
-- Dependencies: 1534 1534
-- Name: pk_noseri; Type: CONSTRAINT; Schema: Settings; Owner: henry; Tablespace: 
--

ALTER TABLE ONLY akses_cheque
    ADD CONSTRAINT pk_noseri PRIMARY KEY (no_seri);



--
-- TOC entry 2028 (class 2606 OID 3228769)
-- Dependencies: 1543 1543
-- Name: pk_setting; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY setting
    ADD CONSTRAINT pk_setting PRIMARY KEY (kode);



--
-- TOC entry 1944 (class 1259 OID 3228770)
-- Dependencies: 1470
-- Name: idx_buku_besar; Type: INDEX; Schema: Akunting; Owner: postgres; Tablespace: 
--

CREATE INDEX idx_buku_besar ON buku_besar USING btree (kode_buku_besar);



--
-- TOC entry 1965 (class 1259 OID 3228771)
-- Dependencies: 1488
-- Name: FKI_kode_jenis_diskon; Type: INDEX; Schema: Gudang; Owner: postgres; Tablespace: 
--

CREATE INDEX "FKI_kode_jenis_diskon" ON daftar_diskon USING btree (kode_jenis_diskon);



--
-- TOC entry 2004 (class 1259 OID 3228772)
-- Dependencies: 1521
-- Name: idx_jual_brg; Type: INDEX; Schema: Penjualan; Owner: postgres; Tablespace: 
--

CREATE INDEX idx_jual_brg ON master_penjualan USING btree (no_faktur);



--
-- TOC entry 2032 (class 2606 OID 3228773)
-- Dependencies: 1493 1972 1492
-- Name: FK_daftar_satuan; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY daftar_satuan_barang
    ADD CONSTRAINT "FK_daftar_satuan" FOREIGN KEY (kode_satuan) REFERENCES daftar_satuan(kode_satuan);


--
-- TOC entry 2030 (class 2606 OID 3228778)
-- Dependencies: 1966 1488 1489
-- Name: FK_kode_diskon; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY daftar_diskon_detail
    ADD CONSTRAINT "FK_kode_diskon" FOREIGN KEY (kode_diskon) REFERENCES daftar_diskon(kode_diskon);


--
-- TOC entry 2029 (class 2606 OID 3228783)
-- Dependencies: 1970 1491 1488
-- Name: FK_kode_jenis_diskon; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY daftar_diskon
    ADD CONSTRAINT "FK_kode_jenis_diskon" FOREIGN KEY (kode_jenis_diskon) REFERENCES daftar_jenis_diskon(kode_jenis);


--
-- TOC entry 2038 (class 2606 OID 3228788)
-- Dependencies: 1982 1505 1504
-- Name: FK_kode_p_g; Type: FK CONSTRAINT; Schema: Gudang; Owner: henry
--

ALTER TABLE ONLY master_promo_group_detail
    ADD CONSTRAINT "FK_kode_p_g" FOREIGN KEY (kode_p_g) REFERENCES master_promo_group(kode_p_g);


--
-- TOC entry 2031 (class 2606 OID 3228793)
-- Dependencies: 1490 1972 1492
-- Name: FK_kode_satuan; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY daftar_harga
    ADD CONSTRAINT "FK_kode_satuan" FOREIGN KEY (kode_satuan) REFERENCES daftar_satuan(kode_satuan);


--
-- TOC entry 2036 (class 2606 OID 3228798)
-- Dependencies: 1503 1980 1502
-- Name: FK_no_faktur_mutasi; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY master_mutasi_detail
    ADD CONSTRAINT "FK_no_faktur_mutasi" FOREIGN KEY (no_faktur_mutasi) REFERENCES master_mutasi(no_faktur_mutasi);


--
-- TOC entry 2037 (class 2606 OID 3228803)
-- Dependencies: 1492 1972 1503
-- Name: master_mutasi_detail_satuan_order_fkey; Type: FK CONSTRAINT; Schema: Gudang; Owner: postgres
--

ALTER TABLE ONLY master_mutasi_detail
    ADD CONSTRAINT master_mutasi_detail_satuan_order_fkey FOREIGN KEY (satuan_order) REFERENCES daftar_satuan(kode_satuan) MATCH FULL DEFERRABLE INITIALLY DEFERRED;


--
-- TOC entry 2033 (class 2606 OID 3228808)
-- Dependencies: 1501 1972 1492
-- Name: master_satuan_kecil; Type: FK CONSTRAINT; Schema: Gudang; Owner: henry
--

ALTER TABLE ONLY master_koreksi_detail
    ADD CONSTRAINT master_satuan_kecil FOREIGN KEY (satuan_kecil) REFERENCES daftar_satuan(kode_satuan);


--
-- TOC entry 2034 (class 2606 OID 3228813)
-- Dependencies: 1972 1492 1501
-- Name: master_satuan_koreksi; Type: FK CONSTRAINT; Schema: Gudang; Owner: henry
--

ALTER TABLE ONLY master_koreksi_detail
    ADD CONSTRAINT master_satuan_koreksi FOREIGN KEY (satuan_order) REFERENCES daftar_satuan(kode_satuan);


--
-- TOC entry 2035 (class 2606 OID 3228818)
-- Dependencies: 1500 1978 1501
-- Name: no_faktur_koreksi; Type: FK CONSTRAINT; Schema: Gudang; Owner: henry
--

ALTER TABLE ONLY master_koreksi_detail
    ADD CONSTRAINT no_faktur_koreksi FOREIGN KEY (no_faktur) REFERENCES master_koreksi(no_faktur);



--
-- TOC entry 2039 (class 2606 OID 3228823)
-- Dependencies: 1511 1992 1512
-- Name: FK_master_pembelian; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY master_pembelian_detail
    ADD CONSTRAINT "FK_master_pembelian" FOREIGN KEY (no_faktur) REFERENCES master_pembelian(no_faktur);


--
-- TOC entry 2040 (class 2606 OID 3228828)
-- Dependencies: 1972 1492 1512
-- Name: FK_satuan_kecil; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY master_pembelian_detail
    ADD CONSTRAINT "FK_satuan_kecil" FOREIGN KEY (satuan_kecil) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2042 (class 2606 OID 3228833)
-- Dependencies: 1492 1514 1972
-- Name: FK_satuan_kecil; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY master_retur_pembelian_detail
    ADD CONSTRAINT "FK_satuan_kecil" FOREIGN KEY (satuan_kecil) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2041 (class 2606 OID 3228838)
-- Dependencies: 1512 1492 1972
-- Name: FK_satuan_order; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY master_pembelian_detail
    ADD CONSTRAINT "FK_satuan_order" FOREIGN KEY (satuan_order) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2043 (class 2606 OID 3228843)
-- Dependencies: 1514 1972 1492
-- Name: FK_satuan_order; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY master_retur_pembelian_detail
    ADD CONSTRAINT "FK_satuan_order" FOREIGN KEY (satuan_order) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2045 (class 2606 OID 3228848)
-- Dependencies: 1487 1963 1518
-- Name: fk_kode_barang; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY purchase_order_detail
    ADD CONSTRAINT fk_kode_barang FOREIGN KEY (kode_barang) REFERENCES "Gudang".barang(kode_barang);


--
-- TOC entry 2046 (class 2606 OID 3228853)
-- Dependencies: 1492 1518 1972
-- Name: fk_kode_satuan; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY purchase_order_detail
    ADD CONSTRAINT fk_kode_satuan FOREIGN KEY (kode_satuan) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2044 (class 2606 OID 3228858)
-- Dependencies: 1994 1515 1517
-- Name: fk_kode_supplier; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY purchase_order
    ADD CONSTRAINT fk_kode_supplier FOREIGN KEY (kode_supplier) REFERENCES master_supplier(kode_supplier);


--
-- TOC entry 2047 (class 2606 OID 3228863)
-- Dependencies: 1517 1996 1518
-- Name: fk_no_po; Type: FK CONSTRAINT; Schema: Pembelian; Owner: postgres
--

ALTER TABLE ONLY purchase_order_detail
    ADD CONSTRAINT fk_no_po FOREIGN KEY (no_po) REFERENCES purchase_order(no_po);



--
-- TOC entry 2051 (class 2606 OID 3228868)
-- Dependencies: 1525 1492 1972
-- Name: FK_satuan_kecil; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY master_retur_penjualan_detail
    ADD CONSTRAINT "FK_satuan_kecil" FOREIGN KEY (satuan_kecil) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2052 (class 2606 OID 3228873)
-- Dependencies: 1492 1525 1972
-- Name: FK_satuan_order; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY master_retur_penjualan_detail
    ADD CONSTRAINT "FK_satuan_order" FOREIGN KEY (satuan_order) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2057 (class 2606 OID 3228878)
-- Dependencies: 1963 1487 1532
-- Name: fk_kode_barang; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY sales_order_detail
    ADD CONSTRAINT fk_kode_barang FOREIGN KEY (kode_barang) REFERENCES "Gudang".barang(kode_barang);


--
-- TOC entry 2048 (class 2606 OID 3228883)
-- Dependencies: 1521 2011 1530
-- Name: fk_kode_sales; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY master_penjualan
    ADD CONSTRAINT fk_kode_sales FOREIGN KEY (kode_sales) REFERENCES sales(kode_sales);


--
-- TOC entry 2056 (class 2606 OID 3228888)
-- Dependencies: 2011 1531 1530
-- Name: fk_kode_sales; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY sales_order
    ADD CONSTRAINT fk_kode_sales FOREIGN KEY (kode_sales) REFERENCES sales(kode_sales);


--
-- TOC entry 2058 (class 2606 OID 3228893)
-- Dependencies: 1492 1532 1972
-- Name: fk_kode_satuan; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY sales_order_detail
    ADD CONSTRAINT fk_kode_satuan FOREIGN KEY (kode_satuan) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2059 (class 2606 OID 3228898)
-- Dependencies: 1532 2013 1531
-- Name: fk_no_so; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY sales_order_detail
    ADD CONSTRAINT fk_no_so FOREIGN KEY (no_so) REFERENCES sales_order(no_so);


--
-- TOC entry 2055 (class 2606 OID 3228903)
-- Dependencies: 2009 1529 1528
-- Name: fk_rekap_brg; Type: FK CONSTRAINT; Schema: Penjualan; Owner: henry
--

ALTER TABLE ONLY rekap_barang_detail
    ADD CONSTRAINT fk_rekap_brg FOREIGN KEY (no_rekap) REFERENCES rekap_barang(no_rekap);


--
-- TOC entry 2053 (class 2606 OID 3228908)
-- Dependencies: 1972 1527 1492
-- Name: satuan_kecil; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY master_so_detail
    ADD CONSTRAINT satuan_kecil FOREIGN KEY (satuan_kecil) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2049 (class 2606 OID 3228913)
-- Dependencies: 1492 1972 1522
-- Name: satuan_kecil; Type: FK CONSTRAINT; Schema: Penjualan; Owner: henry
--

ALTER TABLE ONLY master_penjualan_detail
    ADD CONSTRAINT satuan_kecil FOREIGN KEY (satuan_kecil) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2054 (class 2606 OID 3228918)
-- Dependencies: 1527 1492 1972
-- Name: satuan_order; Type: FK CONSTRAINT; Schema: Penjualan; Owner: postgres
--

ALTER TABLE ONLY master_so_detail
    ADD CONSTRAINT satuan_order FOREIGN KEY (satuan_order) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2050 (class 2606 OID 3228923)
-- Dependencies: 1492 1522 1972
-- Name: satuan_order; Type: FK CONSTRAINT; Schema: Penjualan; Owner: henry
--

ALTER TABLE ONLY master_penjualan_detail
    ADD CONSTRAINT satuan_order FOREIGN KEY (satuan_order) REFERENCES "Gudang".daftar_satuan(kode_satuan);


--
-- TOC entry 2161 (class 0 OID 0)
-- Dependencies: 13
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;



--
-- TOC entry 2169 (class 0 OID 0)
-- Dependencies: 1487
-- Name: barang; Type: ACL; Schema: Gudang; Owner: postgres
--

REVOKE ALL ON TABLE barang FROM PUBLIC;
REVOKE ALL ON TABLE barang FROM postgres;


-- Completed on 2010-11-14 21:59:36

--
--

