/// <summary> /// Post a memorised transaction schedule record after editing/review /// </summary> public AjaxReturn MemoriseTransferPost(Schedule json) { return PostRecord(json, false); }
/// <summary> /// Prepare to memorise a transaction for automatic retrieval and posting later. /// </summary> public void Memorise(int id) { dynamic record = GetDocument(id, DocType.Cheque); Utils.Check(record.header.idDocument != null, "Document {0} not found", id); DocType type = (DocType)record.header.DocumentTypeId; Schedule job = new Schedule(); job.ActionDate = record.header.DocumentDate; job.Task = type.UnCamel() + " " + record.header.DocumentAmount.ToString("0.00") + (type == DocType.Cheque || type == DocType.CreditCardCharge ? " to " : " from ") + record.header.DocumentName + " " + record.header.DocumentMemo; job.Url = "banking/standingorderpost"; job.Parameters = record.ToString(); job.Post = true; Module = "company"; Method = "job"; Record = job; }
/// <summary> /// Prepare to memorise a transaction for automatic retrieval and posting later. /// </summary> public void MemoriseTransfer(int id) { TransferDocument header = GetTransferDocument(id); Utils.Check(header.idDocument != null, "Transfer {0} not found", id); Account account = Database.Get<Account>((int)header.TransferAccountId); checkDocType(header.DocumentTypeId, DocType.Transfer); Schedule job = new Schedule(); job.ActionDate = header.DocumentDate; job.Task = "Transfer " + header.DocumentAmount.ToString("0.00") + " from " + header.DocumentAccountName + " to " + account.AccountName + " " + header.DocumentMemo; job.Url = "banking/repeattransferpost"; job.Parameters = header.ToString(); job.Post = true; Module = "company"; Method = "job"; Record = job; }
public AjaxReturn JobPost(Schedule json) { return PostRecord(json, false); }