Version 2.1.13.0: cabecera de la NC en un solo metodo (CabeceraNotaCredito.Completar)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-19 16:52:23 -05:00
1 parent 2fb7509fc2
commit a65cd4d90a
5 files changed
+70 -64

No files matched your search

+4 -21
View File
@@ -13,7 +13,6 @@ using Net.Business.Entities.ServicesLayer.StockTransfer;
using Net.Business.Entities.WMS.Recibo;
using Net.Connection;
using Net.CrossCotting;
using Net.Data.HelperData.Correlativo;
using Net.Data.HelperData.Stock;
using Net.Data.ServicesLayer;
using Net.Data.ServicesLayer.CreditNotes;
@@ -402,26 +401,10 @@ namespace Net.Data.WMS.Recibo
}
#endregion
// Serie segun el TIPO de documento origen (03 = boleta), no segun su serie
// El correlativo sale de @SYP_NUMDOC (HelperCorrelativo)
string Serie = U_SYP_MDTO == "03" ? "BC10" : "FC10";
string Correlativo = HelperCorrelativo.Get(Serie);
creditNotesNotes.DocCurrency = returnRequest.DocCurrency;
creditNotesNotes.CardCode = returnRequest.CardCode;
creditNotesNotes.CardName = returnRequest.CardName;
creditNotesNotes.PaymentGroupCode = returnRequest.PaymentGroupCode;
creditNotesNotes.DocDate = DateTime.Now;
creditNotesNotes.DocDueDate = DateTime.Now;
creditNotesNotes.NumAtCard = ("07-" + Serie +"-" + Correlativo);
creditNotesNotes.U_SYP_MDTO = U_SYP_MDTO;
creditNotesNotes.U_SYP_MDCO = U_SYP_MDCO;
creditNotesNotes.U_SYP_MDSO = U_SYP_MDSO;
creditNotesNotes.U_SYP_MOTNC = returnRequest.U_SYP_MOTNC;
creditNotesNotes.U_SYP_TPONC = returnRequest.U_SYP_TPONC;
creditNotesNotes.U_SYP_MDCD = Correlativo;
creditNotesNotes.U_SYP_MDSD = Serie;
creditNotesNotes.U_SYP_MDTD = "07";
creditNotesNotes.U_SYP_FECHAREF = DocDate.ToString("yyyy-MM-dd");
// Cabecera de la NC: serie BC10/FC10 por el TIPO del documento origen (v2.1.7.0), correlativo y documento origen.
// El origen es la factura de la solicitud de devolucion o, si no hay, la propia solicitud
CabeceraNotaCredito.Completar(creditNotesNotes, returnRequest.DocCurrency, returnRequest.CardCode, returnRequest.CardName, returnRequest.PaymentGroupCode,
U_SYP_MDTO, U_SYP_MDSO, U_SYP_MDCO, DocDate, returnRequest.U_SYP_MOTNC, returnRequest.U_SYP_TPONC);
entidad.Detalle.ForEach(x =>
{
var Item = returnRequest.DocumentLines.ToList().FirstOrDefault(t => t.LineNum == x.Item);