Beispiel #1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.refer:

                if (rdo_refer.Checked == true)
                {
                    LoadData(CLabour_exten.Refer());
                }
                else
                {
                    LoadData(CLabour_exten.Unrefer());
                }

                break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CLabour_exten.Showall());
                }
                else
                {
                    LoadData(CLabour_exten.Unrefer());
                }

                break;

            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CLabour_exten.Notactive());
                }
                else
                {
                    LoadData(CLabour_exten.Unrefer());
                }

                break;

            case ListOption.Search:
                LoadData(CLabour_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text));
                break;

            default:
                LoadData(CLabour_exten.Showall());
                break;
            }
        }
Beispiel #2
0
        private void Btn_delete_Click(object sender, EventArgs e)
        {
            string pkValue = GetSelectedPkValue();

            if (CLabour_exten.LockStatus(pkValue) == false)
            {
                BuildForm();
                if (pkValue != null)
                {
                    finvoice.SetAction(BtnEvent.Delete, pkValue);
                    finvoice.SetFocus();
                }
            }
        }
Beispiel #3
0
 void Txt_party_LookupUpdate(object sender, EventArgs e)
 {
     txt_party.LookupList = CLabour_exten.LookupParty(new DAL());
 }
Beispiel #4
0
 void Txt_no_LookupUpdate(object sender, EventArgs e)
 {
     txt_no.LookupList = CLabour_exten.LookupNo(new DAL());
 }
Beispiel #5
0
        private static Print_LabourList ReturnLabour(string Id, List <PrintCopies> printcopies)
        {
            Const.Labour       invoice      = CLabour_exten.PKId(Id);
            List <Labouritems> invoiceitems = CLabouritems_exten.FKId(Id);

            Company company = CCompany_exten.PKId(Current.Company_id);

            Party party = CParty_exten.SearchName(invoice.Party_id, new DAL());

            Company_bank cmpbank = CCompany_bank_exten.PKId("1");

            Print_LabourList list = new Print_LabourList();

            for (int i = 0; i < printcopies.Count; i++)
            {
                Print_Labour row = new Print_Labour();

                row.COPY_NAME  = printcopies[i].Copies;
                row.SALES_TYPE = invoice.Salestype_id;
                row.TAX_TYPE   = invoice.Taxtype_id;

                row.COMPANY_NAME      = company.Display_name;
                row.COMPANY_ADDRESS_1 = company.Street1 + ", " + company.Street2;
                row.COMPANY_ADDRESS_2 = company.City_id + "- " + company.Pincode_id + ", " + company.State_id + " - (" + Ccoreplus.GetStateCode(company.State_id) + ") . Email :- " + company.Email;
                row.COMPANY_PHONE     = company.Phone;
                row.COMPANY_CELL1     = company.Cell1;
                row.COMPANY_CELL2     = company.Cell2;

                row.COMPANY_EMAIL   = company.Email;
                row.COMPANY_WEBSITE = company.Website;


                if (company.Gstin.Trim().Length != 0)
                {
                    row.COMPANY_GSTIN = "GSTIN : " + company.Gstin;

                    if (company.Cell1.Trim().Length != 0)
                    {
                        row.COMPANY_GSTIN = "GSTIN : " + company.Gstin + " , Mobile : " + company.Cell1;

                        if (company.Cell2.Trim().Length != 0)
                        {
                            row.COMPANY_GSTIN = "GSTIN : " + company.Gstin + " , Mobile : " + company.Cell1 + ", " + company.Cell2;
                        }
                    }
                }
                else
                {
                    row.COMPANY_GSTIN = "";
                }



                row.LABOUR_ID   = invoice.Labour_id;
                row.LABOUR_NO   = ":. " + invoice.Labour_no;
                row.LABOUR_DATE = ":  " + ConvertTO.Date2S(invoice.Labour_date);

                row.TRANSPORT  = ":  " + invoice.Transport_id;
                row.DELIVERYTO = ":  " + invoice.Deliveredto_id;
                row.BUNDEL     = ":  " + invoice.Bundel;

                row.PARTY_NAME     = party.Party_name;
                row.PARTY_STREET_1 = party.Street_1 + ",";

                if (party.Street_2.Trim().Length != 0)
                {
                    row.PARTY_STREET_2 = party.Street_2 + ",";
                }

                if (party.Pincode_id.Trim().Length == 6)
                {
                    row.PARTY_CITY = party.City_id + " - :" + party.Pincode_id + ",";
                }
                else
                {
                    row.PARTY_CITY = party.City_id + ",";
                }


                row.PARTY_STATE = party.State_id + " - (" + Ccoreplus.GetStateCode(party.State_id) + ").";

                row.PARTY_STATE_CODE = "";
                row.PARTY_COUNTRY    = party.Country_id;
                row.PARTY_PINCODE    = party.Pincode_id;

                if (party.Gstin.Trim().Length != 0)
                {
                    row.PARTY_GSTIN = "GSTIN :" + party.Gstin;
                }

                row.TOTAL_QTY     = invoice.Total_qty.ToString();
                row.TAXABLE_VALUE = invoice.Total_taxable_amount.ToString();


                if (Customised.TaxType == Core.SGST)
                {
                    row.CGST_PERCENT = "  Add CGST " + (invoiceitems[0].Cgst_percent.ToString()) + " %";
                    row.SGST_PERCENT = "  Add SGST " + (invoiceitems[0].Sgst_percent.ToString()) + " %";

                    row.TOTAL_CGST = invoice.Total_cgst.ToString();
                    row.TOTAL_SGST = invoice.Total_sgst.ToString();
                }
                else if (Customised.TaxType == Core.IGST)
                {
                    row.CGST_PERCENT = "";
                    row.SGST_PERCENT = "  Add IGST " + (invoiceitems[0].Igst_percent.ToString()) + " %";

                    row.TOTAL_CGST = "";
                    row.TOTAL_SGST = invoice.Total_igst.ToString();
                }


                row.TOTAL_SUB = invoice.Grandtotal.ToString();

                row.LEDGER = CLedger_exten.GetName_Id(invoice.Ledger_id);

                if (invoice.Additional != 0)
                {
                    row.ADDITIONAL = invoice.Additional.ToString();
                }
                else
                {
                    row.ADDITIONAL = "";
                }

                row.ROUNDS   = invoice.Rounds.ToString();
                row.GSTTOTAL = invoice.Gsttotal.ToString();

                row.GRANDTOTAL      = invoice.Grandtotal.ToString();
                row.AMOUNT_IN_WORDS = "Rupees : " + Global.AmountInWords(invoice.Grandtotal);
                row.NOTES           = invoice.Notes;
                row.ENTRY_BY        = invoice.User_id;

                row.FORSIGN = company.Display_name;

                if (Customised.InvoiceWithBankDetails)
                {
                    row.ACCOUNT_NO = "A/C NO          : " + cmpbank.Account_number;
                    row.IFSC_CODE  = "IFSC CODE    : " + cmpbank.Ifsc_code;
                    row.BANK_NAME  = "BANK NAME  : " + cmpbank.Company_bank_name;
                    row.BRANCH     = "BRANCH        : " + cmpbank.Branch_name;
                }
                else
                {
                    row.ACCOUNT_NO = "";
                    row.IFSC_CODE  = "";
                    row.BANK_NAME  = "";
                    row.BRANCH     = "";
                }

                row.TERMS_1 = Message.TERMS_1;
                row.TERMS_2 = Message.TERMS_2;
                row.TERMS_3 = Message.TERMS_3;
                row.TERMS_4 = Customised.Terms_4;


                list.Add(row);
            }

            return(list);
        }