Tax information in hours journal
/// <summary>
/// Checks and Inserts the current record into the <c>ProjJournalTransTaxExtensionIN</c> table.
/// </summary>
public void insert(boolean _creditnNote = false)
{
ProjJournalTrans projJournalTrans;
DirPartyLocation dirPartyLocation;
CustTable custTable;
// Start added by kiran
CompanyInfo companyInfo;
Dirpartytable dirpartytable;
DirPartyLocation dirPartyLocationLoc;
LogisticsLocation logisticsLocation;
TaxInformation_IN taxInformation_IN;
// End added by kiran Tax information update
if (this.projJournalTrans)
{
select firstOnly projid from projJournalTrans
where projJournalTrans.RecId == this.ProjJournalTrans;
custTable = CustTable::find(ProjTable::find(ProjJournalTrans.ProjId).CustAccount);
dirPartyLocation = DirPartyLocation::findPrimaryPartyLocation(custTable.Party);
this.CustomerLocation = LogisticsLocation::find(dirPartyLocation.Location).RecId;
this.CustomerTaxInformation = TaxInformation_IN::findDefaultbyLocation(this.CustomerLocation).RecId;
// Start added by kiran 28 Mar 2019 - set Assessable value
select PartyNumber from companyInfo where companyInfo.DataArea == curext()
join dirpartytable where dirpartytable.PartyNumber == companyInfo.PartyNumber
join dirPartyLocationLoc where dirPartyLocationLoc.Party == dirpartytable.RecId
join logisticsLocation where logisticsLocation.RecId == dirPartyLocationLoc.Location
join taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId
&& taxInformation_IN.IsPrimary == NoYes::Yes;
this.TaxInformation = taxInformation_IN.RecId;// TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber;
this.CompanyLocation = logisticsLocation.RecId;
this.ServiceAccountingCodeTable = ServiceAccountingCodeTable_IN::find(ProjCategory::find(projJournalTrans.CategoryId).ServiceAccountingCodeTable_IN).RecId;
if (_creditnNote == false)
{
if(ProjJournalName::find(ProjJournalTable::find(projJournalTrans.JournalId).JournalNameId).Ale_SalesPrice == NoYes::Yes || ProjJournalName::find(ProjJournalTable::find(projJournalTrans.JournalId).JournalNameId).Ale_VehiclePrice == NoYes::Yes)
{
this.AssessableValue = projJournalTrans.Qty * projJournalTrans.SalesPrice;
}
else
{
this.AssessableValue = projJournalTrans.Qty * projJournalTrans.CostPrice;
}
}
// End added by kiran 28 Mar 2019
super();
}
}
/// <summary>
/// Checks and Inserts the current record into the <c>ProjJournalTransTaxExtensionIN</c> table.
/// </summary>
public void insert(boolean _creditnNote = false)
{
ProjJournalTrans projJournalTrans;
DirPartyLocation dirPartyLocation;
CustTable custTable;
// Start added by kiran
CompanyInfo companyInfo;
Dirpartytable dirpartytable;
DirPartyLocation dirPartyLocationLoc;
LogisticsLocation logisticsLocation;
TaxInformation_IN taxInformation_IN;
// End added by kiran Tax information update
if (this.projJournalTrans)
{
select firstOnly projid from projJournalTrans
where projJournalTrans.RecId == this.ProjJournalTrans;
custTable = CustTable::find(ProjTable::find(ProjJournalTrans.ProjId).CustAccount);
dirPartyLocation = DirPartyLocation::findPrimaryPartyLocation(custTable.Party);
this.CustomerLocation = LogisticsLocation::find(dirPartyLocation.Location).RecId;
this.CustomerTaxInformation = TaxInformation_IN::findDefaultbyLocation(this.CustomerLocation).RecId;
// Start added by kiran 28 Mar 2019 - set Assessable value
select PartyNumber from companyInfo where companyInfo.DataArea == curext()
join dirpartytable where dirpartytable.PartyNumber == companyInfo.PartyNumber
join dirPartyLocationLoc where dirPartyLocationLoc.Party == dirpartytable.RecId
join logisticsLocation where logisticsLocation.RecId == dirPartyLocationLoc.Location
join taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId
&& taxInformation_IN.IsPrimary == NoYes::Yes;
this.TaxInformation = taxInformation_IN.RecId;// TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber;
this.CompanyLocation = logisticsLocation.RecId;
this.ServiceAccountingCodeTable = ServiceAccountingCodeTable_IN::find(ProjCategory::find(projJournalTrans.CategoryId).ServiceAccountingCodeTable_IN).RecId;
if (_creditnNote == false)
{
if(ProjJournalName::find(ProjJournalTable::find(projJournalTrans.JournalId).JournalNameId).Ale_SalesPrice == NoYes::Yes || ProjJournalName::find(ProjJournalTable::find(projJournalTrans.JournalId).JournalNameId).Ale_VehiclePrice == NoYes::Yes)
{
this.AssessableValue = projJournalTrans.Qty * projJournalTrans.SalesPrice;
}
else
{
this.AssessableValue = projJournalTrans.Qty * projJournalTrans.CostPrice;
}
}
// End added by kiran 28 Mar 2019
super();
}
}
No comments:
Post a Comment