BrightSide Workbench Full Report + Source Code
org.turro.financials.document.logic.BatchOfWrapper Class Reference
Inheritance diagram for org.turro.financials.document.logic.BatchOfWrapper:
Collaboration diagram for org.turro.financials.document.logic.BatchOfWrapper:

Public Member Functions

 BatchOfWrapper (BatchOf batchOf)
 
Date getRelationDate ()
 
Date getRelationToDate ()
 
String createBatchString ()
 
String createRelationString ()
 
void setContract (Contract contract)
 
void setStore (Contract contract)
 
void loadBatch (BatchOfType type, final Command command)
 
void loadRelation (final BatchOfType type, FilterGrid filterGrid, final Command command)
 
void delete (final boolean close)
 
IIssue getIssue ()
 
boolean save (List< DocumentLine > lines)
 
- Public Member Functions inherited from org.turro.financials.model.document.BatchOfWrapper
BatchOf getBatchOf ()
 
void keepRelations (Set< Document > docs)
 
boolean delete ()
 

Public Attributes

Date relationDate = new java.util.Date(new java.util.Date().getTime() - (6L * 30L * 24L * 60L * 60L * 1000L))
 
Date relationToDate = new Date()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.financials.model.document.BatchOfWrapper
BatchOf batchOf
 

Detailed Description

Constructor & Destructor Documentation

◆ BatchOfWrapper()

Member Function Documentation

◆ createBatchString()

String org.turro.financials.document.logic.BatchOfWrapper.createBatchString ( )

Definition at line 63 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

63  {
64  String s = "";
65  if(batchOf.getType() != null) {
67  }
68  return s + I_.get("Create from") + "...";
69  }
Here is the call graph for this function:

◆ createRelationString()

String org.turro.financials.document.logic.BatchOfWrapper.createRelationString ( )

Definition at line 71 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

71  {
72  String s = "";
73  if(batchOf.getType() != null) {
75  }
76  return s + I_.get("Create from") + "...";
77  }
Here is the call graph for this function:

◆ delete()

void org.turro.financials.document.logic.BatchOfWrapper.delete ( final boolean  close)

Definition at line 170 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

170  {
171  Messages.confirmDeletion().show(() -> {
172  if(BatchOfWrapper.super.delete()) {
173  if(close) Framework.getCurrent().closeSelected();
174  }
175  });
176  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIssue()

IIssue org.turro.financials.document.logic.BatchOfWrapper.getIssue ( )

Definition at line 178 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

178  {
179  return new DocumentWrapper(batchOf.getBatch()).getIssue();
180  }
Here is the call graph for this function:

◆ getRelationDate()

◆ getRelationToDate()

◆ loadBatch()

void org.turro.financials.document.logic.BatchOfWrapper.loadBatch ( BatchOfType  type,
final Command  command 
)

Definition at line 95 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

95  {
96  final DocumentListbox dl = new DocumentListbox(getPossibleBatch(type));
97  dl.setMultiple(false);
98  dl.setCheckmark(false);
99  dl.setShowContract(true);
100 
101  SelectionDialog.getComponent(
102  Framework.getCurrent().getPage(),
103  I_.get("Documents"),
104  dl, "80%", "80%", new Command() {
105  @Override
106  public Object execute(Context context) {
107  if(dl != null) {
108  batchOf.setBatch(dl.getObjectValue());
109  if(batchOf.getBatch() != null) {
110  context.put("batch", batchOf.getBatch());
111  if(command != null) command.execute(context);
112  }
113  }
114  return null;
115  }
116  });
117  }
void setBatch(Document batch)
Definition: BatchOf.java:63
Here is the call graph for this function:

◆ loadRelation()

void org.turro.financials.document.logic.BatchOfWrapper.loadRelation ( final BatchOfType  type,
FilterGrid  filterGrid,
final Command  command 
)

Definition at line 119 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

119  {
120  final DocumentListbox dl = new DocumentListbox(getPossibleRelation(type, filterGrid));
121  dl.setMultiple(true);
122  dl.setCheckmark(true);
123  dl.setShowContract(true);
124  dl.setShowConcepts(true);
125  dl.setSelectFirst(false);
126 
127  SelectionDialog.getComponent(
128  Framework.getCurrent().getPage(),
129  I_.get("Documents"),
130  dl, "80%", "80%", new Command() {
131  @Override
132  public Object execute(Context context) {
133  if(dl != null) {
134  for(Document d : dl.getObjectValues()) {
135  if(d.getDocumentDefinition().getId() == type.getPortfolioId()) {
136  for(DocumentLine l : d.getDocumentLines()) {
137  l.setStore(batchOf.getBatch().getContract());
138  }
139  batchOf.getDocuments().add(d);
140  } else {
141  Collection<DocumentWorkflow> wf = d.getWorkflows();
142  for(final DocumentWorkflow dw : wf) {
143  if(d.getDocumentDefinition().getId() == dw.getAncestor().getId() &&
144  type.getPortfolioId() == dw.getDescendant().getId()) {
145  Document nd = new Document();
146  nd.flowFrom(d, new DocumentWrapper(d).getDocDescription(), dw);
148  nd.setDocumentDate(d.getDocumentDate());
149  nd.setReceiptDate(d.getReceiptDate());
150  } else {
153  }
154  nd.setDocumentNumber(d.getDocumentNumber() + "/1");
155  for(DocumentLine l : nd.getDocumentLines()) {
156  l.setStore(batchOf.getBatch().getContract());
157  }
158  batchOf.getDocuments().add(nd);
159  }
160  }
161  }
162  }
163  if(command != null) command.execute(context);
164  }
165  return null;
166  }
167  });
168  }
Set< Document > getDocuments()
Definition: BatchOf.java:67
void setDocumentNumber(String documentNumber)
Definition: Document.java:192
void setDocumentDate(Date documentDate)
Definition: Document.java:163
Set< DocumentLine > getDocumentLines()
Definition: Document.java:180
void setReceiptDate(Date receiptDate)
Definition: Document.java:256
void flowFrom(Document doc, String header, DocumentWorkflow workflow)
Definition: Document.java:539
Here is the call graph for this function:

◆ save()

boolean org.turro.financials.document.logic.BatchOfWrapper.save ( List< DocumentLine lines)

Reimplemented from org.turro.financials.model.document.BatchOfWrapper.

Definition at line 183 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

183  {
184  for(Document doc : batchOf.getDocuments()) {
185  for(DocumentLine l : doc.getDocumentLines()) {
186  l.setStore(batchOf.getBatch().getContract());
187  }
188  }
190  l.setStore(batchOf.getStore());
191  }
192  return super.save(lines);
193  }
Here is the call graph for this function:

◆ setContract()

void org.turro.financials.document.logic.BatchOfWrapper.setContract ( Contract  contract)

Definition at line 79 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

79  {
80  batchOf.getBatch().setContract(contract);
81  for(Document doc : batchOf.getDocuments()) {
82  for(DocumentLine l : doc.getDocumentLines()) {
83  l.setStore(contract);
84  }
85  }
86  }
void setContract(Contract contract)
Definition: Document.java:123
Here is the call graph for this function:

◆ setStore()

void org.turro.financials.document.logic.BatchOfWrapper.setStore ( Contract  contract)

Definition at line 88 of file bsfinancials-www/src/main/java/org/turro/financials/document/logic/BatchOfWrapper.java.

88  {
89  batchOf.setStore(contract);
91  l.setStore(contract);
92  }
93  }
void setStore(Contract store)
Definition: BatchOf.java:95
Here is the call graph for this function:

Member Data Documentation

◆ relationDate

Date org.turro.financials.document.logic.BatchOfWrapper.relationDate = new java.util.Date(new java.util.Date().getTime() - (6L * 30L * 24L * 60L * 60L * 1000L))

◆ relationToDate

Date org.turro.financials.document.logic.BatchOfWrapper.relationToDate = new Date()

The documentation for this class was generated from the following file: