◆ clearEmptyLines()
void org.turro.erp.entity.RequiredUsage.clearEmptyLines |
( |
| ) |
|
◆ convertToReal()
double org.turro.erp.entity.RequiredUsage.convertToReal |
( |
double |
convertedUnits | ) |
|
◆ fits()
boolean org.turro.erp.entity.RequiredUsage.fits |
( |
HumanResource |
humanResource | ) |
|
Definition at line 529 of file RequiredUsage.java.
530 return this.humanResource !=
null &&
531 ((this.humanResource.
getId() == humanResource.
getId()) ||
532 humanResource.
fits(aptitudeDegree,
new Date()));
boolean fits(IContact contact)
◆ getAptitudeAssesment()
AptitudeDegree org.turro.erp.entity.RequiredUsage.getAptitudeAssesment |
( |
| ) |
|
◆ getAptitudeDegree()
AptitudeDegree org.turro.erp.entity.RequiredUsage.getAptitudeDegree |
( |
| ) |
|
◆ getCalculatedUnitCost()
double org.turro.erp.entity.RequiredUsage.getCalculatedUnitCost |
( |
| ) |
|
◆ getContractPreferenceId()
long org.turro.erp.entity.RequiredUsage.getContractPreferenceId |
( |
| ) |
|
◆ getCost()
double org.turro.erp.entity.RequiredUsage.getCost |
( |
| ) |
|
◆ getDedication()
double org.turro.erp.entity.RequiredUsage.getDedication |
( |
| ) |
|
◆ getDescription()
String org.turro.erp.entity.RequiredUsage.getDescription |
( |
| ) |
|
◆ getEstimatedCost()
double org.turro.erp.entity.RequiredUsage.getEstimatedCost |
( |
| ) |
|
◆ getEstimatedDuration()
double org.turro.erp.entity.RequiredUsage.getEstimatedDuration |
( |
| ) |
|
◆ getEstimatedPrice()
double org.turro.erp.entity.RequiredUsage.getEstimatedPrice |
( |
| ) |
|
◆ getEstimatedUnitCost()
double org.turro.erp.entity.RequiredUsage.getEstimatedUnitCost |
( |
| ) |
|
Definition at line 704 of file RequiredUsage.java.
705 if(Zero.near(cost, 2)) {
double getCalculatedUnitCost()
◆ getEstimatedUnits()
double org.turro.erp.entity.RequiredUsage.getEstimatedUnits |
( |
| ) |
|
◆ getExpectedCost()
double org.turro.erp.entity.RequiredUsage.getExpectedCost |
( |
| ) |
|
Definition at line 730 of file RequiredUsage.java.
734 if(oi.getRelated() !=
null) {
735 q += oi.getRelated().getAmount();
Set< OrderItem > getOrderItems()
◆ getExpectedDedication()
double org.turro.erp.entity.RequiredUsage.getExpectedDedication |
( |
| ) |
|
Definition at line 667 of file RequiredUsage.java.
668 double q = 0.0d, d = 0.0d;
672 d += oi.getUnits() * oi.getDedication();
675 return q != 0.0d ? d / q : 1.0d;
◆ getExpectedDuration()
double org.turro.erp.entity.RequiredUsage.getExpectedDuration |
( |
| ) |
|
◆ getExpectedUnitCost()
double org.turro.erp.entity.RequiredUsage.getExpectedUnitCost |
( |
| ) |
|
◆ getExpectedUnits()
double org.turro.erp.entity.RequiredUsage.getExpectedUnits |
( |
| ) |
|
Definition at line 715 of file RequiredUsage.java.
718 q += oi.getUnits() * oi.getDedication();
719 if(oi.getRelated() !=
null) {
720 q += oi.getRelated().getUnits() * oi.getRelated().getDedication();
◆ getHumanResource()
HumanResource org.turro.erp.entity.RequiredUsage.getHumanResource |
( |
| ) |
|
◆ getHumanResourceAptitude()
Definition at line 504 of file RequiredUsage.java.
505 return new HumanResourceAptitude(humanResource, canChange, aptitudeDegree);
◆ getHumanResourceAptitudeAssest()
Definition at line 513 of file RequiredUsage.java.
514 return new HumanResourceAptitude(humanResource, canChange,
515 aptitudeAssesment ==
null ? aptitudeDegree : aptitudeAssesment);
◆ getId()
long org.turro.erp.entity.RequiredUsage.getId |
( |
| ) |
|
◆ getIProduct()
IProduct org.turro.erp.entity.RequiredUsage.getIProduct |
( |
| ) |
|
Definition at line 356 of file RequiredUsage.java.
357 return ProductFactory.getProduct(productId, providerId, providerProductId, productDescription);
◆ getLineType()
LineType org.turro.erp.entity.RequiredUsage.getLineType |
( |
| ) |
|
Definition at line 400 of file RequiredUsage.java.
401 LineType lt = lineType.getEntity(lineTypeId);
402 lt.setContractPreference(
null);
◆ getLineTypeId()
long org.turro.erp.entity.RequiredUsage.getLineTypeId |
( |
| ) |
|
◆ getMostRealCost()
double org.turro.erp.entity.RequiredUsage.getMostRealCost |
( |
| ) |
|
Definition at line 789 of file RequiredUsage.java.
791 if(mostRealCost == 0.0) {
794 if(mostRealCost == 0.0) {
double getEstimatedCost()
◆ getName()
String org.turro.erp.entity.RequiredUsage.getName |
( |
| ) |
|
Definition at line 470 of file RequiredUsage.java.
477 PhraseBuilder pb =
new PhraseBuilder();
481 pb.addWord(p.getProductString());
486 String ltype =
new LineTypeDescription(lineTypeId, contractPreferenceId).getDescription();
488 pb.addWord(
"(" + ltype +
")");
490 return pb.toString();
ProductByContractor getProviderProduct()
HumanResourceAptitude getHumanResourceAptitude()
◆ getOrderItems()
Set<OrderItem> org.turro.erp.entity.RequiredUsage.getOrderItems |
( |
| ) |
|
Definition at line 166 of file RequiredUsage.java.
167 Dao dao =
new ErpPU();
168 if(
id > 0 && dao.isNotLoaded(orderItems)) {
169 orderItems = dao.lazyLoader(RequiredUsage.class,
this,
"orderItems").orderItems;
◆ getOrderUnits()
double org.turro.erp.entity.RequiredUsage.getOrderUnits |
( |
| ) |
|
◆ getPrice()
double org.turro.erp.entity.RequiredUsage.getPrice |
( |
| ) |
|
◆ getProduct()
Product org.turro.erp.entity.RequiredUsage.getProduct |
( |
| ) |
|
◆ getProductDescription()
String org.turro.erp.entity.RequiredUsage.getProductDescription |
( |
| ) |
|
◆ getProductId()
long org.turro.erp.entity.RequiredUsage.getProductId |
( |
| ) |
|
◆ getProposedPrice()
double org.turro.erp.entity.RequiredUsage.getProposedPrice |
( |
| ) |
|
◆ getProvider()
Contract org.turro.erp.entity.RequiredUsage.getProvider |
( |
| ) |
|
◆ getProviderId()
long org.turro.erp.entity.RequiredUsage.getProviderId |
( |
| ) |
|
◆ getProviderProduct()
Definition at line 384 of file RequiredUsage.java.
385 return providerProduct.getEntity(providerProductId);
◆ getProviderProductId()
long org.turro.erp.entity.RequiredUsage.getProviderProductId |
( |
| ) |
|
◆ getPurchaseDate()
Date org.turro.erp.entity.RequiredUsage.getPurchaseDate |
( |
| ) |
|
◆ getPurchaseLag()
double org.turro.erp.entity.RequiredUsage.getPurchaseLag |
( |
| ) |
|
◆ getPurchaseMode()
PurchaseMode org.turro.erp.entity.RequiredUsage.getPurchaseMode |
( |
| ) |
|
◆ getPurchaseTask()
Task org.turro.erp.entity.RequiredUsage.getPurchaseTask |
( |
| ) |
|
◆ getRealCost()
double org.turro.erp.entity.RequiredUsage.getRealCost |
( |
| ) |
|
Definition at line 759 of file RequiredUsage.java.
762 q += oi.getRealAmount();
763 if(oi.getRelated() !=
null) {
764 q += oi.getRelated().getRealAmount();
◆ getRealDedication()
double org.turro.erp.entity.RequiredUsage.getRealDedication |
( |
| ) |
|
Definition at line 678 of file RequiredUsage.java.
679 double q = 0.0d, d = 0.0d;
682 for(ReceiptItem ri : oi.getReceiptItems()) {
684 d += ri.getUnits() * ri.getDedication();
688 return q != 0.0d ? d / q : 1.0d;
◆ getRealDuration()
double org.turro.erp.entity.RequiredUsage.getRealDuration |
( |
| ) |
|
◆ getRealUnitCost()
double org.turro.erp.entity.RequiredUsage.getRealUnitCost |
( |
| ) |
|
◆ getRealUnits()
double org.turro.erp.entity.RequiredUsage.getRealUnits |
( |
| ) |
|
Definition at line 741 of file RequiredUsage.java.
744 q += oi.getRealUnits();
745 if(oi.getRelated() !=
null) {
746 q += oi.getRelated().getRealUnits();
◆ getResource()
Resource org.turro.erp.entity.RequiredUsage.getResource |
( |
| ) |
|
◆ getResourceAptitude()
Definition at line 518 of file RequiredUsage.java.
519 return new ResourceAptitude(resource, aptitudeDegree);
◆ getResourceId()
long org.turro.erp.entity.RequiredUsage.getResourceId |
( |
| ) |
|
◆ getStatus()
UsageStatus org.turro.erp.entity.RequiredUsage.getStatus |
( |
| ) |
|
Definition at line 605 of file RequiredUsage.java.
609 if(realUnits == 0.0d) {
610 if(expectedUnits != 0.0d) {
611 return UsageStatus.USAGE_PENDING;
613 return UsageStatus.USAGE_READY;
616 if(realUnits >= estimatedUnits) {
617 if(EnumSet.of(TaskStatus.TASK_FINISHED, TaskStatus.TASK_ONWORK).contains(
getTask().
getStatus())) {
618 return UsageStatus.USAGE_PROCESSED;
620 return UsageStatus.USAGE_RECEIVED;
623 return UsageStatus.USAGE_RECEIVED_PARTIALLY;
◆ getTask()
Task org.turro.erp.entity.RequiredUsage.getTask |
( |
| ) |
|
◆ getType()
String org.turro.erp.entity.RequiredUsage.getType |
( |
| ) |
|
◆ getUnitPrice()
double org.turro.erp.entity.RequiredUsage.getUnitPrice |
( |
| ) |
|
Definition at line 778 of file RequiredUsage.java.
779 if(Zero.near(price, 2)) {
780 return new UsageValuation(
this).getUnitPrice();
◆ getUnits()
double org.turro.erp.entity.RequiredUsage.getUnits |
( |
| ) |
|
◆ getUpdatedOrderItems()
Set<OrderItem> org.turro.erp.entity.RequiredUsage.getUpdatedOrderItems |
( |
| ) |
|
Definition at line 174 of file RequiredUsage.java.
175 Dao dao =
new ErpPU();
177 orderItems = dao.lazyLoader(RequiredUsage.class,
this,
"orderItems").orderItems;
◆ getView()
◆ getViewId()
long org.turro.erp.entity.RequiredUsage.getViewId |
( |
| ) |
|
◆ hasResource()
boolean org.turro.erp.entity.RequiredUsage.hasResource |
( |
| ) |
|
◆ isCanChange()
boolean org.turro.erp.entity.RequiredUsage.isCanChange |
( |
| ) |
|
◆ isCostMaximum()
boolean org.turro.erp.entity.RequiredUsage.isCostMaximum |
( |
| ) |
|
◆ isEmpty()
boolean org.turro.erp.entity.RequiredUsage.isEmpty |
( |
| ) |
|
◆ isHumanResourceType()
boolean org.turro.erp.entity.RequiredUsage.isHumanResourceType |
( |
| ) |
|
◆ isInternal()
boolean org.turro.erp.entity.RequiredUsage.isInternal |
( |
| ) |
|
◆ isProductType()
boolean org.turro.erp.entity.RequiredUsage.isProductType |
( |
| ) |
|
Definition at line 430 of file RequiredUsage.java.
431 return ((providerProductId > 0 || productId > 0) ||
432 !Strings.isEmpty(productDescription)) ||
preparedType == 2;
◆ isProviderFixed()
boolean org.turro.erp.entity.RequiredUsage.isProviderFixed |
( |
| ) |
|
◆ isRepresentHours()
boolean org.turro.erp.entity.RequiredUsage.isRepresentHours |
( |
| ) |
|
◆ prepareHumanResource()
void org.turro.erp.entity.RequiredUsage.prepareHumanResource |
( |
| ) |
|
◆ prepareProduct()
void org.turro.erp.entity.RequiredUsage.prepareProduct |
( |
| ) |
|
◆ setAptitudeAssesment()
void org.turro.erp.entity.RequiredUsage.setAptitudeAssesment |
( |
AptitudeDegree |
aptitudeAssesment | ) |
|
◆ setAptitudeDegree()
void org.turro.erp.entity.RequiredUsage.setAptitudeDegree |
( |
AptitudeDegree |
aptitudeDegree | ) |
|
◆ setCanChange()
void org.turro.erp.entity.RequiredUsage.setCanChange |
( |
boolean |
canChange | ) |
|
◆ setContractPreferenceId()
void org.turro.erp.entity.RequiredUsage.setContractPreferenceId |
( |
long |
contractPreferenceId | ) |
|
◆ setCost()
void org.turro.erp.entity.RequiredUsage.setCost |
( |
double |
cost | ) |
|
◆ setCostMaximum()
void org.turro.erp.entity.RequiredUsage.setCostMaximum |
( |
boolean |
costMaximum | ) |
|
◆ setDedication()
void org.turro.erp.entity.RequiredUsage.setDedication |
( |
double |
dedication | ) |
|
◆ setDescription()
void org.turro.erp.entity.RequiredUsage.setDescription |
( |
String |
description | ) |
|
◆ setHumanResource()
void org.turro.erp.entity.RequiredUsage.setHumanResource |
( |
HumanResource |
resource | ) |
|
◆ setHumanResourceAptitude()
Definition at line 508 of file RequiredUsage.java.
509 humanResource = hro.getHumanResource();
510 aptitudeDegree = hro.getAptitudeDegree();
◆ setId()
void org.turro.erp.entity.RequiredUsage.setId |
( |
long |
id | ) |
|
◆ setIProduct()
void org.turro.erp.entity.RequiredUsage.setIProduct |
( |
IProduct |
product | ) |
|
Definition at line 360 of file RequiredUsage.java.
361 if(product !=
null) {
362 if(product.isUncoded()) {
364 productDescription = product.getProductCodeStr();
366 productId = ((Product) product).getId();
367 if(product.getProductByContractor() !=
null) {
void setProviderProduct(ProductByContractor providerProduct)
◆ setLineType()
void org.turro.erp.entity.RequiredUsage.setLineType |
( |
LineType |
lineType | ) |
|
◆ setLineTypeId()
void org.turro.erp.entity.RequiredUsage.setLineTypeId |
( |
long |
lineTypeId | ) |
|
◆ setOrderItems()
void org.turro.erp.entity.RequiredUsage.setOrderItems |
( |
Set< OrderItem > |
orderItems | ) |
|
◆ setOrderUnits()
void org.turro.erp.entity.RequiredUsage.setOrderUnits |
( |
double |
orderUnits | ) |
|
◆ setPrice()
void org.turro.erp.entity.RequiredUsage.setPrice |
( |
double |
price | ) |
|
◆ setProduct()
void org.turro.erp.entity.RequiredUsage.setProduct |
( |
Product |
product | ) |
|
◆ setProductDescription()
void org.turro.erp.entity.RequiredUsage.setProductDescription |
( |
String |
productDescription | ) |
|
◆ setProductId()
void org.turro.erp.entity.RequiredUsage.setProductId |
( |
long |
productId | ) |
|
◆ setProvider()
void org.turro.erp.entity.RequiredUsage.setProvider |
( |
Contract |
provider | ) |
|
◆ setProviderFixed()
void org.turro.erp.entity.RequiredUsage.setProviderFixed |
( |
boolean |
providerFixed | ) |
|
◆ setProviderId()
void org.turro.erp.entity.RequiredUsage.setProviderId |
( |
long |
providerId | ) |
|
◆ setProviderProduct()
void org.turro.erp.entity.RequiredUsage.setProviderProduct |
( |
ProductByContractor |
providerProduct | ) |
|
Definition at line 388 of file RequiredUsage.java.
389 providerProductId = this.providerProduct.setEntity(providerProduct);
◆ setProviderProductId()
void org.turro.erp.entity.RequiredUsage.setProviderProductId |
( |
long |
providerProductId | ) |
|
◆ setPurchaseDate()
void org.turro.erp.entity.RequiredUsage.setPurchaseDate |
( |
Date |
purchaseDate | ) |
|
◆ setPurchaseLag()
void org.turro.erp.entity.RequiredUsage.setPurchaseLag |
( |
double |
purchaseLag | ) |
|
◆ setPurchaseMode()
void org.turro.erp.entity.RequiredUsage.setPurchaseMode |
( |
PurchaseMode |
purchaseMode | ) |
|
◆ setPurchaseTask()
void org.turro.erp.entity.RequiredUsage.setPurchaseTask |
( |
Task |
purchaseTask | ) |
|
◆ setRepresentHours()
void org.turro.erp.entity.RequiredUsage.setRepresentHours |
( |
boolean |
representHours | ) |
|
◆ setResource()
void org.turro.erp.entity.RequiredUsage.setResource |
( |
Resource |
resource | ) |
|
◆ setResourceAptitude()
void org.turro.erp.entity.RequiredUsage.setResourceAptitude |
( |
ResourceAptitude |
ro | ) |
|
Definition at line 522 of file RequiredUsage.java.
524 resource = ro.getResource();
525 aptitudeDegree = ro.getAptitudeDegree();
◆ setTask()
void org.turro.erp.entity.RequiredUsage.setTask |
( |
Task |
task | ) |
|
◆ setUnits()
void org.turro.erp.entity.RequiredUsage.setUnits |
( |
double |
units | ) |
|
◆ setView()
void org.turro.erp.entity.RequiredUsage.setView |
( |
RegisterView |
view | ) |
|
◆ setViewId()
void org.turro.erp.entity.RequiredUsage.setViewId |
( |
long |
viewId | ) |
|
◆ startOrder() [1/2]
OrderItem org.turro.erp.entity.RequiredUsage.startOrder |
( |
| ) |
|
◆ startOrder() [2/2]
OrderItem org.turro.erp.entity.RequiredUsage.startOrder |
( |
double |
orderUnits | ) |
|
Definition at line 554 of file RequiredUsage.java.
555 OrderItem oi =
new OrderItem();
557 oi.setDocumentDate(
null);
558 oi.setDocumentNumber(
"");
559 oi.setRequiredUsage(
this);
560 oi.setUnits(orderUnits);
562 oi.setDescription(description);
564 oi.setHumanResource(humanResource);
566 oi.setDedication(dedication);
569 oi.setProviderFixed(
true);
571 OrderItem oir =
new OrderItem();
573 oir.setDocumentDate(
null);
574 oir.setDocumentNumber(
"");
575 oir.setRequiredUsage(
null);
576 oir.setResource(resource);
578 oir.setUnits(orderUnits);
580 oir.setDedication(1.0d);
583 oir.setProviderFixed(
true);
587 oi.setProductId(productId);
588 oi.setProviderProductId(providerProductId);
589 oi.setProviderId(providerId);
590 oi.setProviderFixed(providerFixed);
591 oi.setProductDescription(productDescription);
592 oi.setDedication(1.0d);
594 oi.setCostMaximum(costMaximum);
◆ preparedType
transient int org.turro.erp.entity.RequiredUsage.preparedType = 0 |
|
protected |
The documentation for this class was generated from the following file: